如何衡量选项 "Disable Cache" 在 Chrome 中是否处于活动状态(通过 javascript)

How to measure if the option "Disable Cache" is active in Chrome (via javascript)

我愿意创建一个 Chrome 扩展,如果选项 Disable Cache 被禁用,它会提醒用户,因为人们可能 运行 不情愿地反对缓存。 如果 Chrome DevTools 选项 Disable Cache 处于活动状态,是否有一种方法可以在 javascript(也许 Chrome 扩展 API?)中进行测量? 请求中是否添加了某个header?

可以通过 chrome.devtools.network api 和 .onRequestFinished 事件检测到 cache-control: no-cache header。