Force to open “Save As…” popup open at text link click for PDF in HTML

后端 未结 18 1343
無奈伤痛
無奈伤痛 2020-11-22 10:28

I have some big size PDF catalogs at my website, and I need to link these as download. When I googled, I found such a thing noted below. It should open the \"Save As

18条回答
  •  攒了一身酷
    2020-11-22 11:13

    A really simple way to achieve this, without using external download sites or modifying headers etc. is to simply create a ZIP file with the PDF inside and link directly to the ZIP file. This will ALWAYS trigger the Save/Open dialog, and it's still easy for people to double-click the PDF windows the program associated with .zip is launched.

    BTW great question, I was looking for an answer as well, since most browser-embedded PDF plugins take sooo long to display anything (and will often hang the browser whilst the PDF is loading).

提交回复
热议问题