IE and Caching

T

tshad

I am having a problem with IE on one machine where it will not work after
the first time on certain pages. It appears to be going to the cache all
the time. On other machines I don't have that problem.

If I delete temporary files, it will work the first time.

If I close the browser and then open it again it won't work correctly,
unless I do a refresh on each and every page.

If I am going to my 3rd page, which depends on data kept in my session that
was put there from my 2nd page, it won't work.

I only seem to have this problem in IE.

Mozilla doesn't have this problem.

What is causing this and how do I get around it?

Thanks,

Tom
 
T

tshad

Juan T. Llibre said:
How are you caching ?
Post the method you're using.

I'm not doing anything that I have set up, specifically.

Where do I look to see what is being done?

I assume it is not something that asp.net is doing or it would affect
Mozilla as well as IE (wouldn't it?).

Tom
 
G

Guest

tshad,

Check Caching settins in Tools>Options>Settings and make sure that it is
"Automatically" or "Every visit to page".
 
T

tshad

suresh_C# said:
tshad,

Check Caching settins in Tools>Options>Settings and make sure that it is
"Automatically" or "Every visit to page".
That was it.

It was set to never.

But how do I deal with the user that has it set to "Never". My problem is
that I need to make sure that the user always checks (except for the back
button).

Thanks,

Tom
 
J

Juan T. Llibre

re:
I assume it is not something that asp.net is doing or it would affect
Mozilla as well as IE (wouldn't it?).

Actually, if you're caching the wrong way,
it could affect some browsers and not others.

Many programmers try to use "pragma" or old ASP caching methods.

The correct way to *not* cache in ASP.NET,
so that all browsers respect that command, is to use :

Response.Cache.SetCacheability(HttpCacheability.NoCache)

That way, the page won't even be stored in the cache,
so you won't have to go and delete it manually.

It will *always* be the "first time", so it should *alsways* work.
 
T

tshad

Juan T. Llibre said:
re:

Actually, if you're caching the wrong way,
it could affect some browsers and not others.

Many programmers try to use "pragma" or old ASP caching methods.

The correct way to *not* cache in ASP.NET,
so that all browsers respect that command, is to use :

Response.Cache.SetCacheability(HttpCacheability.NoCache)

Where does this go and do you put it in each page?

Tom
 
G

Guest

tshad,

We dont have access to this setting via Server, but
1) You can *request* browser and intermidiate proxy not to cache the page.
2) If you want a few pages must be passed through the server, attach random
number like current datetime to the form action. This will force all browser
to go to the server.
 
J

Juan T. Llibre

You can set it in the codebehind with that code.

If you are not using codebehind, you can set it as a
directive at the top of the page, after <%@ Page ... %>

i.e. :
<%@ Page Language="VB" %>
<%@ OutputCache Location="None" %>

or...

<%@ Page Language="C#" %>
<%@ OutputCache Location="None" %>
 

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

Similar Threads

Caching in IE 1
Directory Caching, suggestions and comments? 0
Caching question 1
Caching .. 4
Browser Caching Problem 3
Caching problems in IE 13
Please help me limit caching 5
Browser page caching 0

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top