Caching

Author
Discussion

PetrolTed

Original Poster:

34,443 posts

310 months

Monday 4th November 2002
quotequote all
Just noticed that whilst I'm dialing in using Freeserve that the home page is being cached and can misleadingly look out of date.

Can any webbies help me stop this?

I'm currently using:

meta http-equiv="Pragma" content="no-cache"
meta http-equiv="EXPIRES" content="0"

Cheers,
Ted

Bonce

4,339 posts

286 months

Monday 4th November 2002
quotequote all
I use these four lines in the top of an ASP to stop the page being cached:

' prevent the page from being cached
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"

PetrolTed

Original Poster:

34,443 posts

310 months

Monday 4th November 2002
quotequote all
The home page isn't ASP, it's HTML.

Bonce

4,339 posts

286 months

Monday 4th November 2002
quotequote all
You could try this:

META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT"


>> Edited by Bonce on Monday 4th November 10:36

CarZee

13,382 posts

274 months

Monday 4th November 2002
quotequote all

PetrolTed said: The home page isn't ASP, it's HTML.
how quaint

PetrolTed

Original Poster:

34,443 posts

310 months

Monday 4th November 2002
quotequote all

CarZee said:

PetrolTed said: The home page isn't ASP, it's HTML.
how quaint


It's generated automatically but I'd rather have an HTML page there than hit the database with more queries.