[英]how to force ajax to use browser cache to not load the updated json file
might look like weired question. 可能看起来像是一个问题。 I have ajax call to json file, in request and response header nothing says don't use cache and in browser control Disable cache is not ticked.
我有一个jjax调用json文件,在请求和响应头没什么说不使用缓存和浏览器控件禁用缓存没有勾选。 what should I do more to force ajax not to load the updated json from my local???
我应该做些什么来强制ajax不要从我的本地加载更新的json ???
update: what I want is, I want to update the json in my local without getting updated on browser ajax call. 更新:我想要的是,我想在我的本地更新json而不更新浏览器ajax调用。
I am changing the last modified file attribute using following command: touch -d "4 days ago" 0.json 我正在使用以下命令更改上次修改的文件属性:touch -d“4 days ago”0.json
AJAX request cache follows the same rules as normal HTTP request cache. AJAX请求缓存遵循与普通HTTP请求缓存相同的规则。 It can vary from browser to browser.
它可能因浏览器而异。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.