Bug 19453

Summary: CSS background-image property will make a request even if the selector is overriden
Product: WebKit Reporter: Daniel Ruspini <druspini>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, rik, sethrasmussen, simon.fraser, webdev
Priority: P2    
Version: 525.x (Safari 3.1)   
Hardware: Mac   
OS: OS X 10.5   

Daniel Ruspini
Reported 2008-06-09 16:58:23 PDT
Using Fiddler I've found that when a CSS background-image property is overriden with another selector, the previously declared selector still initiates a request. This does not happen in FF or IE, and became apparent when using a third-party JS library that included CSS and background images we did not want to use and thus targeted for overriding. The 404's kept coming in though for Safari. Example: <html> <body> <style> .something { background: red url("images/foo.gif"); width: 50px; height: 50px; } .something { background-image: none; } </style> <div class="something"> </div> </body> </html> Fiddler says: 404 HTTP .... images/foo.gif
Attachments
Dave Hyatt
Comment 1 2008-06-09 22:57:51 PDT
Yes, this is a known annoyance that i intend to fix (hopefully soon). It applies to all image properties and not just to background-image.
Seth Thomas Rasmussen
Comment 2 2008-11-20 10:19:02 PST
I would say this bug is a bit more severe than "Normal". Any sort of plan for when a fix for this might come in?
Alexey Proskuryakov
Comment 3 2010-09-03 12:22:05 PDT
Does this still occur with WebKit nightlies?
Simon Fraser (smfr)
Comment 4 2010-09-03 14:13:33 PDT
Fixed via bug 24223.
Note You need to log in before you can comment on or make changes to this bug.