473,830 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Expire IE browser cache, again.

Hi,
I have checked this newsgroup and goggled in order to find out how to expire
the IE browser cache in order to ALWAYS get this text

Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available. As a
security precaution, Internet Explorer does not automatically resubmit your
information for you.

To resubmit your information and view this Web page, click the Refresh
button.


when the user presses the back button in IE 6.0.

I came up with this code:

Response.CacheC ontrol = "no-cache"

Response.Cache. SetExpires(Date Time.Now.AddSec onds(0))

Response.Cache. SetCacheability (HttpCacheabili ty.NoCache)

Response.Cache. SetValidUntilEx pires(False)

Response.Cache. SetNoStore()

Response.Append Header("Pragma" , "no-cache")

Response.Cache. SetRevalidation (HttpCacheReval idation.AllCach es)

Infortunately it doesnt always works.

Tips anyone?

/k
Nov 19 '05 #1
4 1843
Try : <%@ OutputCache Location="None" %> in your aspx page.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"kurt sune" <ap*@apa.com> wrote in message news:e$******** ******@TK2MSFTN GP09.phx.gbl...
Hi,
I have checked this newsgroup and goggled in order to find out how to expire
the IE browser cache in order to ALWAYS get this text

Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available. As a
security precaution, Internet Explorer does not automatically resubmit your
information for you.

To resubmit your information and view this Web page, click the Refresh
button.


when the user presses the back button in IE 6.0.

I came up with this code:

Response.CacheC ontrol = "no-cache"

Response.Cache. SetExpires(Date Time.Now.AddSec onds(0))

Response.Cache. SetCacheability (HttpCacheabili ty.NoCache)

Response.Cache. SetValidUntilEx pires(False)

Response.Cache. SetNoStore()

Response.Append Header("Pragma" , "no-cache")

Response.Cache. SetRevalidation (HttpCacheReval idation.AllCach es)

Infortunately it doesnt always works.

Tips anyone?

/k

Nov 19 '05 #2
Nope,
some of the pages I am backing to still shows up. Usually the first and
third.

/k
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
Try : <%@ OutputCache Location="None" %> in your aspx page.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"kurt sune" <ap*@apa.com> wrote in message

news:e$******** ******@TK2MSFTN GP09.phx.gbl...
Hi,
I have checked this newsgroup and goggled in order to find out how to expire the IE browser cache in order to ALWAYS get this text

Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh
button.


when the user presses the back button in IE 6.0.

I came up with this code:

Response.CacheC ontrol = "no-cache"

Response.Cache. SetExpires(Date Time.Now.AddSec onds(0))

Response.Cache. SetCacheability (HttpCacheabili ty.NoCache)

Response.Cache. SetValidUntilEx pires(False)

Response.Cache. SetNoStore()

Response.Append Header("Pragma" , "no-cache")

Response.Cache. SetRevalidation (HttpCacheReval idation.AllCach es)

Infortunately it doesnt always works.

Tips anyone?

/k


Nov 19 '05 #3
the warning only occurs if the page navigated to in the history was the
result of a post. if it was a GET, user typed url, or the server sent a
redirect, then the warning will not appear.

-- bruce (sqlwork.com)
"kurt sune" <ap*@apa.com> wrote in message
news:Oh******** ******@TK2MSFTN GP10.phx.gbl...
Nope,
some of the pages I am backing to still shows up. Usually the first and
third.

/k
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
Try : <%@ OutputCache Location="None" %> in your aspx page.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"kurt sune" <ap*@apa.com> wrote in message

news:e$******** ******@TK2MSFTN GP09.phx.gbl...
> Hi,
> I have checked this newsgroup and goggled in order to find out how to expire > the IE browser cache in order to ALWAYS get this text
>
> Warning: Page has Expired The page you requested was created using
> information you submitted in a form. This page is no longer available. As a > security precaution, Internet Explorer does not automatically resubmit your > information for you.
>
> To resubmit your information and view this Web page, click the Refresh
> button.
>
>
>
>
> when the user presses the back button in IE 6.0.
>
> I came up with this code:
>
> Response.CacheC ontrol = "no-cache"
>
> Response.Cache. SetExpires(Date Time.Now.AddSec onds(0))
>
> Response.Cache. SetCacheability (HttpCacheabili ty.NoCache)
>
> Response.Cache. SetValidUntilEx pires(False)
>
> Response.Cache. SetNoStore()
>
> Response.Append Header("Pragma" , "no-cache")
>
> Response.Cache. SetRevalidation (HttpCacheReval idation.AllCach es)
>
>
>
>
>
> Infortunately it doesnt always works.
>
>
>
> Tips anyone?
>
>
>
> /k
>
>



Nov 19 '05 #4
THANKS!!!!

now i get it.

"Bruce Barker" <br************ ******@safeco.c om> wrote in message
news:uX******** ******@tk2msftn gp13.phx.gbl...
the warning only occurs if the page navigated to in the history was the
result of a post. if it was a GET, user typed url, or the server sent a
redirect, then the warning will not appear.

-- bruce (sqlwork.com)

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
7228
by: What-a-Tool | last post by:
How does the expire date work setting it server side with asp. I know with javascript setting it client side it will be set to the clients local time, and therefore expire when the clients local time reaches the set expire-time. But if it is an expire time set on my server in California, and the cookie is put on a computer that is running on London Time, and the expire time is set at the server as 20 minutes from now, the London computer...
0
339
by: martin | last post by:
Hi, I am storing a dataset in cache, which is happening fine. I can easily retrive it at postback from the cache, cast it to a dataset and reuse it. However I have specified that the cache expire in 5 minutes like so. If Not IsPostBack Then BindMyDropDown() Else Response.Write("<hr>Cache Expires 5 minutes" &
13
2328
by: Veeresh | last post by:
I am using .Net 1.1. How to expire an .aspx page? I think I have to use HttpCachePolicy class for this. But not sure how to use and where to this code to work. Is it in Page_load event. Thanks Veer
2
3323
by: Dicky Cheng | last post by:
Hi, I am using absolute expiration to expire my cache object in Cache API. And I set it to expire after 60min. Then I test it, it cache, and everything fine. Then I stop working and lock computer (pc still running), then leave office. Second day I come to the office and unlock computer, the cache still doesn't expire! (It already exceed 60min). And I use the cache, and it still working. And after awhile, the cache start flushing. So I am...
2
495
by: mac | last post by:
Hi! I've searched the net for ways to expire a page immediately, so when the user hit 'Back', they receive the "Page Has Expired" error page and I've seen a number of posts on how to do it - with the code below: <% Response.ExpiresAbsolute = #1/1/1980# Response.AddHeader "cache-control", "no-cache" Response.AddHeader "pragma", "no-cache"
4
2829
by: Scott Shuster | last post by:
Hi, I've been searching and testing and have not yet found the answer I'm looking for. I have an ASP.NET (vb) application with an ecommerce function. When the user submits the page, I DON'T want them to be able to click on the 'BACK' button and get back to the form - they may inadvertently re-submit the page and get charged again. I WANT them to get the "Page has expired" message.
2
2877
by: Chris Davoli | last post by:
How do you expire pages so that the user can't hit the back button on his browser in Internet Explorer? I've tried the meta tag in the header that has an expires = 0 and also in vb.net Response.Expires = 0. Neither of these work in IE. What will expire pages so there are no pages to go back to in the cache in IE? This is the meta tag: <meta http-equiv="expires" content="0"> <meta http-equiv="pragma" content="no_cache"> <meta...
5
6804
by: =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post by:
I have a site which I secure with forms authentication. When the user's sign on and hit one of the secure pages, I have this line in my code to ensure that the browser does not cache the page; and someone cannot navigate back to an cached image of the page in theory after the user has signed off. Response.Cache.SetCacheability(HttpCacheability.NoCache); This works all right, except when the user decides to use the browser's back...
5
54173
by: vinodsk101 | last post by:
Hi all, I am developing a web application. I am using Servlet and JSP. After logout the user should not able to see the previous pages and page should navigate to loginpage.jsp. I have used following code : <% session.invalidate(); response.setHeader("Cache-Control","no-cache"); response.setHeader("Cache-Control","no-store"); response.setDateHeader("Expires", 0); response.sendRedirect("home.jsp");
0
9641
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10769
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10477
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10522
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7740
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4408
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.