What\'s the best way to handle a user going back to a page that had cached items in an asp.net app? Is there a good way to capture the back button (event?) and handle the cache
The following code worked for me in IE9+, FF21 and Latest Chrome:
Response.Cache.SetCacheability(HttpCacheability.NoCache | HttpCacheability.Private);
Response.Cache.AppendCacheExtension("must-revalidate");
Response.Cache.AppendCacheExtension("max-age=0");
Response.Cache.SetNoStore();
You can place this in Page_Load()
event handler in the MasterPage so that every page in your app requires a round-trip to the server when pressing the back button.