I am facing this annoying issue with Angular cache in Chrome. I get this issue every time I do a release.
I have added cache control settings in HTML.
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
What is weird is, on one of the most frequent routes, Chrome uses old main.xxxx.js file.
<script type="text/javascript" src="main.e782af08b3f281507dba.js"></script>
But as soon as I switch to another less frequent route, it loads latest main.xxxxx.js file.
<script type="text/javascript" src="main.075b8caa48c74ed93f64.js"></script>
I am facing this after every release, which is very annoying not just for me, but for my clients as well. I can't ask them to clear their cache every time I do a new release.
Also, in last release I had put a check for version change, and if version is changed, use window.reload() to reload the browser, which it does. But as soon as it routes to frequent path, chrome gets old main.js file.