I am making an application in ASP.Net with VB.Net as the code behind. How to ensure that the page is not loaded from the cache when hit the back button of the browser in ASP.NET through Javascript?
Printable View
I am making an application in ASP.Net with VB.Net as the code behind. How to ensure that the page is not loaded from the cache when hit the back button of the browser in ASP.NET through Javascript?
You need to send a cache control HTTP header along with the page. I have no idea how to do this in ASP.NET. Have a look at this though which gives you some information on the cache control header.
http://www.web-caching.com/mnot_tutorial/how.html
Something like this will prevent the page from being cached:
Code:Pragma: no-cache
Cache-Control: no-cache
Expires: Fri, 30 Oct 1998 14:19:41 GMT
Ya, Javascript cant come into the picture when used as a client side script.