Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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

marked as duplicate by fixer1234, mdpc, Deltik, Michael Frank, Dave Apr 7 at 14:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 3 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
    
The line with capability.policy.localfilelinks.sites can have multiple websites separated by spaces. – joeshmo Jan 23 '15 at 19:43
    
Is this still valid for FireFox > 30? The notes on the first linked page are not that clear for me. – PeterCo Oct 20 '15 at 11:22
    
@PeterCo Yes – ederag Apr 3 at 6:22

Not the answer you're looking for? Browse other questions tagged .