After deploying a new version of a website the browser loads everything from its cache from the old webpage until a force refresh is done. Images are old, cookies are old, and some AJAX parts are not working.
How should I proceed to serve the users with the latest version of the page after deploy?
The webpage is an ASP.Net webpage using IIS7+.
Before you go straight to clearing your entire browser cache, one trick you can try is something called a 'forced refresh'. Normally, when you refresh a page, your browser still serves up the cached version of the page, rather than downloading all of the assets again.
⇧ Shift-click the Refresh button. While pressing the Refresh button on your browser's address bar will only do a standard refresh, you can force a refresh from the server by pressing ⇧ Shift and clicking it instead. Internet Explorer users should hold ^ Ctrl and click the Refresh button.
You can append a variable to the end of each of your resources that changes with each deploy. For example you can name your stylesheets:
styles.css?id=1
with the id changing each time.
This will force the browser to download the new version as it cannot find it in its cache.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With