现在有没有一种跨浏览器和标准兼容的方法来防止使用XMLHttpRequest时缓存?
到目前为止,即使是MDN也建议了一种变通方法。(MDN XMLHttpRequest#Bypassing_the_cache)
(如Add a random query string to the URL you are sending.)
编辑:问题是告诉浏览器不要使用它的客户端缓存,独立于服务器作为标志或字段发送的内容。
发布于 2016-03-13 21:07:39
您可以控制使用Cache-Control标头缓存数据的方式
类似这样的东西- cache-control: private, max-age=0, no-cache
点击此处了解更多信息-- http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/ https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=en
https://stackoverflow.com/questions/35970487
复制相似问题