Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
17
rated 0 times [  18] [ 1]  / answers: 1 / hits: 16962  / 15 Years ago, thu, june 4, 2009, 12:00:00

How to prevent browsers from caching Ajax results? I have and event triggered Ajax script the displays results only when the browsers data has been cleared.



Tested in IE6 and Firefox 3.0.10


More From » ajax

 Answers
50

Add a random query string to the URL you are sending.



E.g. if the Ajax request is sent to http://www.xyz.com/a
then add a random string at the end: http://www.xyz.com/a?q=39058459ieutm39


[#99388] Sunday, May 31, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
josefn

Total Points: 251
Total Questions: 93
Total Answers: 84

Location: Senegal
Member since Fri, Aug 21, 2020
4 Years ago
;