Search code examples
google-chromefirefoxhyperlinkcross-browsercompatibility

Launch file:// from Firefox or Chrome


I am looking for a way to launch a file located on our local file network for use via our local intranet using Firefox or Chrome.

The link works well in IE:

<a href="\\Start\Of\My\Network\file.xlsx">View Report</a>&nbsp;

but in Firefox it shows:

<a href="http://mydomain.com/\\Start\Of\My\Network\file.xlsx">View Report</a>&nbsp;

is there a way to get the link to render properly?...Just a simple click from a href tag.


Solution

  • This is not enabled in firefox for security reasons (remember that most computers have files and applications of a sensitive nature located in similar locations, like C:\System\Windows)

    you can try adding this to the user.js file for any user that needs to be able to access these links:

    user_pref("capability.policy.policynames", "localfilelinks");
    user_pref("capability.policy.localfilelinks.sites", "file:///[[PUT SERVER NAME HERE]]";);
    user_pref("capability.policy.localfilelinks.checkloaduri.enabled",  "allAccess");
    

    Just remember that this is a security risk.