Reputation: 154
If I set AJAX cache to false using:
$.ajaxSetup ({
cache: false });
Then my resulting AJAX URL has the characters &_=1381901096821 added to the end so that the browser (especially IE) sees it as a new page request.
The resulting call is: eg =1381901096821">http://MyServer/authcheck?=1381901096821
But I don't want that value attached with the URL. Is there any way to remove it?
Thanks in advance.
Upvotes: 1
Views: 150
Reputation: 78595
You can set cache to true:
$.ajaxSetup ({
cache: true
});
Then manually add no-cache headers:
$.ajaxSetup({
beforeSend: function (xhr)
{
xhr.setRequestHeader("Cache-Control", "no-cache");
xhr.setRequestHeader("Pragma", "no-cache");
},
});
Upvotes: 1