On an intranet site, let's say I want to link to a file on a share using UNC, at:
\\servername\foldername\filename.rtf
It seems the correct way to do this is with markup like this:
<a href="file://///servername/foldername/filename.rtf">filename.rtf</a>
That's five slashes - two for the protocol, one to indicate the root of the file system, then two more to indicate the start of the server name.
This works fine in IE7, but in Firefox 3.6 it will only work if the html is from a local file. I can't get it to work when the file comes from a web server. The link is "dead" - clicking on it does nothing.
Is there a workaround for this in Firefox? Those two browsers should be all I need to worry about for now.
Since this is obviously a feature of Firefox, not a bug, can someone explain what the benefit is to preventing this type of link?
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:
http://
instead of file://///
— this will serve up a copy of the document that the user cannot edit and save.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.Security.fileuri.strict_origin_policy
to true for you, and appears to have no other effect.http://
.