You can use the following http headers:
Content-Type: application/pdf
Content-Disposition: inline; filename="filename.pdf"
This ensures that the browser will always display it on the browser window.
Very useful! Thanks for giving an explanation for this problem that most people will run into in web engineering at some point
Comments