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 06: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
« May 2012 »
May
MoTuWeThFrSaSu
123456
78910111213
14151617181920
21222324252627
28293031
free counters