Forcing a file download vs opening a file when clicking a link...what's the best way to do this?
Hello all,
What is the best way to ensure that when a user clicks a download link on a web page that the file actually downloads as opposed to the file opening in whatever program can read it? For my case this encompasses two file types, video files (.wmv predominantly) and .pdf files. I want my users to browse the list I provide for them, then they select a link, click and the file downloads, NOT have them play/open.
I began researching this last night, and the best I could come up with was the suggestion to add "&action=3Dsave" to the file name as a query string. So, me being curious, I tried with no success to find out if this is A) the right way to do it or B) if that query string is proper code for today's standards.
I looked on the w3c.org website not knowing if this was something that was within their realm, but their website has been redesigned and is now so cinfusing to navigate that one has to become a software engineer to figure it out.
Any help on this would be most appreciated. Thanks!
Sincerely,
wordman