coderb Posted May 27, 2008 Share Posted May 27, 2008 Hi All, I've got a simple AJAX routine that populates an incrementing field based on a ddl selected item. it works fine, but when I go back into the page, select the same item from the ddl, it should cause the field value to increment again, but IE 7 just uses the cached value - no doubt it assumes that because the selected value has not changed, I don't need a new result. I thought that adding the following the parent page would do the trick: this added before any html: Header("Cache-control: private, no-cache"); Header("Expires: Mon, 26 Jun 1997 05:00:00 GMT"); Header("Pragma: no-cache"); Header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT"); this in <head> tag: <META http-equiv="expires" content="0"> but still IE 7 does not work. Firefox, Opera and Safari are fine. when I delete the IE browsing history, then try again IE increments the value correctly. so how can I force IE 7 not to cache this value or not use the cached value? thanks for any help.. Link to comment https://forums.phpfreaks.com/topic/107427-solved-ie-7-caching-problem/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 27, 2008 Share Posted May 27, 2008 This is a pretty common problem. You need to add a dummy GET parameter to the end of the URL you are forming in the browser that has a random value or a value based on time. Link to comment https://forums.phpfreaks.com/topic/107427-solved-ie-7-caching-problem/#findComment-550700 Share on other sites More sharing options...
coderb Posted May 27, 2008 Author Share Posted May 27, 2008 hi PFMaBiSmAd, thanks for the help, being my first Ajax attempt, I wasn't aware of this (and much more) cheers Link to comment https://forums.phpfreaks.com/topic/107427-solved-ie-7-caching-problem/#findComment-550746 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.