Forum Moderators: open

Message Too Old, No Replies

ASP & Caching

         

brotherhood of LAN

9:51 pm on Feb 26, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How do you stop a page from caching? Im running an ASP page with some links into the results from the db.

If the last search is on page 3/3 for example, the next search will also end up on the last page or nearest to it

Of course, with every new search i want the 1st results to be displayed!

I assume this is a caching problem...so how do i stop the page being cached in the browser?

circuitjump

10:22 pm on Feb 26, 2002 (gmt 0)

10+ Year Member



I've had similar problems with ASP. Usually when I'm using a form. The way I cure it, which is not really curing it but close enough, is I upload the modified script as well as the form that I'm using it with or vise versa. That cures the little cache problem ASP gives me. Otherwise it keeps giving me the same results until I upload all the files the script is using. Even if they weren't modified.

Hope that helps

mattur

9:09 am on Feb 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need to add some response headers. See aspfaq.com How do I prevent my ASP pages from caching? [aspfaq.com]

casualsub

9:28 am on Feb 27, 2002 (gmt 0)

10+ Year Member



To allow for time differences between server and browsers I normally set response.expires to a large negative number, eg:

response.expires = -2000