We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

"CORS request not http" error when loading file:/// URI after setting privacy:file_unique_origin to false

more options

I've created an HTML page while trying out a JavaScript library and am loading both the page and its data source (a JSON file) from local files for now, using file:/// URIs. A week or two ago, when I first tried this, I encountered a "CORS request not http" error, as described here, when trying to load the JSON file. In my about:config, I set the privacy.file_unique_origin preference to false, after which I was able to load the JSON file successfully.

A couple of days ago, though, I started to see the "CORS request not http" error again, and I have seen it every time I have loaded the page since then, despite confirming that privacy.file_unique_origin was still set to false. I've tried several things to try to get that preference to take effect again: resetting privacy.file_unique_origin to true, setting it back to false, and restarting Firefox; reinstalling Firefox; and refreshing Firefox.

Screenshots of the error message and the privacy.file_unique_origin preference are attached. I'd appreciate any suggestions of what I should try to get the JSON file:/// resource to load successfully again. Thank you.

I've created an HTML page while trying out a JavaScript library and am loading both the page and its data source (a JSON file) from local files for now, using file:/// URIs. A week or two ago, when I first tried this, I encountered a "CORS request not http" error, as described [https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp here], when trying to load the JSON file. In my about:config, I set the privacy.file_unique_origin preference to false, after which I was able to load the JSON file successfully. A couple of days ago, though, I started to see the "CORS request not http" error again, and I have seen it every time I have loaded the page since then, despite confirming that privacy.file_unique_origin was still set to false. I've tried several things to try to get that preference to take effect again: resetting privacy.file_unique_origin to true, setting it back to false, and restarting Firefox; reinstalling Firefox; and refreshing Firefox. Screenshots of the error message and the privacy.file_unique_origin preference are attached. I'd appreciate any suggestions of what I should try to get the JSON file:/// resource to load successfully again. Thank you.
Capturas de pantalla anexas

All Replies (1)

more options

Hi Sam Duncan:

This forum is focused on user support questions. It's best to ask web development questions on other forums (which i guess is unclear even though we have an article about this Where to go for developer support)

For web developer questions please:

1. ask it in stack overflow and tag it firefox https://stackoverflow.com/questions/tagged/firefox

2. or you can ask on discourse if it overlaps with Firefox Developer tools:

https://discourse.mozilla.org/c/devtools/213

I hope that helps!

...Roland