I have a single page web app and I use versioning to cache bust the script and other resources that app needs, i.e. in default.htm I link like this:
<script src="js/index.js?plv=1.1"></script>
This works fine, however the issue I run into is that the default.htm page itself is being cached by the browser so it doesn't read the new default.htm and in turn doesn't trigger the update.
The "home" page is being served by the app.UseDefaultFiles() middleware.
I'm thinking a quick and dirty way to fix this issue, is on every code update I publish, I alternate between index.htm and default.htm as the default document and rename the other one so it doesn't get picked up by UseDefaultFiles middleware.
This is a manual step however and surely I'll forget to do it at some point.
How can I handle this situation?