Internet explorer seems to feel the need to cache everything, which can turn a simple ajax request into an IE nightmare.
Add this to the top of your php script, and all your IE Ajax caching problems will be solved!
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
This entry was posted in PHP and tagged Ajax, PHP. Bookmark the permalink.
Beautiful post! I have been straining my hair for about 2 hours and your tip solved everything
Jonas, pleased to hear I solved your problem!
dude, you’re great!
great solution. will add this to the top of my php script.
Subscribe to all the Papermashup Tutorials and articles straight to your RSS reader.
Sign up and get all the Papermashup tutorials straight to your inbox.
Follow us on Twitter and get in-stream messages
4 discussions around IE Ajax Caching Issue