| Author |
Clearing of JSP Page and form data from cache
|
lekurwale amol
Ranch Hand
Joined: Apr 22, 2010
Posts: 55
|
|
Hi,
I am developing an application, where the user logs in and is forwarded to home page.
Now, my requirement is :
1. When user logs in, then from home page, if he is clicking on browser's back, then again forward, he should not be allowed to view home page.
2. On firefox, as well as on IE, if we press back for a page which caused some action, the browser asks (in case of firefox) 'Do you want to resend...' etc. It means browser is caching the form data. How to avoid caching of form data/jsp page.? I tried using
<% response.setHeader("Cache-Control","no-cache");//HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching
response.setHeader("Cache-Control","no-store"); //HTTP 1.1 %>
as well as
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<meta http-equiv="no-cache">
<meta HTTP-EQUIV="expires" CONTENT="-1">
</head>
in the JSP, but seems to not work.
Any help would be greatly appreciated.
Regards,
Amol
|
 |
 |
|
|
subject: Clearing of JSP Page and form data from cache
|
|
|