开发者

CSS browser cache issue, Is img would have same issue

开发者 https://www.devze.com 2022-12-08 21:16 出处:网络
There is known css cache issue when you开发者_运维问答 change your css, browser is not going to realize it unless time expires and everyone seems to be using querystring like ?version=29347 to update

There is known css cache issue when you开发者_运维问答 change your css, browser is not going to realize it unless time expires and everyone seems to be using querystring like ?version=29347 to update css when it changes on server.

But does img has the same issue? When img changes on server, is browser detects it? or do i need similar implementation for img?

Reason i am asking is because i am writing generic implementation for css and would like to know if there are any standards related to img so that it does not have same problem. Instead of just relying on my testing as i can't test all browser or real work scenario


Yes, images would have the same problem (as would flash, javascript files, or any other media that is cached by the browser).

Using a random dummy query string parameter in your <img src=> or <script src=> tags should solve the issue for those other cases as well though.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号