Anyone else have a problem with a dash '-' in a file:// link not working in FireFox (works in I.E.) when clicked upon?
ex. file:///\\svr-1\folder1\folder2\file.jpg
A file URL like this will work when typed/pasted in the Address bar of FireFox, however, if it is a link in a webpage, it will be non-responsive. If something like this happens to be a link in an email in an email program, where that email program is set to open links in the default browser (and it's Firefox), then Firefox will open a window/tab with the following URL:
file://///folder1/folder2/file.jpg
Where the directory with the '-' and all parent directories preceding it are removed.
The example above is actually a network file link, but I've noticed the same if the dash is in the file name or sub folder of a network file link.
चुने गए समाधान
You should probably see a security warning in the Tools > Error Console because Firefox doesn't allow web pages to access local files.
This one one is the correct specification.
You need 5 slashes: two for the file protocol, one for the root and two for the server:
file://////svr-1/folder1/folder2/file.jpg file:///folder1/folder2/file.jpg
All Replies (4)
Use forward slashes instead of backslashes.
Thank you for replying cor-el.
You actually brought up a good point I forgot to mention.
I tried using forward slashes and other variations in the same manner, and they all didn't work in Firefox, but worked in Chrome and I.E.
Taking the example:
file:///\\svr-1\folder1\folder2\file.jpg
I also tried:
file://///svr-1\folder1\folder2\file.jpg
file://///svr-1/folder1/folder2/file.jpg
file://svr-1\folder1\folder2\file.jpg
file://svr-1/folder1/folder2/file.jpg
These links didn't work embedded in an email or on a webpage. For the case of the webpage, when the mouse cursor is hovering over the links, the jump bar indicates the correct link, but when clicked, nothing happens. When the links are copied and pasted into the address bar, they work.
Thanks again.
चयनित समाधान
You should probably see a security warning in the Tools > Error Console because Firefox doesn't allow web pages to access local files.
This one one is the correct specification.
You need 5 slashes: two for the file protocol, one for the root and two for the server:
file://////svr-1/folder1/folder2/file.jpg file:///folder1/folder2/file.jpg
Thank you again for replying cor-el.
I'm aware of the correct specification for the file protocol, I was just testing other known ways that work using the file protocol to see if that was the issue. :-P
You are correct regarding the Error Console.
It looks like everything I've stated is pretty much summed up in the following "bug":
https://bugzilla.mozilla.org/show_bug.cgi?id=122022
And I agree with the comments in there about making the current behavior by Firefox as an option. I personally wouldn't mind having warning messages for such links.