cancel
Showing results for 
Search instead for 
Did you mean: 

JavaScript blocked or failed to load

SOLVED
Highlighted
New User

JavaScript blocked or failed to load

Hello, Sometime ago I suddenly realized that JavaScript was not working in my Firefox. I get a very explicit error message from Stack Overflow:

"Stack Overflow requires external JavaScript from another domain, which is blocked or failed to load."

Many other websites also do not work.

I currently am running Windows 7 and on typing "java -version", I get the following output:

java version "1.7.0_40" Java(TM) SE Runtime Environment (build 1.7.0_40-b43) Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

I know Java is installed and working because I can compile and run .java files from NetBeans.

I am in a fix as I have spent many hours troubleshooting this problem but could not solve it. I am very hopeful for a solution here.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
New User

Re: JavaScript blocked or failed to load

cor-el I was experimenting and installed Firefox 25 Beta 3 and all JavaScript are working fine.

22 REPLIES
Regular User

Re: JavaScript blocked or failed to load

For your information Java and Javascript are completely different, so having java in doesn't gives any advantage for javascript nor it needs java.

Coming on to you problem


I think you have problem with Cross-domain Content Scripts

By default, content scripts don't have any cross-domain privileges. In particular, they can't:

  1. access content hosted in an iframe, if that content is served from a different domain
  2. make cross-domain XMLHttpRequests

Check this article on mozilla addons for additional info Cross-domain Content Scripts

SUMO Contributor

Re: JavaScript blocked or failed to load

Firefox has a single global setting for JavaScript: either it's enabled or it isn't. If JavaScript works on any site, then that setting should be fine. If you're not sure, you can check here:

(1) In a new tab, type or paste about:config in the address bar and press Enter. Click the button promising to be careful.

(2) In the search box above the list, type or paste java and pause while the list is filtered

(3) If javascript.enabled is not set to its default value of true, double-click it to switch it back to true.


Firefox does not have a user interface for applying site-specific scripting restrictions, but this can be done using extensions or using "capability" preferences. I don't see the best known script blockers on your extension list (NoScript, YesScript, Controle De Scripts) so I suggest checking for the hidden preferences first.

Open your current Firefox settings (AKA Firefox profile) folder using

Help > Troubleshooting Information > "Show Folder" button

Scroll down to prefs.js and open it in a text editor (note: you can't save changes while Firefox is running, but you can exit Firefox if you find something you need to edit out)

Search for capab (the beginning of the word capability). Do you find any preferences that contain capability and javascript and noAccess? If so, that may explain why scripts cannot run on some sites. Feel free to post those lines here for analysis.


To test the extension possibility, could you try some of the problem sites in Firefox's Safe Mode? That's a standard diagnostic tool to bypass interference by extensions (and some custom settings). More info: Troubleshoot Firefox issues using Safe Mode.

You can restart Firefox in Safe Mode using

Help > Restart with Add-ons Disabled

In the dialog, click "Start in Safe Mode" (not Reset)

Any change?

New User

Re: JavaScript blocked or failed to load

anushbmx, thanks for the article, and yes are right Java and JavaScript are different. So I wasn't able to derive any meaning from all that. Still stuck.

jscher2000 I could not find anything related to capab in pref.js . And I have already tried to Troubleshoot Firefox issues using Safe Mode. It didn't work out. Thanks for the help anyway.

So, is there any other way possible? I'm ready to try anything.

Site Moderator

Re: JavaScript blocked or failed to load

You can try to set the security.csp.enable pref temporarily to false on the about:config page to see if that helps.

New User

Re: JavaScript blocked or failed to load

cor-el, not setting security.csp.enable to false did not work.

SUMO Contributor

Re: JavaScript blocked or failed to load

Hello, is it possible Adblock Plus or Adblock Plus Pop-up to blocks javascript ? I don't use it and i don't known ! just a guess ?!

thank you

Site Moderator

Re: JavaScript blocked or failed to load

Start Firefox in Safe Mode to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).

  • Do NOT click the Reset button on the Safe Mode start window.

If content is missing or otherwise not working when a secure https connection is used then check if there is a shield icon to the left of the "Site Identity Button" (globe/padlock) on the location bar indicating that content is blocked.

You can use the Web Console (Firefox/Tools > Web Developer;Ctrl+Shift+K) to check the Net log to see if any content is blocked or fails to load.

Regular User

Re: JavaScript blocked or failed to load

ideato can be correct, ad blocker or Ad blocker plus will block javascript if the domain from which it's served from is listed in block list, try to use the website with these disabled or use incognito window.

New User

Re: JavaScript blocked or failed to load

cor-el and anushbmx, I checked in safe mode also, still gives the same error message.

NOTE: I checked on 3 of my friends, there Firefox 24 ALSO shows the same warning given by Stack Overflow. How is that possible?