[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ajug-members]: Page Expiration
For the most complete solution that will work on the widest variety of web
servers and browsers, I'd set the following 3 HTTP headers, in whatever way
your environment allows you to set HTTP headers (code example below is for
JSP).
<%
/* Sets the document to expire in the past. Should clear the cache and force
a reload */
response.setHeader("Expires", "12 Nov 1994 08:49:37 GMT");
/* On HTTP 1.0, stops the browser and/or proxy from caching the document
(does not work on 1.1) */
response.setHeader("Pragma", "no-cache");
/* On HTTP 1.1, stops the browser and/or proxy from caching the document,
also forces form elements to be re-examined */
response.setHeader("cache-control", "no-cache, no-store, must-revalidate");
%>
Hope this helps....
Jeff
----- Original Message -----
From: "Kevin O'Neill Stoll" <kevinostoll@yahoo.com>
To: <ajug-members@www.ajug.org>
Cc: <ale@ale.org>
Sent: Tuesday, April 06, 2004 5:03 PM
Subject: [ajug-members]: Page Expiration
> If a user clicks the back button in a browser I need for
> the previous page to come up expired. I have noticed that
> some financial institutions do this, such as Wachovia or
> BOA.
>
> I have done some research on how to do this but maybe I'm
> just looking for the wrong thing. I haven't found what I
> think I'm looking for.
>
> Thanks for the help.
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway
> http://promotions.yahoo.com/design_giveaway/
>
>
>