IE Ajax Caching Issue

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 , . Bookmark the permalink.
Comments
4 discussions around IE Ajax Caching Issue
  1. jonas says:

    Beautiful post! I have been straining my hair for about 2 hours and your tip solved everything :)

  2. Ashley says:

    Jonas, pleased to hear I solved your problem! :)

  3. anon says:

    dude, you’re great! :-)

  4. charles says:

    great solution. will add this to the top of my php script.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribers
1,250
Twitter
510
Comments
1,207
Posts
125