#30: Double request on PNG's (Open)
Oct 06 2008 * 15:04
| Reported by: | Assigned to: | ||
|---|---|---|---|
| Priority: | Normal | Milestone: |
Using prototype-ui (window and carousel)
In IE6 a have noticed that a rule like:
#container { url(/img/bg_top_container.png) no-repeat; }
cause a double request on the server for the background image, a good request falowed by a bad one:
127.0.0.1 - - [06/Oct/2008:15:38:22 +0300] "GET /img/bg_top_container.png HTTP/1.1" 200 635
127.0.0.1 - - [06/Oct/2008:15:38:25 +0300] "GET /css//img/bg_top_container.png HTTP/1.1" 404 227
Folowing the track it apears that “fixRule” function doesn’t handle absolute urls right
// Relative path
if (src[r0] != '/')
src = docPath + "/" + src;
the test should be
if (src.substr(0, 1) != '/')
in IE6
var x = '/img/bg_top_container.png';
var a = x.substr(0, 1) // returns /
var b = x[r0]; returns undefined;
alert(x.substr(0,1) + ' ' + x[r0]);

RSS feeds