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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top