Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No caching problem, page is still cached

Status
Not open for further replies.

toeter

Technical User
Apr 29, 2003
33
DE
Hi,

I have a caching problem

My page is an dynamic .ASP page, with content
that needs to be refreshed when the page is visited again
I have put the following in my head tag to make sure the page is not cached:

<META HTTP-EQUIV=&quot;PRAGMA&quot; CONTENT=&quot;NO-CACHE&quot;>
<META HTTP-EQUIV=&quot;Expires&quot; CONTENT=&quot;-1&quot;>
<meta http-equiv=&quot;cache-CONTROL&quot; content=&quot;no-cache&quot; />
<% Response.CacheControl = &quot;no-cache&quot; %>
<% Response.AddHeader &quot;Pragma&quot;, &quot;no-cache&quot; %>
<% Response.Expires = -1 %>

I think I have done all possible things to make sure
my page is not cached,

but when i push the &quot;back&quot; button, the contents (and the page) is not refreshed, which means the page is cached....

ANybody a sollution for this problem?

Toeter
 
well if u have done everything correctly the page itself wont display. ie when u click the back button u will get an IE message saying &quot;Page not found. Please Refresh&quot;. if it doesnt say that then first empty ur cache manually. now run the page and see...

Known is handfull, Unknown is worldfull
 
I use the code below and works perfectly for me.
Code:
<%
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader &quot;pragma&quot;,&quot;no-cache&quot;
Response.AddHeader &quot;cache-control&quot;,&quot;private&quot;
Response.CacheControl = &quot;no-cache&quot;
%>

Cheech

[Peace][Pipe]
If you don't stand up for something, you'll fall down. Toke it Easy.
Howard Marks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top