I have a website that basically consists of 6 html files, each of which has
a table with a background image defined via CSS.
I ran a speed test of the site through <!-- m --><a class="postlink" href="http://www.websiteoptimization.com">http://www.websiteoptimization.com</a><!-- m -->
and I was surprised to see that for each html. ALL background images declared on my CSS were loaded, even though only one is called on the html.
Is the report accurate? Do all background images declared in a CSS file get
loaded, regardless whether they are being called or not in a specific html?
If so, is there a workaround to prevent this?
ThanksI don't think so. It could also depend on the browser too. I know that Gecko browsers (Mozilla, Firefox) do not load background images until you scroll the containing box into view. Internet Explorer may react differently.
Delete all of IE's temp Internet files. Visit just one of your pages on the Web. Look in the temp internet files for all the background images.
It could also just be websiteoptimization.com's quirk. Logically a background image would only be Download ed if it can be put somewhere.
EDIT: Oh. And don't get too worked up by that site. About 90 to 95 percent of the sites "fail" their little test. I've found their recommendations to be rather unrealistic sometimes.Yep, you are quite right. Followed your suggestion, cleared the cache and then re checked only to find the one background image called on the page had been loaded. Great!
Thanks a bunch
a table with a background image defined via CSS.
I ran a speed test of the site through <!-- m --><a class="postlink" href="http://www.websiteoptimization.com">http://www.websiteoptimization.com</a><!-- m -->
and I was surprised to see that for each html. ALL background images declared on my CSS were loaded, even though only one is called on the html.
Is the report accurate? Do all background images declared in a CSS file get
loaded, regardless whether they are being called or not in a specific html?
If so, is there a workaround to prevent this?
ThanksI don't think so. It could also depend on the browser too. I know that Gecko browsers (Mozilla, Firefox) do not load background images until you scroll the containing box into view. Internet Explorer may react differently.
Delete all of IE's temp Internet files. Visit just one of your pages on the Web. Look in the temp internet files for all the background images.
It could also just be websiteoptimization.com's quirk. Logically a background image would only be Download ed if it can be put somewhere.
EDIT: Oh. And don't get too worked up by that site. About 90 to 95 percent of the sites "fail" their little test. I've found their recommendations to be rather unrealistic sometimes.Yep, you are quite right. Followed your suggestion, cleared the cache and then re checked only to find the one background image called on the page had been loaded. Great!
Thanks a bunch