admin管理员组文章数量:1432573
I wonder what exactly the version nameing does?
like jquery.js?ver=1.4.4
I mean if I use a cdn like this jquery/1.4.4/jquery.min.js?ver=1.4.4 but another side has jquery/1.4.4/jquery.min.js?ver=1.3.2 in there, does this effect caching?
I wonder what exactly the version nameing does?
like jquery.js?ver=1.4.4
I mean if I use a cdn like this jquery/1.4.4/jquery.min.js?ver=1.4.4 but another side has jquery/1.4.4/jquery.min.js?ver=1.3.2 in there, does this effect caching?
Share Improve this question edited Jan 12, 2019 at 15:28 Cœur 38.8k25 gold badges206 silver badges279 bronze badges asked Dec 17, 2010 at 22:27 MrGlasspooleMrGlasspoole 4452 gold badges4 silver badges15 bronze badges1 Answer
Reset to default 8Yes, by changing the =1.4.4
to something else, it forces the file to not be cached by the browser when a user es back to the page. So if you upgraded to a new version of JQuery say 1.4.5, and you wanted to make sure that the client got the most current version of the file, you change the end of the url. This makes the browser think that it's a brand new file and forces it to download the new version.
(Having the version at the end helps you easily identify which version of the file you have, but that is totally aside from what is being asked :) ).
本文标签: javascriptver at the end of includeis there a technical effectStack Overflow
版权声明:本文标题:javascript - ?ver= at the end of include - is there a technical effect? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745605402a2665809.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论