Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home

Automatically download PDF rather than loading it on the browser

By: miland on 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!
Custom Search
« January 2012 »
January
MoTuWeThFrSaSu
1
2345678
9101112131415
16171819202122
23242526272829
3031
free counters