Expiring Pages in Mozilla Browsers
"MonkeeX" <[email protected]> 21 Jul 2005 09:37:52 -0700
| Newsgroups | gmane.comp.mozilla.devel.mac |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
Hi All,
I am writing an ASP.NET application in C# and I am trying to create a
similar effect as that which is used by Internet Banks to expire pages
immediately. So, when you click the back but you get a message stating
that the page has expired and the user is required to click the refresh
button in order to reload the page. The code I am using to do this is:
Response.Expires = 0;
Response.ExpiresAbsolute = (DateTime.Now.Subtract(new TimeSpan(7, 0, 0,
0)));
Response.AddHeader("pragma","no-cache");
Response.AddHeader("cache-control","private");
Response.CacheControl = "no-cache";
This works fine in IE and Advant but does not work in Opera, Netscape
and Firefox. When I click the back button I can view the page as
normal. Could anyone give any pointers on how I can achieve this effect
in these browsers?
Many Thanks!