HTTP PUT invalidation not working?
I do the following using XMLHTTPRequest on IE 8:
- GET /myResource (with max-age set to a date far in the future)
- PUT /myResource
- GET /myResource
The last get should as far as I understand get a fresh resource from the server even if the first request has not been expired.
But IE just gets the resource out of the cache.
Is this a know开发者_开发百科n IE issue or is it correct behaviour?
This is a known IE behavior, try disabling cache
, if you are using JQuery make sure cache: false
, otherwise you can probably do something like this:
function random() {
return Math.floor(Math.random()*1000);
}
And here you can append random as a variable to your request, such as:
"here/be/url?random="+random+"";
精彩评论