How to stop chrome from caching

Craig Norton picture Craig Norton · Nov 10, 2010 · Viewed 28.3k times · Source

I need to force the browser to reload the previous page from the server when the user presses the back button.

I've added the following to my response headers:

Cache-Control: no-cache, must-revalidate
Expires: -1

This seems to work for most browsers but not for Google Chrome that insists on returning the cached results.

So does anyone know how I force the browser to get the page from the server when the user presses the back button?

Thank you.

Answer

superfro picture superfro · Nov 10, 2010

as per this bug report in chromium repo, users find that using no-store instead of no-cache will fix it in chrome.