Author |
Topic |
|
lofty
Junior Member
USA
158 Posts |
Posted - 15 March 2005 : 15:11:18
|
I'm having some problems with my forum pages getting cached. I don't want any of the .asp pages or their content to get cached, but using IE 6.0 they just keep getting cached no matter what I do.
For example, when I'm on forum.asp, I click New Topic, make a new post, hit "post new topic", and when I'm redirected back to forum.asp, the new topic doesn't show until I do a Ctrl + refresh.
Here's what I've done so far:
Client Side - WinXP SP2
I've set IE's Tools > Options to Check for Newer Versions of Stored Pages "Every Visit to the Page".
Server Side - Windows 2003 Server w/ FrontPage Server Extensions 2002
In config.asp, under the Response.Buffer = True line, I've put the following:
Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache" Response.Expires = -1
For the website's IIS properties, in the HTTP Headers tab, Enable Content Expiration is unchecked, meaning no expiration is set.
On the root website IIS properties, in the Application Configuration dialog's Cache Options tab, I have it set to "Do Not Cache ASP files".
And just in case FPSE is screwing things up, in the Performance Tuning section, I've defined a custom tuning option where no documents are cached.
What else can I do to get IE to stop caching? Everything works as expected with FireFox and Opera.
Thanks a bunch, Adam
|
|
-gary
Development Team Member
406 Posts |
Posted - 15 March 2005 : 16:01:33
|
Response.Expires = dateadd("d", -7, Now()) Response.ExpiresAbsolute = dateadd("d", -7, Now()) Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache"
Works every time for me and covers every loophole I believe. Doesn't mean that clients or proxies MUST obey, but they should. |
KawiForums.com
|
|
|
lofty
Junior Member
USA
158 Posts |
Posted - 15 March 2005 : 16:17:45
|
Great, that ExpiresAbsolute property really seemed to do the trick.
Thanks! |
|
|
|
Topic |
|
|
|