【发布时间】:2019-07-25 21:36:10
【问题描述】:
我构建了一个 Chrome 扩展程序,它从我的网站获取一些 JSON 文件
function updateTestReport()
{
fetch(http://somewebsite.com/file.json)
.then(response => response.json())
.then(data => {
//logic
});
}
它工作正常,但是,假设我更新了我的网站(包括 file.json),但现在仍在获取“旧”版本,除非我使用 CTRL + F5 刷新我的网站,有没有办法获取文件的最新版本?
【问题讨论】:
标签: javascript google-chrome google-chrome-extension fetch