Re: Tables and non-table-able browsers

Chris Bryant (cbryant@interport.net)
Thu, 10 Aug 1995 00:04:16 -0400


You do have to use a CGI script but it's not the REFERER field you want to
check. This field simply stores the URI of the preceding link.
Unfortunately many browsers do not even pass this field to the server.

The field you should check is USER_AGENT. Using your example, if
USER_AGENT=Mozilla/some version or Arena/some version you would return the
HTML 3.0 tables. Otherwise, you would send preformatted text.

Hope that helps.

Chris Bryant

>I've got a document which has a table in it. (This is just on my
>local machine at the moment).
>
>Can I, and if so - how, deliver different versions of the document
>to different browsers so that netscape/arena etc. get a version
>with a <table> in, and others get a <pre>-formatted asciified
>version of the table?
>
>I figure I can do it using a cgi script and looking at the REFERER
>environment variable and guessing from that, but that seems inelegant
>and clumsy.
>
>On this machine, I've got NCSA 1.3, Apache 0.6.5? and CERN 3.0
>httpd's.
>
>Any advice?
>
>
>