For the past year this has been a problem with the server this website has been hosted on; it was the strangest thing ever that I could not understand. If you tried to view a PDF file you placed on the web server with Microsoft Internet Explorer with Adobe's Acrobat web plugin on Windows (a very common configuration), you would get an error about the PDF being corrupt and that it could not be opened.
It worked everywhere else: Mozilla Firefox and the Adobe Acrobat web plugin on Windows, with zero problems with any combination of browser and PDF viewer on Linux and OS X.
Apache 2.0's documentation on mod_deflate suggests to compress everything except image files:
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-varyThe problem with this: there are many filetypes left out that don't compress well, and can cause problems--like PDFs combined with Internet Explorer and Adobe's Acrobat plugin.
The solution, add the rule:
SetEnvIfNoCase Request_URI \.(?:pdf)$ no-gzip dont-varyThis prevents PDF files from being compressed with mod_deflate. It's also useful to add such files as MP3s, zips, and rars.
These other articles I've written may be interesting to you as well:
Recent comments
3 weeks 2 days ago
8 weeks 8 hours ago
8 weeks 10 hours ago
9 weeks 4 days ago
9 weeks 6 days ago
11 weeks 5 days ago
11 weeks 5 days ago
12 weeks 6 hours ago
12 weeks 1 day ago
12 weeks 2 days ago