无论查询字符串参数如何,是否可以在浏览器中缓存文件?
例如为两者加载相同的缓存资产:
https://example.com?value=foo
https://example.com?value=bar
无论查询字符串参数如何,是否可以在浏览器中缓存文件?
例如为两者加载相同的缓存资产:
https://example.com?value=foo
https://example.com?value=bar
是的,它是Cache.match(request, options)方法可用选项的一部分: ignoreSearch.
因此,在检查您的缓存时,将此选项设置为 true,这两个请求将被视为相同。