No-Cache problem on the first time

F

Frank

I would like to close the cache, so I put the following statement on the
head of A.aspx,
<%@ OutputCache Duration="1" Location="None" VaryByParam="None"%>

However, when I view that A.aspx, and click one link to B.aspx, in there
something about page A.aspx is changed. Then I click BACK button to view
page A.aspx, IE shows Page not found error message in the first time. If I
press F5 to refresh, IE shows ok again. Now if I click the link to B.aspx
and click BACK button again, this time IE shows ok. ONLY FIRST TIME, IE
shows error message.

How to make IE always show ok?

---Frank
 
J

Joerg Jooss

Frank said:
I would like to close the cache, so I put the following statement on
the head of A.aspx,
<%@ OutputCache Duration="1" Location="None" VaryByParam="None"%>

However, when I view that A.aspx, and click one link to B.aspx, in
there something about page A.aspx is changed. Then I click BACK
button to view page A.aspx, IE shows Page not found error message in
the first time. If I press F5 to refresh, IE shows ok again. Now if
I click the link to B.aspx and click BACK button again, this time IE
shows ok. ONLY FIRST TIME, IE shows error message.

How to make IE always show ok?

That message is by design. IE warns you that refreshing the page will
resubmit your form data. This can lead to all kinds of undesirable side
effects in your application, if your code isn't capable of dealing with
this issue.

The message only shows when you try to repeat POST requests, which are
normally used to send form data. Clicking a simple hyperlink sends a
GET request though, which is *supposed* to be safely repeatable, thus
no message is shown by the browser.

Cheers,
 
F

Frank

Joerg Jooss said:
That message is by design. IE warns you that refreshing the page will
resubmit your form data. This can lead to all kinds of undesirable side
effects in your application, if your code isn't capable of dealing with
this issue.

The message only shows when you try to repeat POST requests, which are
normally used to send form data. Clicking a simple hyperlink sends a
GET request though, which is *supposed* to be safely repeatable, thus
no message is shown by the browser.

I got it, and thanks very much.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top