문제

I am dynamically adding <link> tags to the page using YUI3 and this works properly.

For testing purposes I have two nearly identical css files which include the exact same background images however when I load the second css file, Firebug shows that more http requests are being made for the same images in the first css file.

The JS

Y.one('head').appendChild(Y.Node.create('<link rel="stylesheet" id="' + cObject[target] + 'css' + '" type="text/css" href="css/' + c[target] + '.css" />'));

A css bg example

background-image: url(../../img/layout/apic.png);

I obviously would like this to not happen but don't know where to start looking. This may do the same in other browsers but I do not know what plugins are available (if any) for the other browsers.

EDIT: The headers appear to be fine but that bug might be the culprit...What can I use in IE/Chrome/Safari to test for the http requests to see if it is ONLY FF?

도움이 되었습니까?

해결책

Possibly it's the same problem as described here: browser cache bypassed in firefox?

다른 팁

Check the HTTP headers being sent in the image response.

Look particularly for headers that impact client-side caching, such as Expires, Etag, Last-modified, etc...

Check that they are being set/sent correctly, and that you know how to use them.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top