IE opens file itself instead saving it
So I have a page where people can download an XML file with extension DDOC. In other browsers user can successfully save the file. The browsers wont try to open by itself the file. Is it possible to make the download page so, that IE wouldnt try to open the file itself 开发者_Go百科and would just ask user, what he wants to do (Save, Save As or Open file)? Or is it possible only when IE is set so that it wont try to open itself?
Try to configure your server so that file is served as application/octet-stream
type.
In this case browser will don't know what to do with it and ask user to save it.
The current mime-type of the downloaded XML file must be text/xml or application/xml. And IE must be opening it directly. Check how you can change the mime type of the file sent to the browser and change it to application/octet-stream
(thanx c-smile!). So the keyword you should be searching for is, MIME :)
We found a nice solution: Content-Type to application/force-download and it works like a charm so far:)
精彩评论