Style Sheets & Page Size
When including a master stylesheet on a page that has references to images for other pages in your site, are they actually loaded on each page that the CSS is referenced on or are they only loaded only when the page calls for them.
Our IT group is currently saying our sites homepage is coming in at 550,000 bytes according to www.websiteoptimizer.com but that includes large banner files and numerous other background images that are used on different pages other than the homepage.
I didn't think that those referenced files are considered to be part of the page load but I wanted to get your take.
Test it yourself with a new page. (so it is not cached anywhere)
Add a 100Mb image as the background in a class that is never used on the page (or the site I'd hope!) and make sure it is the first class in the style sheet, because if it was the last class, the page might render without any time delay.
Not got a 100mb image to hand? Make one by pasting a 10Mb one into a huge empty image in whatever software you use.
Upload the css and the image file.
See what the real download time is using a different computer. You will soon discover the answer.
That is actually really funny. Unfortunately if it did impact the page load I would be in a big heap of crap.
Thanks for the tip though!
Not if the stylesheet was a new one and only used on the one test page. The new css file only needs two classes - the image test class, and below that something that colored a paragraph red, say. The test page needs only one paragraph on it, styled red, saying "Does this takes ages to go red?" Then no-one else would know about it. Only you when you access the test page.
And it was a serious answer/solution/test.