Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to get Firefox 16.0.1 on Windows 7 to open links that have this form...

<a href="file:///g:/PATH/to/some_file.doc">some_file.doc</a>

I found this discussion about security policies in the Mozilla docs...

http://kb.mozillazine.org/Firefox_:Issues:_Links_to_Local_Pages_Don%27t_Work

So I understand that this is an issue with Firefox's default security configuration.

And I tried these steps...

  1. Went to about:config in address bar.
  2. Right-click in white space, New -> String.
  3. Name 1st string default.checkloaduri.enabled with value allAccess.
  4. Add another string called localfilelinks.checkloaduri.enabled with value allAccess.
  5. Add another string called localfilelinks.sites with value "localhost".

I think the problem may be that I don't understand what the correct value should be for localfilelinks.sites.

For context, this is an internal website that I have created. The users need to be able to click on links in the site and directly open Word, Excel, and PDF files from within their browser. I'm serving them Web pages with links in them in the form above. I've verified that the URIs are valid by copying them into the location bar.

Here's what's confusing me: all the documentation I've found seems to assume that the target files are on some remote Web server, so you put the domain for that server as a value for localfilelinks.sites and it works.

But in this case, from the users' point of view, it's just another drive attached to their computer, so I don't know how to express that in the config as a domain. My best guess is "localhost".

Any help would be greatly appreciated.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

OK got it to work.

Put this in user.js:

user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "http://permitteddomain.com");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.