XML Files opening in the browser instead of prompting to Save or Open RRS feed

  • Question

  • We have a website where we redirect to xml files. The standard OS is Windows 7 and the standard browser is IE 11.

    On some machines, IE11 prompts to Open, Save or Save As.

    While on some machines, IE 11 renders the xml.

    What settings control this behaviour?

    We want the browser to prompt the user to Open, Save or Save As the file.

    • Edited by APBoston Tuesday, October 3, 2017 5:24 PM
    Tuesday, October 3, 2017 5:17 PM

All replies

  • Hi,

    SharePoint has formserver.aspx that you can use to render document properties pages in a html gui instead of raw xml. Rendering raw xml data in a browser window is not user friendly.

    see the answer given here -

    IE uses MIME type sniffing.. You could use the Networking tab on the dev tool (f12) to find out the mime type of the returned 'xml' file if indeed the file has an .xml extension. Any 'text' file with any extension can contain xml markup (xml==extensible markup language). eg can use the xml mime type, even though it does not use the xml filename extension.

    You configure the mime type used on different file extensions on sharepoints' server console. If you are observing only some of your client machines not currently opening xml (if they are in fact suffixed with .xml) it is because the clients' registry does not have an opener application for the file extension of the downloaded file.

    Using sharepoints' formserver.aspx in your links should automatically handle xml data file rendering in a user-friendly format instead of the raw xml data format.

    Questions about coding your sharepoint web sites should be addressed to a sharepoint forum. SharePoint is a special kind of web server/site. To avoid confusion you should mention that it is indeed a sharepoint web site in your questions and not just a 'web site'..


    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions.


    Wednesday, October 4, 2017 7:15 AM
  • This is not a Sharepoint site.

    This is a website hosted by IIS.

    I understand that IE is going to sniff the MIME type of the http response and run some "magic" behind the scenes to determine how it should render or act on that response. I assume the configuration for this behavior is somewhere - probably the registry.

    What I am looking for is the keys from the registry i can look at on the client machines that this works on and hopefully export those keys to client machines where it doesn't work.

    Wednesday, October 4, 2017 1:11 PM
  • IE settings and GPO settings for IE are stored in the Registry...if some workstations and some are not, then some users have changed their IE settings.

    You first test would be to be to reset the Security zone settings for IE on the faulting workstation(s). Security zone tab, click "Reset all zones to default".

    To diagnose which settings may be different...

    use the Networking tab of the dev tool to find out the extension of the 'xml' file and its mime-type response. (any file extension can be used on text files containing xml markup.) What are your IIS mime-type settings for a file with that extension. (it may not be .xml)... depending on your IIS version some file extensions may not be mapped to the correct mime type.

    use the Emulation tab of the dev tool to find out which IE version Emulation mode is being used and how it was established... are they what you expect? eg. IE8 - Enterprise Site Mode List.

    all clients should be using the default IE security zone settings... Tools>Internet Options>Security tab, click "Reset all zones to default"

    Tools>Manage Addons>Show all addons>.... XML Dom Document and XML HTTP (32 and 64bit versions) should be enabled.

    If possible include links to the websites you are having problems with your questions so that we can inspect your server responses. Naturally, company intranet sites are not publicly accessible.


    Thursday, October 5, 2017 8:39 AM