Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

Learn More

Anyone else have a problem with a dash '-' in a file:// link not working in FireFox (works in I.E.) when clicked upon?

  • 4 답장
  • 1 이 문제를 만남
  • 11 보기
  • 최종 답변자: ugarmozilla

more options

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.

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


문맥에 따라 이 답변을 읽어주세요 👍 0

모든 댓글 (4)

more options

Use forward slashes instead of backslashes.

more options

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.

more options

선택된 해결법

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


more options

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.