Solved

How To Automatically expire a Page

Posted on 2002-04-01
5
195 Views
Last Modified: 2010-04-01
Hi There
I want to expire a page say an update page once the update is successful
Sya form an edit page i direct to a servlet if it is successful i am redirecting to a viewing page wher he can view his updated accounts else he is sent back to the same edit page now what i want is that after update is successful i dont want the the user to use browser back button and insteda say that page has expired
Now how to do this

Thanks in advance
Macet
0
Comment
Question by:macet2k
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Expert Comment

by:kotan
ID: 6912401
<META content="0" http-equiv="expires"/>
<META content="nocache" http-equiv="pragma"/>

Place above lines into html/head.
0
 

Author Comment

by:macet2k
ID: 6912467
Well I have tried this but it does not work
It will be better if u give me some code snippets with say any 2 jsp pages itself
I have tried hard really
Macet
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 10 total points
ID: 6912876
Actually, the best thing that works in IE is to have the following:
<%
response.addHeader("Pragma" , "No-cache") ;
response.addHeader("Cache-Control, "no-cache") ;
response.addDateHeader("Expires", 0);  
%>

BOTH in the head of the of page and bottom of the page (I read this in a message board and it seems
to work for me) so the final version would be as such:

<html>
<head>
<%
response.addHeader("Pragma" , "No-cache") ;
response.addHeader("Cache-Control, "no-cache") ;
response.addDateHeader("Expires", 0);  
%>
</head>
<body>

....

</body>
<%
response.addHeader("Pragma" , "No-cache") ;
response.addHeader("Cache-Control, "no-cache") ;
response.addDateHeader("Expires", 0);  
%>
</html>

This works in NS and IE.

HTH,
CJ
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9553064
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

"Accept cheekycj's comment as answer."
 
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Kuldeepchaturvedi
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes a serious pitfall that can happen when deleting shapes using VBA.
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question