This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes Expiring a page on clicking the browser BACK button Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Expiring a page on clicking the browser BACK button" Watch "Expiring a page on clicking the browser BACK button" New topic
Author

Expiring a page on clicking the browser BACK button

Prashant Ladha
Greenhorn

Joined: Feb 06, 2008
Posts: 8
for a page i.e. if the customer clicks on “Submit” button on a.jsp then clicks on the browsers “BACK” button then we should expiry the page, irrespective if the request was successfully processed or an error page was thrown.

We have added the following code in the a.jsp that seems to work on IE but does not work on Firefox.

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="-1">
<%
response.addHeader("Cache-Control", "no-store");
//response.addHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setHeader("Expires", "-1");
Can you please suggest what could be wrong in this?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56180
    
  13

"Prashant", please check your private messages for an important administrative matter.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Expiring a page on clicking the browser BACK button
 
Similar Threads
how to prevent caching in IE 6
No Cache in IE
how to prevent user browse back to previous page after sign out!
disable the back button in webapplication
Log out Functionality for my Web Application