3

I'm on MacOS Sierra. When I click on a link to XML file, Safari downloads it. Instead I want to view the XML right in the browser. Is there a way to accomplish this?

2
  • 1
    Safari seems to show XML files as XML, at least for me. Could you try viewing this?
    – saagarjha
    Commented Jan 23, 2017 at 20:17
  • I was able to view it! Oddly, when I try to open any maven-metadata.xml in my company's internal Artifactory repo, it promptly downloads it.
    – akirekadu
    Commented Jan 23, 2017 at 22:21

2 Answers 2

3

Safari does open XML files, unless the server specifically tells Safari to download the file.
It's currently not possible to override the server's instruction to download instead of view.

1
  • Honestly that's a better question. "Can you override download headers in safari?". Commented Oct 29, 2018 at 11:50
2

Just faced this problem while trying to download an XML instead of opening it in Safari.

Turned out you just have to File > Save As > Source Code For me, it was saved as pure XML.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .