0
votes

I've developed an AngularJS SPA application, I'm seeing issues with my js files being mixed with the older versions because of cache even after the new deployment. Anyone know how to clear the cache through the angular code or some js code or through html every time the app loads for the first time, so that it won't mix both the new and old code.

1

1 Answers

0
votes

I think this is typically done by having version numbers in the tags:

<script type='text/javascript' src='/jsfile.js?v=1'></script>
<link rel="stylesheet" href="/cssfile.css?v=1"> 

Then you just increment the versions every time you want to force an update.