Last post Sep 08, 2020 02:22 PM by bruce (sqlwork.com)
Sep 08, 2020 12:09 AM|Madog|LINK
Our organisation has just upgraded to the latest Edge browser.
I have the following ?v=1 flag set on the script tag, which is supposed to ignore browser caching, but it doesn't seem to make any difference.
<script link rel="preload" src="Scripts/TRACS/TRACS_Common.js?v=1"></script>
In order for the change to take effect, I have to delete the cache from Setting--> History
Further, the problem is intermittent. Sometimes it takes the change immediately, sometimes not.
Is there a flag I can set in code, in IIS or the browser, to make Edge honour the latest version.
Sep 08, 2020 02:22 AM|Sean Fang|LINK
If so, that is really weird since the file is treated as a new resource and the browser should not use cache.
There is another option that you could set the header to force browsers to clear cache.
Cache-Control: no-cache, no-store, must-revalidate
Above headers will be working for all browsers mentioned below:
Internet Explorer 6+
More details, you could refer to below link which provides you with a comprehensive explanation about this issue.
How do we control web page caching, across all browsers?
Hope this can help you.
Sep 08, 2020 03:35 AM|KathyW|LINK
To clarify: ?v=1 doesn't ignore browser caching. It caches ?v=1. What ignores caching is
changing that number each time you change the file (v=2, v=3, ...) so that a new version is fetched (and cached).
Are you changing the number?
Sep 08, 2020 09:49 AM|Madog|LINK
Ok. Thanks KathyW.
i had the wrong impression of that. I thought it forced the browser to fetch the latest version.
Now I understood I have to change the value of that parameter each time, in order to force it to fetch the latest version from the server.
What I don’t get is why it didn’t happen under IE 11
Sep 08, 2020 02:22 PM|bruce (sqlwork.com)|LINK
IE11 is not as aggressive with caching as chrome or edge.