Triggering automatic download when on a webpage

vicktard

New Member
Hi! I'm a novice and designing my first webpage. I'm hosting with GoDaddy and can't seem to get a function to work. I have uploaded a .pdf file and would like for it to prompt a user to download the .pdf file when landing on the page specified; ie: "website.com/downloads/champion.pdf"

and being able to download the file champion.pdf when landing on that page. Any suggestions? Thank you! :)
 

bcee

New Member
You can change the headers to send the PDF file with PHP or have a Javascript snippet to redirect the user to the PDF file. Most browsers can handle PDF files these days so it should work well, I have done this in the past. You should also post the code you are using to accomplish this.
 
Top