Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Article Poll

Poll I found this article to be
Very Helpful
Helpful
Not Helpful
Not Very Helpful
[ Results | Polls ]
Comments:0 | Votes:0

What about switching versions based on HTTP_REFERE

posted by Krow on 12:31 PM January 7th, 2002   Printer-friendly   Email story

howdy. forgive me if this feature already exists & i'm just stupid, but it seems to me it would be very nice (and easy, and even obvious) to be able to switch the "version" of a slash site based on the browser ID variable (HTTP_REFERER).

you could set this in the preferences section.

that way, for example, when i'm using IE5 on my fast connection, the slashsite could be all purty and picture-ful, but if i'm logged in using lynx somewhere it would automatically show up in "lite" mode.

you could even use regexps :)

something like...

$style= $alt_style if $alt_style && $ENV{'HTTP_REFERER'} =~ /$alt_browser/;

(probably one alternate version would be enough but of course you could do more)

anwyay, thanks for the consideration


--
frostman
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • by Anonymous Coward
    Please correctly refer to HTTP_USER_AGENT when talking about browser variables. HTTP_REFERER is something completely different.
  • The referrer has nothing to do with the browser version/OS. The referrer tells you the site they're coming from. (info about referrer [apacheweek.com]).

    I think you want the user_agent variable. You could key off that and provide different html/shtml/css for each.
    --
    lottadot [lottadot.com]