哪些浏览器有问题缓存XMLHTT prequest的反应? [英] Which browsers have problems caching XMLHTTPRequest responses?

查看:150
本文介绍了哪些浏览器有问题缓存XMLHTT prequest的反应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

执行以下任一目前流行的浏览器有特别的问题缓存,我需要知道的* XMLHtt prequest反应?

Do any of the currently popular browsers have particular problems caching* XMLHttpRequest responses that I need to be aware of?

我希望能够包括XMLHtt prequest查询每一个页面的动态加载内容(即JSON)或行为(如的eval()的JavaScript)的相关网页的类型的方法,但希望确保它接收来自服务器的资源可以被缓存,如果服务器发送的权利报头

I'd like to be able to include XMLHttpRequest queries on every page as a method of dynamically loading content (ie JSON) or behaviour (like eval()ed Javascript) relevant to the type of page, but wanted to make sure that the resources it receives from the server could be cached, if the server sent the right headers.

我关切地阅读这篇文章,其中提到的浏览器如Firefox 1.1不缓存通过XMLHTT prequest获得的任何内容,而且它总是要求完全发送新数据(与Cache-Control和无的If-Modified-由于),无论服务器发送的报头。

I was concerned to read this article which mentions that browsers such as Firefox 1.1 do not cache any content obtained via XMLHTTPRequest, and that it always requests new data is sent completely (with Cache-Control and no If-Modified-Since) regardless of headers sent by the server.

显然,这篇文章很老了 - 我甚至不记得一个Firefox 1.1;那么,什么是我需要为当前​​流行的浏览器的考虑,是有什么诀窍时,我特别的需要的响应被缓存?

Obviously that article is very old - I don't even remember a Firefox 1.1; so what are the considerations I need to make for current popular browsers and is there any trick for when I specifically want responses to be cached?

*的为了澄清我的问题,通过缓存,我的意思是客户端缓存,其中服务器问题新鲜度信息(在一个缓存控制形式:最大年龄指令或到期日:头)和浏览器存储连同终止日期在其缓存中响应的一个副本,从而使从后续页发出相同的资源的未来的请求可以从浏览器高速缓存来满足,而不需要与服务器在所有的任何接触。所有主要的浏览器做正确的大部分内容,但我听说过的Firefox不能为XMLHtt prequest内容做到这一点。如果任何人知道的情况下,根据该规范使用XMLHtt prequest时,其中任何一个现代的浏览器不缓存响应的就是我要问的。

推荐答案

标记诺丁汉极好一套演示浏览器XMLHtt prequest缓存行为功能测试。加载了页面中,你要支持,并制定出你并不能依靠什么技术,让您的响应缓存的浏览器。

Mark Nottingham has an excellent set of functional tests that demonstrate browser XMLHttpRequest caching behaviour. Load up the page in the browsers you want to support and work out what techniques you can and cannot rely on to have your response cached.

这篇关于哪些浏览器有问题缓存XMLHTT prequest的反应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆