How to clear browser cache on browser back button click in MVC4?

The problem with your approach is that you are setting it where it is already too late for MVC to apply it. The following three lines of your code should be put in the method that shows the view (consequently the page) that you do not want to show. Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1)); Response.Cache.SetNoStore(); If you want … Read more

Difference between no-cache and must-revalidate for Cache-Control?

I believe that must-revalidate means : Once the cache expires, refuse to return stale responses to the user even if they say that stale responses are acceptable. Whereas no-cache implies : must-revalidate plus the fact the response becomes stale right away. If a response is cacheable for 10 seconds, then must-revalidate kicks in after 10 … Read more

How to force reloading a page when using browser back button?

You can use pageshow event to handle situation when browser navigates to your page through history traversal: window.addEventListener( “pageshow”, function ( event ) { var historyTraversal = event.persisted || ( typeof window.performance != “undefined” && window.performance.navigation.type === 2 ); if ( historyTraversal ) { // Handle page restore. window.location.reload(); } }); Note that HTTP cache … Read more

What’s the difference between “Normal Reload”, “Hard Reload”, and “Empty Cache and Hard Reload” in Chrome?

Normal reload The same thing as pressing F5. This will use the cache but revalidate everything during page load, looking for “304 Not Modified” responses. If the browser can avoid re-downloading cached JavaScript files, images, text files, etc. then it will. Hard reload Don’t use anything in the cache when making the request. (which is … Read more