Many of us thrifty WSS v2 admins have turned to IIS Compression to temper some of the "Why is Sharepoint so sloooooooow?" questions that we get. Maurice Prather wrote up a great blog entry at Bluedog Limited
on how to get IIS Compression up and working with WSS v2. He included a link to KB article
that provides a fix for ZIP files not working after IIS Compression is enabled. All in all it's a damned good read and very comprehensive. I know my company's WSS installation has benefited from it great. Thanks Maurice.
Over the months since we've been running with compression we've noticed some problems with PDF files, and it seems like we aren't the only ones. If you try to open a PDF file on a server running IIS Compression the window will open, but the document won't show up. If you refresh the page your PDF will download all is well. Recently another user reported this problem and I decided it was time to figure it out. I've recently learned a little about PDF files and it all came together. PDF files are compressed
, very similar to ZIP files in that regard. I tried alternating the MIME type for PDF files in the same way I did to make ZIP files work originally, per the KB article. An IISreset later and it looks like it works. PDF files open as expected and compression is still turned on.
I did a little bit of testing on this to verify I wasn't just getting a cached copy. I flushed IE temporary files, rebooted between tests, and tried on five different clients. I tested it against servers with no compression, compression and compression with altered MIME types. It all seemed to work as I expected it would, with one exception. If I hit the server with compression and altered MIME type, and THEN hit the server with only the compression, it still seemed to work. Not what I expected. I assume IE is keeping a hold of the altered MIME type.
If you use this, please let me know if your experiences match with mine. I want to make sure this is all accurate.