I'm creating a web page with a link to a PDF file.
I have been asked to set up the link so that the user can click the link once and see the PDF. Here's what I've tried so far:
One way is to simply put <a href="XXX.pdf" target="_self">PDF</a>
in the HTML
The other is to make the link trigger Javascript: window.open("XXX.pdf", "_self");
Either way, IE always shows a prompt that says, "Do you want to open or save XXX.pdf", so that the user must click again to open the file. I get similar results in both Chrome and Firefox.
I have been asked to set up the web site so that the user can open the PDF with one click. How can I do this? I suspect that maybe I need to set the response headers on the web server a certain way. My web stack is ASP.net