Chrome doesn't cache file download as attachement (Content-Disposition = attachment; filename=one.pdf)
Asked Answered
S

0

6

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?

Snuffer answered 18/9, 2017 at 7:10 Comment(1)
Did you find a work around for this ?Treytri

© 2022 - 2024 — McMap. All rights reserved.