Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home
Custom Search

Automatically download PDF rather than loading it on the browser

Published by: miland
Jan 30, 2010 05:53 PM

I'd been looking for some solution on how to make my pdf's to automatically download instead of loading to the browser, I first think of some javascript that would force downloading my pdf rather than loading but the problem with javascript is that some user turned off their javascript and also popup blocker will render my javascript disabled as I am using a popup window on my javascript to instruct the dowloading of my pdf.

The most effective solution I have found is using the .htaccess by tricking the browser that all of my pdf files should be treated as attachement and a binary making the browser to download my pdf instead of loading it.

Document Actions
Interested to learn PHP? Check this out!
« February 2010 »
February
MoTuWeThFrSaSu
1234567
891011121314
15161718192021
22232425262728
free counters