adi*_*dic 5 caching google-chrome attachment download
下载生成的 pdf 文件的其余端点,其中设置的响应标头为:
Cache-Control = public, max-age=600
Content-Disposition = attachment; filename=one.pdf
Run Code Online (Sandbox Code Playgroud)
(还设置了内容长度、编译指示、内容类型 = 应用程序/pdf)
在 IE 11 和最新的 firefox 中,浏览器缓存有效(即我可以在 firefox 缓存中看到 pdf url - about:cache)。我还检查了服务器在 max-age 指定的时间内没有被命中。在 chrome 中,我可以在缓存中找到 pdf url - chrome://cache,只有当我内联设置 Content-Disposition(在新选项卡中打开它)时。
有谁知道为什么当内容处置值是附件时缓存在 Chrome 中不起作用?这是预期的行为吗?
| 归档时间: |
|
| 查看次数: |
817 次 |
| 最近记录: |