CSS background image being downloaded more than once




9 years ago
9 years ago


(Reporter: nick.g.clarke, Unassigned)


Firefox Tracking Flags

(Not tracked)





9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Chrome/ Safari/532.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20091016 Firefox/3.5.4

Its appears that Firefox requests images in CSS more than once instead of waiting for the first request for that image to complete and then use the cached version.

I have tested this on XP 32bit, Mac OSX Leapord 10.5.8 and Windows 7 Ult 64bit - Firefox version 3.5.4

I used wireshark to confirm both Chrome and IE8 work expected and only request/download the image once.

Reproducible: Always

Steps to Reproduce:
1. Request test page - http://nicholasclarke.co.uk/Sprite_Test/index.htm or see sample http://stackoverflow.com/questions/1649568/css-background-image-being-downloaded-more-than-once
2. Start firebug and/or Wireshark
3. In the console you will see the file random.jpg requested three times.
Actual Results:  
random.jpg is requested three times and slows the page as all three are downloaded at once.

Expected Results:  
random.jpg requested once and then all subsequent request (2 time in this test) load the image from the cache e.g. for css sprites

On the stackoverflow question someone reports that it did work as expected in FF 3.0.15

Once the image is fully downloaded Firefox loads it from the cache unless you ctl-f5.

Comment 1

9 years ago
If there is a force-refresh between step 2 and 3 this is a duplicate of bug 497665
no response to comment #1
Last Resolved: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.