Web Development Thread, File:// links in Firefox and Safari in Coding and Web Development; On our intranet we have a page that generates links to server shares and puts them on a web page ...
30th January 2012, 03:09 PM #1
File:// links in Firefox and Safari
On our intranet we have a page that generates links to server shares and puts them on a web page as a link in the following format:
file:///SERVER/FOLDER/FOLDER - clicking the link in IE opens the folder
In Firefox this does nothing - and the same in Safari
Firefox does seem to change the link to:
I know its classed as a security problem for Firefox but even when I set a security policy preference to allow it the link still does nothing - and Safari gives no help at all
Has anyone got this working, or its there an easy way around this that will work in various browsers? I want to open the folder in a window, not a specific file.
1st February 2012, 09:13 PM #2
Which preferences did you change in Firefox? Did you add them to your mozilla.cfg or user.js file?
Originally Posted by Sheridan
The policies below are taken from here.
Another option could be to try an add-on called LocalLink.
lockPref("capability.policy.localfilelinks.sites", "http://intranet http://internal");
Thanks to Arthur from:
Sheridan (3rd February 2012)
3rd February 2012, 06:52 PM #3
Yes, those are the policies I used as well - I think from the same site.
I put them in the user.js file but it didn't seem to make any difference. I did have a quick look at the locallink but I was hoping to find a way around this without using 3rd party software/plugins etc!
3rd February 2012, 08:32 PM #4
Have you got a code snippet so I can see if you are literally just using file:///server/folder/file.ext or are you using some asp code to execute this or make it a link or what exactly ?
Local Link extension as above or look here :
Not finding much on Safari but worth trying the link as per above for Safari to see if that helps or makes any difference UNC Paths
If you're linking to a file in a UNC path (e.g., \\servername\share\file.ext), you will need to specify the path thusly:
Also note that you cannot link to file://///servername to get a listing of shares at that hostname due to a bug
Last edited by mac_shinobi; 3rd February 2012 at 08:45 PM.
4th February 2012, 02:40 PM #5
Its just a one line bit if code that put the link down as an <href> exactly as this:
Its works fine in IE - not in Firefox (which sounds like it can be worked around) and not in Safari (which sounds like there's no way around it)
15th March 2012, 01:50 PM #6
Well I've been tinkering with this on and off for weeks now and can only come to the conclusion it can't be done in Firefox without 3rd party plugins. Which renders firefox useless for us on the network.
I've put the prefs in every damn prefs file I can find: all.js,user.js,prefs.js,whydontyouflippingwellwork .js and anything else I could think of!
The links come up correctly and work fine in IE, but do nothing in Firefox. I notice none of the above preferences appear when you look through the list in about:config either.
Good old IE - the faithful old dog stays as our standard browser!
Last edited by Sheridan; 15th March 2012 at 01:55 PM.
15th March 2012, 01:52 PM #7
As long as your AV solution doesn't hinder chrome useless, what about using Chrome ( you also get GPO from google chrome ) to lock it down etc ??
Originally Posted by Sheridan
15th March 2012, 02:07 PM #8
Its mainly because I (and a a lot of staff) use firefox at home as well so I was hoping to offer a choice of browser. With the intranet rendered useless by firefox I guess I'll have to rethink!
It amazes me how many people slag off IE - but in my experience it works more reliably than any of the others.
And P.S. Mozilla, if you're going to allow preferences, then provide some documentation that makes sense and doesn't contradict itself!
Edit: Chrome does the same thing as firefox. FFS what do these guys have aginst people opening files on their intranet!
Last edited by Sheridan; 15th March 2012 at 03:05 PM.
By HMCTech in forum Virtual Learning Platforms
Last Post: 4th June 2010, 12:57 PM
By mitchell1981 in forum Web Development
Last Post: 4th March 2010, 06:22 AM
By mrbios in forum Windows
Last Post: 12th May 2009, 11:11 AM
By jkmoch in forum EduGeek Joomla 1.0 Package
Last Post: 16th April 2008, 08:19 PM
Last Post: 21st January 2007, 02:51 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)