IE does not open "application/vnd.openxmlformats-officedocument.wordprocessingml.document"

jschneeberger picture jschneeberger · Jun 28, 2013 · Viewed 11.7k times · Source

I have a spring mvc application that returns *.docx files (generated using docx4j). I send them to the browser with content type "application/vnd.openxmlformats-officedocument.wordprocessingml.document". This works as intended in firefox, chrome, and opera such that the browser offers to save or open the file using word. However, when I try to do this with MS internet explorer, the returned contents is displayed directly in the browser window.

When i use the same link for a right click and "save as" docx file, the file is stored correctly and may be opened using word.

Btw. everything works correctly in IE when I send "application/vnd.ms-excel" or other mime types.

Any ideas what's going wrong?