Reputation: 14815
When I call:
$("#id").load("file.php");
Internet Explorer 9 uses a cached response of file.php
instead of take the updated response.
At the moment the only solution I've found is to use:
$("#id").load("file.php?random=" + Math.random() );
But it doesn't looks a nice solution.
How could I do?
Upvotes: 1
Views: 121
Reputation: 22652
I have seen this problem in IE8
Similar to what you posted in the question, we used to use the following
url = url +'?rnd=' + Math.random();
However after reading jQuery caches AJAX request in IE even though cache: "false" is set, I am planning to use cache: false
Upvotes: 1