Originally posted by saran sadaiyappan:
Hi all,
I want the caching facility of the browser to be disabled.i.e even after clicking the back button in the browser he should not be taken back but the message "page expired" to be displayed.Can anyone help me?
Use this code in every
servlet:
response.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT");
response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
response.addHeader("Cache-Control", "post-check=0, pre-check=0");
response.setHeader("Pragma", "no-cache");
No waranty, but the browser is sent the instruction of not storing in the cache that page