How do I stop pages being cached

Results 1 to 9 of 9

Thread: How do I stop pages being cached

  1. #1
    Stewart Hutcheon Guest

    Default How do I stop pages being cached

    I want to make sure that when a user clicks back/forward on the browser (ie or netscape), the asp page is reloaded, rather than cached. I have tried all sorts of combinations of response.expires etc. but none of them seem to work. Surely there must be a definitive way to do this.<BR>Thanks In Advance<BR>Stewart<BR>

  2. #2
    Conrad Guest

    Default RE: How do I stop pages being cached

    Add this line to your code:<BR><BR>&#060;% Reponse.Expires = 0 %&#062;<BR><BR>The number zero is the number of absolute minutes until the page expires. You can replace that with a #DateTime# format.<BR><BR>Conrad

  3. #3
    Franco Guest

    Default Response.Expires=0 DON'T WORK

    I had problems too, I looked up the 4rollaguys archive and I saw something in there about response.expires=0 setting the expiry date to the end of the current day (not much use unless your site is for medical students). Try doing a search under response.expires and see what gets dredged up.<BR><BR>hth<BR><BR>Franco

  4. #4
    Raoule Duke Guest

    Default <%Response.Expires=Now()-1%>

    You&#039ll find this answer to this in the messageboard FAQ:<BR><BR><BR>&#060;% Response.Expires = Now()-1%&#062;<BR><BR>- Raoule

  5. #5
    Join Date
    Dec 1969

    Default RE: How do I stop pages being cached

    Hi Stewart, If you are using IE5, just forget that you can avoid caching. I faced similar problem and got thousands of suggestions from all over the world, nothing works. Microsoft is too busy in the litigation to acknowledge this problem. Bear with it. No way out.

  6. #6
    different name every time Guest

    Default RE: How do I stop pages being cached

    Can&#039t help you on the page caching, but if you happen to be tracking impressions on ads, you can bust the cache for an image by adding "?cache=&#060;%=Now%&#062;" to the image name.

  7. #7
    Skippie Guest

    Default This way out...

    The following works for IE5. To prove it, on IE5, select: Tools,<BR>Internet Options, Settings, Never. This will tell IE to ALWAYS<BR>use cached pages. However, the code overrides it. As for the <BR>forward and back buttons, IE will display a message to the user<BR>that the page cannot be displayed and it has to be refreshed. <BR><BR>Good luck with it!<BR><BR>&#060;%<BR>Response.ExpiresAbsolute = Now() - 1<BR>Response.Expires = 0<BR>Response.CacheControl = "no-cache"<BR>%&#062;<BR><BR><BR><BR>-- Skippie

  8. #8
    Mark Guest

    Default RE: This way out...

    Under which event do you call this? Thanks!

  9. #9
    Skippie Guest

    Default RE: This way out...

    Just place it on top of the page with no event caller.<BR><BR>Then IE5 will always do a reload instead of using cache.<BR><BR>-- Skippie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts