Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我看到很多关于如何使用 IE 和 Ajax 修复过度激进的缓存的问题,但我似乎找不到任何关于他们为什么会这样做的信息。是否有理由缓存 ajax 调用?
缓存 ajax 结果是明智的,原因与缓存非 ajax 响应的原因相同。如果您已经在缓存中拥有数据,您不希望往返于服务器。如果您想强制进行行程,您可以指示数据不要通过响应标头进行缓存,或者使用各种其他方法进行缓存清除,例如将当前时间戳附加到请求的查询字符串。