By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

Multiple CSS downloads with the @import rule?

P: n/a
When the @import rule is used in the html markup to hide advanced css
from older browsers, is that css downloaded with every page from a
site? (which would be redundant)

Or is it different if you link to, say, simple.css, which then
"@imports" advanced.css?

How can I reduce the bandwidth load (i.e. client get the css from the
client cache) or is it not an option with @import?

TIA

Dave Higgins
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
go****@higginsnet.com (Dave Higgins) wrote:
When the @import rule is used in the html markup to hide advanced css
from older browsers, is that css downloaded with every page from a
site? (which would be redundant)
No it can be cached, same as any other file.
Or is it different if you link to, say, simple.css, which then
"@imports" advanced.css?
They can both be cached.
How can I reduce the bandwidth load (i.e. client get the css from the
client cache) or is it not an option with @import?


Nothing you need to do, normally. If your server is sending out http
headers with .css files that discourage caching then that would be a
problem.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2

P: n/a
On 20 Jan 2004 00:22:25 -0800, go****@higginsnet.com (Dave Higgins)
wrote:
When the @import rule is used in the html markup to hide advanced css
from older browsers, is that css downloaded with every page from a
site? (which would be redundant)


No. In fact I make use of that to determine what percentage of my
visitors are using older browsers, based on the site logs. (Still around
3%).

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.