caching ASP pages
anyway, I have set the cachecontrol on the response (equivalent to going Response.CacheControl = "Public") but I am noticing that the server is handling these pages over and over even though the url for these pages is still the same.
It's as if these pages aren't being cached and the browser is going back to the server each time. I've tried with both IE and Netscape with the same results.
Strangely, when I look in the Temporary Internet Files folder (for IE) the pages are there.
Am I missing something? How can I have these pages cached?
Here is what I put at the top of my database-related ASP pages to prevent caching:
Response.Expires = -1000
But I want these pages to be cached. Is this sensible or am I barking up the wrong tree?
My understanding is that without something like Response.Expires = -1000 or something similar that the pages would be allowed to be cached by the user's browser if his browser settings allow this.
In IE Tools | Internet Options | General tab | Settings button | Check for newer versions of stored pages...
I've added a bit that says...
Response.Expires = <some day a year from now>
and this gives me the behaviour I was after.
Without it, it seems the browser goes back to the server every page (except when you tell it to never look). With it, the browser can compare the date with it's version of now and decide whether to download it again.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)