Jump to content

No caching


coolgamer48
 Share

Recommended Posts

Hey,I'm using the following code to prevent caching on two pages:

	//No caching	header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");	header("Cache-Control: no-cache");	header("Pragma: no-cache");

However, it only works with one of them. The source code of the two pages are almost completely identical (except one says: This is page 1, go to page 2, and the other says, this is page 2, go to page 1).I do believe that the page is indeed caching despite this code, but I do suppose it could be another problem (the site uses a 'user' cookie that I want to be loaded every time the page opens - but sometimes on page2, it says Hello guest even though I'm signed in, or Hello [user] even though I'm signed out.Can someone plz help, this is rlly bugging me.

Link to comment
Share on other sites

Try out Fiddler to verify if the page is cached or not.Also ensure your browser doesn't have some sort of werid caching settings on. For example, using Firefox with Fasterfox may result in some sort of extra caching features.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...