开发者

What is the difference between cache for web pages and cache for ajax calls?

This anwser suggest "send 'no-cache' HTTP headers back with your response from the server." to work around ajax calls caching issues in IE.

With my limited knowledge, I assumed such a type of setting "no-cache" referred to grabbing a new page from the browser.

开发者_如何学JAVAHow is ajax caching tied to this functionality? One in the same? Differences?

Does no-caching in general just block a name value pair object from being sent to the server? - Which is the behavior I see when caching is enabled for an ajax call with the same previous name/values?


With my limited knowledge, I assumed such a type of setting "no-cache" referred to grabbing a new page from the browser.

Yes, if a server sends the Cache-Control: no-cache header, it means that the browser must not use a cached copy of the page for future requests, i.e. it forces the browser to re-fetch the page every time.

How is ajax caching tied to this functionality? One in the same? Differences?

There is no special cache for AJAX. It just happens that IE caches AJAX responses just like any other web page. Clearly, this leads to wrong results for multiple calls using the same URL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜