Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

weird problem with page expiration

Status
Not open for further replies.

rajyar

IS-IT--Management
Apr 11, 2001
8
US
here is the code I wrote on my asp page..
when user leaves from this page after hitting submit button,if the click browser back button..the page has to expire..but its not doing that..
its show all the previous content that was on there,I can't avoid multiple submition..
Please help to solve this issue..

<%
Response.Expires = -1
Response.ExpiresAbsolute = CDate(&quot;07/29/1980&quot;)
Response.AddHeader &quot;pragma&quot;, &quot;no-cache&quot;
Response.AddHeader &quot;cache-control&quot;, &quot;no-store&quot;
Response.CacheControl = &quot;no-cache&quot;
%>
 
one way would be to have your form (page1.asp) post to page2.asp, then redirect to page3.asp. page2.asp would contain javascript to prevent back from working:

page2.asp
<html>
<head>
<script type=&quot;text/javascript&quot;>
history.go(1);
</script>
</head>
<%
rem do your asp stuff here
%>
</html>





=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top