dennismonsewicz Posted May 8, 2008 Share Posted May 8, 2008 Is there a way in PHP to tell a particular page (or whole website) to not cache in a users cookies? Quote Link to comment Share on other sites More sharing options...
marklarah Posted May 8, 2008 Share Posted May 8, 2008 Why would you need this? Users more often than not want caches for quicker loading times, unless your running a "website" ;) In which case bugger off (jokes, but srsly, don't) Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 8, 2008 Author Share Posted May 8, 2008 well the reason i was wondering if this could be done is because there are a lot of times that our server doesn't always load the latest and greatest updated code. So if you are coding and uploading a lot and not paying attention you forget to do a hard refresh at times. Just wondering Quote Link to comment Share on other sites More sharing options...
realjumper Posted May 8, 2008 Share Posted May 8, 2008 well the reason i was wondering if this could be done is because there are a lot of times that our server doesn't always load the latest and greatest updated code. So if you are coding and uploading a lot and not paying attention you forget to do a hard refresh at times. Just wondering When I want the latest version page to display rather than a cached version of the page, I do this.... header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.