Friday, June 12, 2009

Serving correct MIME-types for Office 2007 attachments on the web

Several of our users had problems with opening Office 2007-attachments in Internet Explorer. The browser identified the attachments as zip files.

The workaround for this is to set up the Domino server to send the appropriate MIME-type header.

The correct headers

Then you need to configure the Domino Server. We hoped it would be as easy as adding config documents to the "File Identifications" view. Alas, this didn't work.

What did work was modifying the httpd file in the data-directory of the server/refreshing http
(tell http refresh).

#   Office 2007
AddType .docm application/
AddType .docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
AddType .dotm application/
AddType .dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template
AddType .potm application/
AddType .potx application/vnd.openxmlformats-officedocument.presentationml.template
AddType .ppam application/
AddType .ppsm application/
AddType .ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow
AddType .pptm application/
AddType .pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
AddType .xlam application/
AddType .xlsb application/
AddType .xlsm application/
AddType .xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
AddType .xltm application/
AddType .xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template

Not sure if it is a bug that the "File Identifications" solution didn't work..? The server-version is Domino 8.5.


Dietmar said...

According to Admin Help, File Identifications in Domino Directory is used only for correctly encoding attachments sent through SMTP/POP/IMAP nail, not used by Domino http.

Dietmar said...

Oh, and thanks for the list. IMHO someone at IBM should add that to File Identifications out of the box, as well as make Domino http also use File Identifications instead of http.cnf

Fredrik said...

It is fixed i Domino 8.5.2

Jaime Bisgrove said...

Another "check" would be to make sure no compression (unsupported) has been added to the mime-type.

To check, go to Servers > All Server Documents > [your server] > Internet Protocols > HTTP > Zlib Compression Settings (this may be hidden by default).

To exclude office 2007 extensions, just add "application/vnd* to the "Exclude Mime Types" field.

I have used this compression setting to try and boost load times for uncompressed files. Try the following to speed up css and other uncompressed files files (note javascript is excluded do to issues with obfuscation):

Compress Mime Types: text/*, text\*, application/*.

Exclude Mime Types: 8/x*, text/javascript*, text\javascript*, text/html*, application/vnd*