For Programmers: Free Programming Magazines  


Home > Archive > ASP > January 2007 > Forcining An ASP page to expire









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Forcining An ASP page to expire
Sam

2007-01-26, 6:56 pm

HI - I have the following asp page and no matter what I try every time
I exit this page and click the back button the page remains in cache.

Any suggestions?

thanks

<%
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"


Response.write("<form action='communicator.asp' method='post'
name='login'>")
Response.write(" <input type='hidden' value='1'
name='uidCallingWebPage' />")
Response.write("<table border=0>")

Response.write("<tr>")
Response.write("<td>Login:</td>")
Response.write("<td><input type='text' name='id' size='20'
autocomplete='Off' ></td>")
Response.write("</tr>")
Response.write("<tr>")
Response.write("<td>Password:</td>")
Response.write("<td><input type='password' name='password' size='20'
></td>")

Response.write("</tr>")
Response.write("<tr>")
Response.write("</table>")
Response.write("<table><tr><td><input type='submit' value='Save'
></td></tr></table>")


Response.write("</form>")

%>

Dave Anderson

2007-01-26, 6:56 pm

Sam wrote:
> I have the following asp page and no matter what I try every
> time I exit this page and click the back button the page remains
> in cache.


Cache and History are two different things. The browser is not required to
send a [new request] when the user traverses the history list, and
cache-control applies only to [new requests].

As undesirable as it may seem to you, this behavior is by design.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com