papaface Posted February 22, 2009 Share Posted February 22, 2009 Hello, I am trying to find a way of improving the user experience for my website. The site is heavily reliant on AJAX and PHP. The problem we've encountered is when we change the javascript on the site it causes problems as people are using the old cached files. I want to make a small script that will force the browser to reload each page the user visits, however I don't want this to happen every time the user visits. This is where PHP comes in. I'm thinking of creating a cookie that the script will look for and only include these headers if the user either does not have the cookie, or the cookie was set BEFORE the date the update was pushed to the site. Any help would be appreciated, as this situation is very confusing for me lol HTML headers: <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> <META HTTP-EQUIV="Pragma-directive" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Directive" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="0"> Link to comment https://forums.phpfreaks.com/topic/146365-clearing-cache/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.