rubing Posted June 25, 2008 Share Posted June 25, 2008 I have a slightly dynamic web page, which contains an event list and weather forecast (http://www.citymusicnow.com Since this content doesn't change more than several times a day, I was interested in making use of the "Last-Modified" and "ETag" http cache headers. This seems like a pretty simple thing to implement, however I am unsure as to how to go about determining the last modified timestamp. Is that info stored somewhere as a variable? php? mysql? any help greatly appreciated. thanks! Link to comment https://forums.phpfreaks.com/topic/111764-caching-on-slightly-dynamic-page/ Share on other sites More sharing options...
realjumper Posted June 25, 2008 Share Posted June 25, 2008 I'm not quite sure what you're asking, but this is how I prevent pages from being cached, if it's any help header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past Link to comment https://forums.phpfreaks.com/topic/111764-caching-on-slightly-dynamic-page/#findComment-573766 Share on other sites More sharing options...
rubing Posted June 25, 2008 Author Share Posted June 25, 2008 well, i want the client browser to use the cached version as long as the web page hasn't changed. i figure the way to do this is with the etag http header. but this header requires a last modification time to work. since my html is static, I guess i should just be looking for the mysql variable, which gives last modification time. Link to comment https://forums.phpfreaks.com/topic/111764-caching-on-slightly-dynamic-page/#findComment-573785 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.