David Gomes
David Gomes

Reputation: 5845

NS_ERROR_BAD_URI : Access to restricted URI denied

First of all, I've googled for this error and all of the pages I get are Ajax-related. I am not using Ajax, I'm using pure Javascript to write a HTML5 game. However, I am getting this error when I open my .html. It worked fine as of yesterday I think.

If I push it to my server, it works fine, but I want to be able to develop locally to avoid waiting for scp to send my files over to my server.

Any ideas? Ive tried this boh on Firefox Stable, Aurora and Nightly. On Chromium 22 it doesn't work either, only on server, but I've had this issue on Chromium for a long time, on Firefox it's rather new.

Upvotes: 0

Views: 3552

Answers (1)

Quentin
Quentin

Reputation: 944526

Browsers run files from the local file system with different security levels to files loaded via HTTP. This is (at least in part) a defence against malicious files that are emailed to people.

Do your development work in an environment as close to the production environment as possible.

Install a web server on your development machine and load your work in progress through http://localhost/

Upvotes: 1

Related Questions