Custom Search
|
Automatically download PDF rather than loading it on the browser
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.
