LocalLink 0.5

July 8, 2010

At work I am helping build an intranet using a moinmoin wiki. Most of the company is a windows shop accustomed to sharing files on a “share drive” or by email of course. So it is important to show how to link to files on the share drive from the new wiki, where you can conveniently explain what that spaghetti pile of files is all about after all. Even introduce a view into the data that is organized and documented.

However, in documenting how to do this, the few enlightened folk using Firefox, and those of us in the Information Systems group using macs or linux and Firefox, were out of luck.  Click on a file:// link and you get…. nothing.  No error message.  No file.  Nothing happens.  Mouse over and the cursor changes to indicate that yes, indeed, you do have a link there.  But it is a non-operative link.  Bummer.

No problem, we documented a workaround: copy the text of the link, paste it into the url input bar, and the file will load.

But why is that?  It is rather awkward, and why does it work in the url input bar but clicking on the link just does nothing?

I stumbled on the answer first on a mediawiki page, and then a bit more googling lead me to the LocalLink 0.5 Add-on for Firefox.

Note, however, that some browsers, like Mozilla FireFox, will not follow file-URLs on pages that were loaded via HTTP.

I created an html file with a file:// link in it and put it in ~marla/Sites, which is a place for creating your own website if you turn on Web Sharing on os x.  I could thus verify that if I loaded the file in Firefox via http, the file:// link would do nothing.  If I loaded the same file via the file system (by typing it into the url bar), then the file:// link would work just fine.

So I installed LocalLink 0.5.  At first it also did not appear to do anything.  Another no-op?  But then before uninstalling it, I went to its homepage to see if I might be missing something, and sure enough, it adds a menuitem Open Link in Local Context… to the pop-up menu over a link.  So it preserves the mysterious no-op behavior if you click on a file link that is loaded via http, but it gives you this explicit way to load the file anyway, without doing a copy/paste of the url.  Operate at your own risk, obviously.

The add-on homepage has a nice, one paragraph explanation of the security concerns behind this odd nothing-happens behavior you get if you click on a file:// link loaded via http.  The explanation ends with:

The discussion about the consequences of the security model for the user tends to be heated. For more information see…

On an intranet at a small company, this is safe enough.  But the feature is for the browser, not scoped to work only within the safety of browsing inside the firewall.  So think-before-you-click certainly applies.

Share

Leave a Reply