Workaround for href=”file://///…” in Firefox

This question has been asked at least twice before, but I was unable to find those posts before posting my own (sorry):

Open a direct file on the hard drive from firefox (file:///)

Firefox Links to local or network pages do not work

Here is a summary of answers from all three posts:

  • Use WebDAV — this is the best solution for me, although much more involved than I had anticipated.
  • Use http:// instead of file:///// — this will serve up a copy of the document that the user cannot edit and save.
  • Edit user.js on the client as described here — this worked for me in Firefox 3.6.15, but without access to client machines, it’s not a solution.
  • In Firefox, use about:config, change the Security.fileuri.strict_origin_policy setting to false — this doesn’t work for me in 3.6.15. Other users on [SO] have also reported that it doesn’t work.
  • Use the locallinks Firefox extension — this sets the Security.fileuri.strict_origin_policy to true for you, and appears to have no other effect.
  • Read the file server-side and send it as the response — this presents the same problem as simply configuring your web server to use http://.

Leave a Comment