1

Basically the same as this question, but for Safari.

When I try to open an XML file (test.xml) on my local filesystem that references an XSL file (test.xsl) in the same directory, Safari doesn't render anything and instead only gives this error in the web dev console:

Unsafe attempt to load URL file:///Users/john/test.xsl from frame
with URL file:///Users/john/test.xml. Domains, protocols and ports must match.

Is there a way to tell Safari to treat local files from the same directory as same-origin?

Edit: I just didn't look hard enough. "Developer->Disable Local File Restrictions" does what I need, even though that seems to disable all local file restrictions, whereas I only want to be able to include files from subdirectories.

BlenderBender
  • 454
  • 3
  • 17
  • If that answers your own question, post it as an answer and not an edit to the question. – Rob Sep 28 '17 at 22:10
  • Thought you'd have to wait two days to *answer* your own questions; apparently, you only have to wait to mark it as correct. – BlenderBender Sep 28 '17 at 22:57

1 Answers1

5

You can disable all local file restrictions in Safari by checking Developer->Disable Local File Restrictions.

BlenderBender
  • 454
  • 3
  • 17