Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have an internal wiki setup and do a lot of linking to files on internal shares.

We typically use this format (where Share is the name of the server):

<a href="file:///\\share\blah\blah\file.txt">

This works in FireFox (after modifying the userpref.js) and IE.

We've now had a bit of an adoption of Google Chrome. These links do not appear to work in Chrome. I've been unable to find anything about it on the net so far. :/

This is served up on an IIS box (7.0, https). It seems to be that Chrome has some protection like FireFox does and prevents file links from being loaded from a webpage. Does anyone know of any workarounds?

share|improve this question

How about the LocalLinks extension for file:// links?

Allows opening file:// links on pages loaded by http(s):// scheme

The security model of Chrome prevents/blocks the user from being able to open file:// links when the user selects (left clicks) the link, or selects to open them in a new window (middle click). Loading this extension will allow you follow file:// links when you explicitly select them (left click/middle click). The HTML elements it will follow are ones like <a href="file://server/share/file.txt"> or <a href="file://c:/localdiskfile.txt">.

NOTE: It can't load images (like <img src="file://..." />)!

To open a link in the same tab, use the left mouse button.

To open a link in a new background tab, use the middle mouse button.

This extension is modeled after the LocalLink add-on for Firefox.


share|improve this answer
Generally you shouldn't provide link only answers. For more info on answering, see How to Answer. – Prof Pickle Apr 8 '13 at 9:19
Noted. Thanks for the guidance. – Lee Oct 24 '14 at 8:49

I just downloaded the latest chrome beta and <a href="file:///\\share\blah\blah\file.txt"> works.

share|improve this answer
I just tried the latest version, and it is not working. Added a comment to the question that this is being served from an intranet page (https). If save the page to a local file, that works, but it doesn't from the intranet. – Daemonic Dec 15 '09 at 14:04
You need to have server in there: file:///\\server\share\file.txt – sirlancelot Dec 15 '09 at 17:18
In our case, share is the name of the server. I've clarified that in the question. – Daemonic Dec 16 '09 at 19:44

I found a work around. Introducing RightLink:

Right click the UNC path to open. You may need to enable the option to open local files (as opposed to paths) in the extension's options.

It works on my intranet.

share|improve this answer

Try this format:

<a href="file://server/share/blah/blah/file.txt">

This worked for me with the latest Google Chrome Beta in a quick test.

A much simpler solution that would work with any browser/program would be to simply map the share to a drive, and then access it through that.

share|improve this answer
But that one doesn't work in Firefox. I'm hoping to find something that works across all browsers (or at least all actively used browsers in the company). – Daemonic Dec 11 '09 at 21:01
@Daemonic, maybe consider PHP parsing the user agent strings? Use simple if/else logic along with get_browser This way you can display a different link depending on the browser of the visitor to ensure compatibility. – John T Dec 11 '09 at 21:46
Mapping a drive would work across all browsers – davr Dec 11 '09 at 23:24
Mapping would work, but having everyone have a mapped drive. Also should note that I couldn't get that link to work from inside the wiki (https served data). – Daemonic Dec 15 '09 at 14:06

RightLink works, but is a bad workaround for me because it disables the right-click context menu, which I use all the time.

IETab on the other hand works great. I added several internal sites to its Auto-URL config (e.g. http://somesite/*) and they automatically open in an embedded IE tab. IE (or an IE tab) handles file:// links as expected according to the machine's trust configuration.

share|improve this answer
up vote 0 down vote accepted

We've found a better solution using the Chrome Extension Local Links:

share|improve this answer

OK, found a workaround for Chrome.

Go to this link in Chrome. Now when you right click you can open any document.

My link looks like this

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .