IE doesn't honor Cache-control with location.href= calls

J

Jure Erznoznik

I make sure that all my pages have the Last-Modified and Cache-control
headers:

Last-Modified: Mon, 08 Aug 2005 12:08:25 GMT
Cache-control: max-age=86400, must-revalidate

While this works well for links and back button in IE 6.0, it fails for
Javascript location.href = "/" statement.
The cache-control header is provided so that IE doesn't squeak about page
being expired when the user presses the back button.

Does anybody know how to get around this?

Thanks,
Jure
 
N

Neredbojias

With neither quill nor qualm, Jure Erznoznik quothed:
I make sure that all my pages have the Last-Modified and Cache-control
headers:

Last-Modified: Mon, 08 Aug 2005 12:08:25 GMT
Cache-control: max-age=86400, must-revalidate

While this works well for links and back button in IE 6.0, it fails for
Javascript location.href = "/" statement.
The cache-control header is provided so that IE doesn't squeak about page
being expired when the user presses the back button.

Does anybody know how to get around this?

Thanks,
Jure

What fails? If you go to "/", how does the current page expiration come
into play?
 
J

Jure Erznoznik

Well, / represents a login screen when user is not logged in yet and main
app window when he is.
The problem occurs when I login, logout (which shows me the login screen
again) and then press "Cancel" button, which has location.href="/" OnClick
event. What I get is the app content from when i was logged in. Pressing
refresh of course shows the login screen again since the user is not logged
in.

Thanks for any feedback,
Jure
 
N

Neredbojias

With neither quill nor qualm, Jure Erznoznik quothed:
Well, / represents a login screen when user is not logged in yet and main
app window when he is.
The problem occurs when I login, logout (which shows me the login screen
again) and then press "Cancel" button, which has location.href="/" OnClick
event. What I get is the app content from when i was logged in. Pressing
refresh of course shows the login screen again since the user is not logged
in.

Have you tried using location.replace and/or a query string selectively
attached to the url?
 

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,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top