Fix Firefox ‘Permission denied to access property document’

Problem

You are trying to load a script from a local file into a page displayed in Firefox (as can sometimes be useful for testing).

Firefox reports an error such as

Error: Permission denied to access property ‘document’

Error: Permission denied to access property ‘local’

Solution

This problem is caused by a security restriction that should normally be in place. However, you can temporarily disable this security feature as follows:

  • Enter the address ‘about:config’ in your Firefox
  • Search for ‘strict_’
  • Double click on the value column for the preference ‘security.fileuri.strict_origin_policy‘ to switch it from ‘true’ to ‘false’.

Remember to reenable the policy once your tests are done!

Sources

https://bugzilla.mozilla.org/show_bug.cgi?id=477201

https://support.mozilla.org/en-US/questions/1003768

2 thoughts on “Fix Firefox ‘Permission denied to access property document’

  1. This setting did not fix the issue in FF 48.02. Adding in the web link that gave the error to the Java security setting as trusted also did not help.

    1. Hmm, what error message did you get exactly? Java Security settings should not matter as long as the local file you are trying to access won’t be a Java Applet which I guess is quite a special case? Anything helped you in the end?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s