Previous Message
Next Message

Re: [half-OT] [css-d] Browser detection vs. @import

Sent by Keith Higgs on 18 February 2002 15:03


The main problem with relying on Javascript to process style information is 
the same problem you will have doing anything in Javascript. A lot of 
people consciously disable client-side scripting for security reasons.

Detecting browser versions isn't *really* all that difficult but, it is 
more important to test for any specific DOM methods you may be using. 
Again, all of this will fail if client-side scripting is disabled.


At 12:47 PM 2/18/2002, you wrote:
>@import is most commonly used as a means of detecting Netscape 4 and pre
>version 4 browsers, neither of which understand the term and so ignore it
>(and the linked stylesheet). Using Javascript to detect the browser in use
>is an alternative, but tends to mean a lot of overhead* and problems with
>forward compatibility unless it's done properly**.
>
>While you can use Javascript to serve up a browser-specific stylesheet, I'd
>recommend that you design your sites and work up your stylesheets so that
>only two are required -- one for the "old" browsers (using <link>) and one
>for the newer browsers (using @import). This is very achievable if you
>accept any minor style differences between browsers.

D. Keith Higgs. Email: [EMAIL-REMOVED], [EMAIL-REMOVED]
Case Western Reserve University, Webmaster - University Library
More Info: http://www.cwru.edu/UL/pershomepages/K_Higgs.html
"'C' is for Cookie, that's good enough for me."
Previous Message
Next Message

Message thread: