Links to local pages do not workFrom MozillaZine Knowledge Base(Redirected from Links to local pages don't work)
For security purposes, Mozilla applications block links to local files (and directories) from remote files. This includes linking to files on your hard drive, on mapped network drives, and accessible via Uniform Naming Convention (UNC) paths. This prevents a number of unpleasant possibilities, including:
Unless you use one of the following workarounds, the blocked hyperlink simply will not work. No error dialog, security warning, or other user-visible notification will be displayed, due to the bug reported in ticket #84128. However, an entry will be logged in the Browser Console (JS type, "Log" level).
[edit] Using an Extension[edit] LocalLinkThe LocalLink extension (incompatible with Firefox Quantum) allows overriding the security check per click: links to local pages can be followed using the context menu for the link. [edit] IE TabThe IETab extension allows you to open Firefox tabs with IE content. Since IE is able to browse local file systems, this can be used to open local links. You can even use "Open Link in Ext.App." from the context menu to open a real Windows Explorer window. [edit] Disabling the Security CheckIf you are willing to accept the possible risk of linking to local content, you can override the security policy. Note: If you are using the NoScript extension, the user_pref approach as described below does not work, NoScript overrules the checkloaduri configuration. Instead, it is possible to allow local links ( [edit] Firefox 1.5, SeaMonkey 1.0 and newerIn the most recent versions of these browsers, the old global preference has been removed. Instead, the user_pref("capability.policy.policynames", "localfilelinks"); user_pref("capability.policy.localfilelinks.sites", "http://www.example.com"); user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess"); The line with user_pref("capability.policy.localfilelinks.sites","http://www.example.com http://www.example.net"); (Naturally, you would replace http://www.example.com and http://www.example.net with sites you wanted to allow access.) Site names must be listed as in the above example: the protocol (http://) followed by the domain name (www.example.com) followed by, if necessary, a port number (:8080). They should not include the final / or anything else from the path part of the URL. [edit] Thunderbird 1.5, SeaMonkey 1.0 and newerTo enable opening file links you receive in e-mails, follow the example for Firefox 1.5, but with the user.js file in your Thunderbird profile. In the user_pref("capability.policy.policynames", "localfilelinks"); user_pref("capability.policy.localfilelinks.sites","imap://username@mail.example.com:143"); user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess"); or, for POP mail: user_pref("capability.policy.policynames", "localfilelinks"); user_pref("capability.policy.localfilelinks.sites","mailbox://"); user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
[edit] Path SyntaxYou also need to use proper URI syntax for local file references. It is not proper to enter an operating-system-specific path, such as
[edit] UNC PathsIf you're linking to a file in a UNC path (e.g., file://///servername/share/file.ext Also note that you cannot link to [edit] See also[edit] External links[edit] Related bug reports
|