I've got some swf files linked to my website, and currently, when clicking on the link, it opens the content in a new window, however I want to make the file downloadable when the link is clicked, how to do this?
Jump to Post
You could instruct your users to "right click and select save on disk" or something like that. If that's not what you want, there are some headers you can use for this. Copied from http://elouai.com/force-download.php:
header("Pragma: public"); // required header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); …
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.