I need to clear browser cache when I push an updated javascript file on server. A simple answer would be to use below technique of query string.
<script type="text/javascript" src="/js/myjsfile.js?{my file version}"></script>
It would work but
- Do I need to do this on every single
script
tag of every single page of my application? - Can I do this at main screen like login which loads at the beginning and I assume that would clear the cached file with new one, would it work?