1

Using e.g. chromium, some PDFs can be read in the browser, with the URL of the PDF staying in the address bar e.g. http://www.africau.edu/images/default/sample.pdf, and some other can only be downloaded, then shown in the browser when they have been downloaded, e.g. https://www.ru.nl/publish/pages/769526/mark_vink.pdf will be downloaded then displayed with address file:///home/user/Downloads/mark_vink.pdf, after it has been downloaded.

Why is that?

I'm asking because it seemingly breaks the workflow for the Zotero Connector extension: PDFs that have been downloaded cannot be imported in Zotero, while the ones that are displayed (with the remote address) in the browser "natively" can be imported.

1 Answers1

2

The second URL reports an additional HTTP header:

Content-Disposition: attachment; filename="mark_vink.pdf"

This tells the browser that the document shouldn't be displayed inline (even if the Content-Type is recognized), but instead always handled as a download.

(The term 'attachment' is used because this header originally comes from MIME email messages, where it indeed means "show this file as an attachment".)

There are no other significant differences between the two URLs. They both report the same (correct) Content-Type: application/pdf and everything. I would say that it's a bug in the Zotero app if it's unable to handle files with such a Content-Disposition set.

grawity
  • 501,077