Anyone seen a "Content Encoding Error" with file downloads in Firefox?
It seems that PDFs served by Sitefinity are working fine for us via IE, but when viewed with Firefox, we get a "Content Encoding Error" and with Google Chrome, it simply fails to download.
I think it might have to do with server compression or encoding. Any ideas where to start?
Have you verified the content-type served? It should be 'application/pdf' (see 1st screenshot).
You can alter it under Administration>settings>Advanced>Libraries>MimeMappings (2nd screenshot).
That is very helpful. I'll try those changes today.
You've posted on IIS dynamic and static compression in the past. Do you find any issues with compression and PDF or Word documents?
No, so far I've not run into any issues with regards to compression and documents (pdf/doc/etc) but I've not tried it with SSL. Easy to verify in your case by just dropping a pdf into the folder and call it with a direct url (would love to hear the results)...
I wonder if this old issue for Sitefinity 3 + Server 2008 + Google Chrome Browser would be related. We are using Server 2008 and Google Chrome. If Sitefinity 5 uses a similar upload mechanism to Sitefinity 3, it would explain the MIME type issues.
Threads also possibly related:
- PDF Links broke after upgrade to Sitefinity 4.4.2117.0 (mentions PDFs work in IE, but not other browsers)
- PDF file not opening on Mobile (issues opening a PDF on Android, but not other browsers)
The following warning was logged into IIS immediately after I had another failed PDF download with Google Chrome 18 and Sitefinity 5.0.2325. I do not understand what it means, but it might be useful to someone to solve this.
It says there is an "Invalid use of a response filter". Am I causing my own trouble with incorrect server setup, or is this a Sitefinity warning?
I hate to say this, but I think the internal PDF viewer in Google Chrome is part of the problem. It is just not as reliable as the Acrobat plugin used by the other browsers. At least when Firefox has an issue with PDF downloads I get a clear error message. With Google, just the white screen of death.
I don't have a librariesConfig.config file in my App_Data/Sitefinity/Configuration. The lines you mentioned are currently located in my Web.Config.
Is librariesConfig.config an optional config file? Could I put that code you suggested in my Web.Config?
I currently have the following in web config:
This error has taken me everywhere, but I *think* I have it fixed.
Hey, no problem at all. It had been working good for us until we discovered this Firefox PDF encoding issue.