Re: "Smart Pages"

Michael Johnson ([email protected])
Thu, 07 Sep 95 07:35:53 EDT


>I'm just dying to know how the pages identify the type of browser viewing,
>last page visited, and so on.
>
>I'd really appreciate it if somebody could direct me to resources on how to
>add these features to my pages.

This has been covered here recently and it's really off-topic, because it is
an HTTP issue not an HTML issue, but I'll answer it anyway.

In order to do this you need to write a CGI script which inspects various
HTTP headers (which are contained in environment variables). It is BAD
PRACTICE to do anything based on the name of the browser that made the
request. Any decision about content of the reply should be based on the
contents of the HTTP_ACCEPT environment variable, which lists the content
types that the requesting browser can handle.

To determine the last page visited, check the HTTP_REFERER (sp?) environment
variable for the URL of said page (not all browsers support this feature).

Michael Johnson
Relay Technology, Inc.
The opinions stated above are my own and are not necessarily those of Relay
Technology Incorporated.