Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8657871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:37:43+00:00 2026-06-12T15:37:43+00:00

I’m trying to use local images on a web page in FireFox. The problem

  • 0

I’m trying to use local images on a web page in FireFox. The problem is whatever I do, I see a security message and images won’t load:

Security Error: Content at http://domain.com/ may not load or link to file:///E:/path/to/file/file.png.

I put the following content into user.js and copied that file in FireFox profile directory.

user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites",  'http://domain.com');
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");

What I want to do is add css file and use that for styling the page.

Edit:
I wrote an extension which alters HTTP response and replace remote css files with local ones. But as I said , Firefox prevent local css files from loading.

Edit 2
Please do NOT remove firefox-addon tag from this question.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:37:44+00:00Added an answer on June 12, 2026 at 3:37 pm

    Don’t do this – access to the file:// protocol has been locked down for a reason. If your goal is to replace images with local data then just don’t use the file:// protocol, there are plenty of others available. You can use the data: protocol for example. This is the SO icon as a data: URL:

    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAABrUlEQVR42mNkwAOepOgxMTD9mwhk5gDxQSB2l5l15SeyGkYGAuBJMtAQ5n%2BrgcwgIF4ENCCeJAOghvADXbIHqNoEyK0BGtKK14DXU9lAThZiYPw%2FXTTr92uId3SVgKoPA8WkgNxIoCErsBrwdhoL57%2F%2FTGeATC0gfgVUMRlo%2B2zRjD8vn6RrmzH8ZT4E5IOU%2BgAN2YNhwMOJ%2FEy8bJ%2BVgGYnAQ3K%2Ff%2BfkQco%2FAYYDjP%2BfeHs%2FfNQyub%2FN44NQJe0ysy5VI83DF5M5pRkY%2FmVyfCfIRtomNB%2Fpv9v%2F%2F9infbnucgZ5l%2FMW8T7HvxDMWB9hT3nXwbmrH%2F%2FmO4Bubc4Wb%2Ff9W09%2BuNmjwQPP%2FvHNHaWXwX%2FGf7LsjD9k%2BFLZ3iKEQYbKmy1%2FjKwXIXx%2F%2F1nfPvvP%2FMVJsZ%2FRzlYfpwX4nj%2FT5zrNbtK8evlWGNhcYU3Px%2FDR%2Bf%2FDExGQK4pEKsCseJ%2FoDKgF0AGMvxjZLIP79xzCMWA3Jyc%2FyB68pQpGGEyuyJEhJXhtwYLELMx%2FNL9wcDRcfqLwjOYegwDYGxcAFkNbQxgIALgNIBUQBUDAFi2whGNUZ3eAAAAAElFTkSuQmCC

    This URL is easily generated:

    var url = "data:image/png;base64," + btoa(imageData);
    

    Alternatively you could use resource:// URLs that can be mapped to directories on disk using nsIResProtocolHandler but that’s more complicated. Keep in mind that all contents of the mapped directory become accessible to all websites. You should make sure that it doesn’t contain any sensitive information.

    Asker:*
    I added content of the link:

    var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                              .getService(Components.interfaces.nsIIOService);
    var resProt = ioService.getProtocolHandler("resource")
                           .QueryInterface(Components.interfaces.nsIResProtocolHandler);
    
    var aliasFile = Components.classes["@mozilla.org/file/local;1"]
                              .createInstance(Components.interfaces.nsILocalFile);
    aliasFile.initWithPath("/some/absolute/path");
    
    var aliasURI = ioService.newFileURI(aliasFile);
    resProt.setSubstitution("myalias", aliasURI);
    
    // assuming the code modules are in the alias folder itself
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.