CSS Alternative Style Sheets
March 9, 2008 2:37 PM
Subscribe
Do the contents of alternative style sheets load when they are not the active style sheet?
I understand that background images in style sheets all load when embedded in a common style sheet--this is why you have additional style sheets if you use (for example) different background images for various pages of a website, to prevent a page from having to load images it has no need to display.
My question: Are the background images in all style sheets requested on page load, or only those in the current active style sheet? For example, if my main style sheet has
#dork { background: url("bg.jpg"); }
and I have a couple of alternative style sheets for users to choose from, all of which contain some variation on
#dork { background: url("bg2.jpg"); }
are all of those different background images for "dork" loaded no matter what, or only the "dork" background image in the currently selected sheet? To use an extreme example, you could have 100 alternative style sheets each calling a different 50K image. Not a big deal if they're only loaded when requested, but internet-exploding if they all are called at once.
posted by maxwelton to computers & internet (9 comments total)
2 users marked this as a favorite
posted by datacenter refugee at 2:53 PM on March 9