Reputation: 491
I want to know the difference between some links of PDF files. Sometimes is possible to oepn the PDF file without download it, in other situations the file just starts downloading when you click the link. Why does it happen?
Example that opens the PDF file:
https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf
Example that downloads the PDF file: http://www.novapdf.com/uploads/novapdf_en/media_items/pdf-example-bookmarks.original.pdf
Another question: how to make a link that downloads a PDF file just a link that shows the file? Is it a server side configuration? How can I configure it?
Upvotes: 0
Views: 164
Reputation: 844
It's because of Content-Depositon
header. This header indicates that the resource should be displayed inline or as an attachment.
If you want to change the behavior of a link, you should add that header to the response. So, yes it's server side related.
For more information this link might be helpful.
Upvotes: 2