Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3690554
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:02:53+00:00 2026-05-19T04:02:53+00:00

Suddenly, local file access using jQuery’s .getJSON is not working for me on Firefox

  • 0

Suddenly, local file access using jQuery’s .getJSON is not working for me on Firefox (3.6.13) – only.

I am aware of the problem in getting this to work in Chrome – Problems with jQuery getJSON using local files in Chrome. Using the option –allow-file-access-from-files fixes that.
I now have code that works on IE, Chrome (as above) and used to work on Firefox, until now.

To give you some context:

   // get the only json file 
   var script = _.detect($('script').toArray().reverse(), function(script) {
      return script.type === 'application/json';
    });
    // script.src is now '../../json/foo/foo1.json'
    return $.getJSON(script.src, function(json) {
      alert('hello');// says 'hello' in IE, Chrome (with arg), used to work in Firefox
    });

Specifically, as the small code snippet shows, the .getJSON call fails to return and say ‘hello’ – the json file in question is on the local file system (eg file:///d/foo/bla.json). The JSON passes JSONLint validator.

I’ve tried disabling all addons – I also have a VM with Ubuntu & the installation of Firefox installed on it (3.6.13) has the same issue – worked a few days ago, now doesn’t. Nothing in my code has changed since it was last working, to my knowledge. I just know someone is going to slap me for forgetting something really dumb.

Firefox shows no errors. That this works on Chrome and IE rules out most obvious mistakes.

Any hints or tips as to why this might suddenly stop working on Firefox, would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:02:54+00:00Added an answer on May 19, 2026 at 4:02 am

    I think this is due to a new security feature in Firefox: You can make local requests only to files that are in the page’s directory, or in the sub-directory of the page.

    From here (emphasis mine):

    In Gecko 1.8 or earlier, any two file: URIs are considered to be same-origin. In other words, any HTML file on your local disk can read any other file on your local disk.

    Starting in Gecko 1.9, files are allowed to read only certain other files. Specifically, a file can read another file only if the parent directory of the originating file is an ancestor directory of the target file. Directories cannot be loaded this way, however.

    For example, if you have a file foo.html which accesses another file, bar.html, the load will succeed only if bar.html is either in the same directory as foo.html or in a directory contained within the same directory as foo.html.


    Footnote from PandaWood: I can confirm setting Firefox’s about:config -> security.fileuri.strict_origin_policy to false, as the link you provide shows, is an immediate fix


    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was wondering why could I have not caught this issue in local testing?
My build server suddenly stopped working. After I examined log files I found monster
Since the retina display, suddenly this piece of drawing code seems to not work
I was developing team project and suddenly realised that i've made so many changes,
suddenly we have to save kanji (Japanese) in a couple of columns of two
Urgh...my LINQ has suddenly taken a turn for the worse!! I have two tables
On my site the fb connect login button suddenly became unclickable, I have no
I have a win forms Usercontrol that is suddenly unable to build, with this
This is driving me nuts! I have a test instance of Wordpress installed on
I own the Ants Profiler 4 which is great for performance / memory profiling.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.