/    Sign up×
Community /Pin to ProfileBookmark

about background images

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 [url]http://www.websiteoptimization.com[/url]
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?

Thanks

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@toicontienJun 10.2005 — I 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 downloaded 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.
Copy linkTweet thisAlerts:
@elgato65authorJun 10.2005 — 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
×

Success!

Help @elgato65 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...