Previous Message
Next Message

Re: [css-d] Best way of serving alternative stylesheet to NS4 (styleswitcher

Sent by Arlen P Walker on 30 July 2002 09:09


If you have SSI capability you could try this:

1) create your stylesheet files both for switcher and for NS4
2) create two js files, one containing switcher, and another which creates
empty versions of the switcher function calls. (Effectively disables
switcher)
3) use SSI to serve up the right stylesheet link and js file:

<!--#if expr="\"$HTTP_USER_AGENT\" = /Mozilla\/4/ && \"HTTP_USER_AGENT\" !
= /MSIE/ && \"$HTTP_USER_AGENT\" != /Opera/" -->
<link NS4 stylesheet here>
<script for NS4 switcher disabling>
<!--#else -->
<link "advanced" stylesheets here>
<script for switcher here>
<!--#endif -->

Substitute your own best browser sniffing string in the first line. Just
remember that some Opera users are perverse enough to identify themselves
as NS4 users, so take that into account.

Have fun,
Arlen
Chief Managing Director In Charge, Department of Redundancy Department
DNRC 224

[EMAIL-REMOVED]
----------------------------------------------
In God we trust; all others must provide data.
----------------------------------------------
Opinions expressed are mine and mine alone.
If JCI had an opinion on this, they'd hire someone else to deliver it.
Previous Message
Next Message

Message thread: