473,387 Members | 1,573 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

HTTP header immediate expiration and Page_Load in asp.net

I've set my aspx page to expire immediately using the management console,
HTTP headers tab. Considering this scenario:
a user visits the aspx page in question, then moves to another page, then
hits the Back button to return to the page in question. At that point,
shouldn't the Page_Load event fire for the page since it was set to expire
immediately?
Thanks
Timo

Nov 19 '05 #1
2 1993
Timo wrote:
I've set my aspx page to expire immediately using the management
console, HTTP headers tab. Considering this scenario:
a user visits the aspx page in question, then moves to another page,
then hits the Back button to return to the page in question. At that
point, shouldn't the Page_Load event fire for the page since it was
set to expire immediately?


No. Back button behaviour is unfortunately browser-specific. Many
browsers even adopt their behaviour depending on what Cache-Control
header they receive, or whether the underlying connection is secure or
not.

In addition to Expires (which isn't really that useful anyway), try
Cache-Control: no-cache or Cache-Control: max-age=0.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #2
Thanks, Joerg. Setting No-cache in code-behind has the desired effect, as
you suggested.
Timo
"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:xn***************@msnews.microsoft.com...
Back button behaviour is unfortunately browser-specific. Many
browsers even adopt their behaviour depending on what Cache-Control
header they receive, or whether the underlying connection is secure or
not.

In addition to Expires (which isn't really that useful anyway), try
Cache-Control: no-cache or Cache-Control: max-age=0.

Nov 19 '05 #3

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

Similar topics

2
by: Rob Douglass | last post by:
Hi all, I have a site that is compeletely restricted by form authentication. In the case where a user's cookie expires and then they click on the logout button on the site, the authetication...
1
by: Mario Hébert | last post by:
I have a simple C# object(class) that I reference in a <OBJECT classid="mydll.dll#nmsp.Ctrl"> tag of an HTML page generated by ASP.net. In a case where the Enable content expiration isn't checked...
0
by: TR | last post by:
If mypage.aspx is set to expire immediately using the management console page properties dialog, HttpHeaders tab, -- does the expiration setting take effect as soon as the dialog changes are...
6
by: ragunath.cr | last post by:
Is it possible to read & modify TCP header using C. Also I want a sample C code for this. Please reply immediately.
0
by: mohdowais | last post by:
I have just stumbled upon an what seems to be a very under-rated feature in IIS - the "Enable Content Expiration" option under a website's properties. I have an ASP.NET web application that has a...
0
by: ibiza | last post by:
Hi, I am trying to use ASP.NET caching like that : Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not (Cache("test") Is Nothing) Then...
2
by: sck10 | last post by:
Hello, Can someone provide a simple example of how to use the immediate window with ASP.NET? No matter what I type, I get the following statement: The expression cannot be evaluated while in...
4
by: Joseph Geretz | last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with authenticated session information. Given the following implementation for our Logout method, I vastly prefer to simply code...
2
by: helveticus | last post by:
I'm having difficulties setting the expires header for images and css files in my compression HttpModule. Compression is carried out by context_BeginRequest and works fine (code not shown)....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...

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.