How to view file: // images from http: // localhost served pages in Firefox 11?

I have a server running on my localhost machine (port 8080) that is trying to create IMG tags for local files. But the files do not appear in Firefox 11.

I originally created the image tag using Javascript, but since this failed, I went back to HTML to experiment with different ways to directly link to a file. None of the following works:

<img src="file:///localhost:8080/C://Users/me/IMG_1000.JPG">
<img src="file:///localhost/C://Users/me//IMG_1000.JPG">
<img src="file:///C://Users/me/IMG_1000.JPG">

If I paste the last URL directly into the address bar, the image opens normally.

I followed the directions here:

http://kb.mozillazine.org/Firefox_:_Issues_:_Links_to_Local_Pages_Don%27t_Work

I tried modifying both user.js and prefs.js, both directly and through view: config viewer.

I got the correct path to the profile directory from the help → Troubleshooting information → Profile directory → Open containing folder.

Corresponding lines added:

user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
user_pref("capability.policy.localfilelinks.sites", "localhost:8080");
user_pref("capability.policy.policynames", "localfilelinks");

I originally put http: // from "localhost: 8080", but Firefox removed this. I also tried just "http: // localhost" and "http://127.0.0.1", but they didn't work either.

BUT ... oddly enough, although I entered them from about: config and see them in prefs.js, I don't see them roughly from: config! This makes me think that perhaps the information in mozillazine is out of date, because it says that the information is for “Firefox 1.5 and higher”, and I am using Firefox 11!

: , :// - , . : , , , - . , - , . , ( ), CGI, - , , .

: , window.open() URL- . ?

+3
2
<img src="file:///localhost:8080/C://Users/me/IMG_1000.JPG">
<img src="file:///localhost/C://Users/me//IMG_1000.JPG">

8080, ://- . http://localhost:8080/blah. , , ( ) file://localhost/c:/* - . //, /

<img src="file:///C://Users/me/IMG_1000.JPG">

, - .

user_pref("capability.policy.localfilelinks.sites", "localhost:8080");

() :///c:/* stuff, http://localhost:8080/ *.

0
  • - ur

    2
    3. .
-2

All Articles