Papermashup

Subscribe


Tweets


"RT @bethgordon: .@Tesco Please rethink archaic 'Approved by Mums'. Pretty sure it's not just mothers who make childcare decisions. https://…"

@ashleyford 3 days ago

"Is there ever a time that @DFS doesn't have a sale on?"

@ashleyford 6 days ago

Designer and web developer, Co-founder and Technical Director at Harkable.com. Previously I worked at Spotify, MySpace and InMobi. Contact me - ashley[at]papermashup.com

IE Ajax Caching Issue

AshleyAshley

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");

Designer and web developer, Co-founder and Technical Director at Harkable.com. Previously I worked at Spotify, MySpace and InMobi. Contact me - ashley[at]papermashup.com

Comments 4
  • charles
    Posted on

    charles charles

    Reply Author

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


  • anon
    Posted on

    anon anon

    Reply Author

    dude, you’re great! :-)


  • jonas
    Posted on

    jonas jonas

    Reply Author

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