this.response.addHeader("Cache-Control", "max-age=0,no-cache,no-store,post-check=0,pre-check=0");
No words wasted! Getting to the point about the work I do, the problems I deal with, and some links to posts about where I work.
Translate
Thursday, June 28, 2012
AJAX - Prevent Page Caching
There were a couple of little things that caught me this past. The first one was how Internet Explorer is so aggressive about caching and it's really annoying when it caches AJAX results. I decided to deal with it in my Struts action by adding a header to my response like this:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Thank you for commenting!