javascript - Clear browser cache with query string approach -
i need clear browser cache when push updated javascript file on server. simple answer use below technique of query string.
<script type="text/javascript" src="/js/myjsfile.js?{my file version}"></script>
it work
- do need on every single
script
tag of every single page of application? - can @ main screen login loads @ beginning , assume clear cached file new one, work?
"do need on every single script tag of every single page of application?"
yes do. cache based on file's url, including parameters.
adding parameters doesn't remove file browser's cache, more or less sees new, different file.
this answers point 2, since having on pages means can't on 1 page.
Comments
Post a Comment