Firefox and local files

Is there a way to access local files that are not in the current directory in Firefox?

I did it

about: config → security.fileuri.strict_origin_policy - false

from a comment in jQuery's.getJSON using local files that stopped working in Firefox 3.6.13 .

This is especially noticeable when I use jQuery.getScript () and call the file from a subdirectory or parent directory. He says that he is loaded, but does nothing with him, he appears.

+4
source share
1 answer

Is there a way to access local files that are not in the current directory in Firefox?

Yes, you set security.fileuri.strict_origin_policy to false . If you have already done this, your problem is caused by something else, and you need to ask another question (preferably with some code). I tested it with the following HTML file:

 <script type="text/javascript" src="jquery-1.6.2.js"></script> <script type="text/javascript"> jQuery.getScript("file:///.../test.js", function(data, status){ alert(status + ":\n\n" + data + "\n\n" + window.a); }); </script> 

With test.js will be:

 alert("Test succeeded"); var a = 1; 

With security.fileuri.strict_origin_policy set to true nothing happens (even a message in the error console). When it is set to false , I see the message "Test succeeded" , and then another message with the message success: alert("Test succeeded"); . As expected.

What is Firefox 6.0.1 for Windows 7 x64. Change Same thing with Firefox 3.6.21.

+4
source

All Articles