IE7 cuts out the file extension ?

Hi,

I have a servlet written in Java which authenticates the user against the server and then opens TIFF / TIF images in Microsoft Office Document Imaging - or what ever application is associated with the .TIFF / .TIF . When I run the application in IE6 I am prompted with the message "Do you want to Open or Save this file " and the name of the file is displayed as the name of the servlet.tif and the Type is recognized as TIF. When I run the same application in IE7 it gives the message "Do you want to save this file, or find a program online to open it ", the file name contains only the name of the servlet - without the extension and the Type is Unknown File Type. Why IE7 doesn't recognize the file type - the way IE6 does Is there something I need to specify when sending the file to the browser



Answer this question

IE7 cuts out the file extension ?

  • soma34

    Have you got a content-type header, i.e.:-
    Content-Type: image/tiff

    IE6 erroneously used the file extension and data sniffing to detect the content-type, when the only thing that should be used is the Content-Type HTTP header. I wasn't aware this had changed in IE7 but that maybe the case.


  • Mohsen Kokabi

    Thank you very much for your reply.

    Yes, actually I have tried with setting the content type to application/tif, image/tif and application/tiff - but still got the same result - works fine on IE6, but not on IE7. Then I set the content type to image/tiff and it works in IE6 and IE7 !!! The only difference is that IE6 present it as .tif and IE7 as .tiff - but since I have the mapping of both file types with the same application - it opens correctly. I really don't understand why it is happening like this.


  • jortiz

    I am having a similar issue. I am using a dashboard and when I choose to output a report to Excel I get the same message, "Do you want to save this file, or find a program online to open it " I am unsure how to "make" IE7 see it as excel. Any help

  • IE7 cuts out the file extension ?