Previous Message
Next Message

Pros and Cons of JavaScript vs. @Import

Sent by Jeroen Visser [ vizi ] on 7 August 2004 00:12


Craddock, Melissa wrote:
>  Without getting into a discussion about which is better, could I get
> some "real world" Pros and Cons about using @import rather than serving
> up separate stylesheets based on detecting the browser with Javascript?
> That way I can make an informed decision on which route would be the
> best for us to use.

Because Javascript is often disabled on office computers and many people 
access the web through the computer on their work desk, it wouldn't be 
wise to rely on scripting to serve different stylesheets.

Beside that: what is the advantage? The Project7 method as Al suggested 
doesn't really offer a big advantage over setting a base stylesheet 
(e.g. headers, copy text, lists and links only) with a <link> element, 
and serving the advanced stuff through an @import rule.

I've used this technique several times, and it works like a charm.

Jeroen

-- 
vizi fotografie & grafisch ontwerp

I  http://www.vizi.nl/
E  [EMAIL-REMOVED]

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: