Chrome doesn't cache file download as attachem

2019-06-28 02:19发布

A rest endpoint that download a generated pdf file, where the response headers set are:

Cache-Control = public, max-age=600
Content-Disposition = attachment; filename=one.pdf

(also content-length, pragma, content-type = application/pdf are set)

In IE 11 and latest firefox the browser caching works(i.e I can see the pdf url in firefox cache - about:cache). I also checked that server is not hit for the time specified at max-age. In chrome I can find the pdf url in cache - chrome://cache, only when I set Content-Disposition inline(open it in a new tab).

Does anyone know why caching is not working in Chrome when content disposition value is attachment? Is this an intended behaviour?

0条回答
登录 后发表回答