75

I just tried to refresh my browser, which is at https://stackoverflow.com/questions/tagged/emacs, and I got this across the top of the page:

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

What's that all about, and what is a user expected to do about it? I have never seen such a message before.

Display of the message went away when I tried again to refresh the page. But I still wonder what the message was for.

20
  • 2
    I usually close that tab and reopen another. Then, if that doesn't work, I close all open tabs in the browser and reopen the browser. However, I am interested to see why it happens and if there is a better way.
    – Anonymous
    Commented Jun 10, 2014 at 21:58
  • 1
    @Anonymous: I'm mainly curious about what it's supposed to mean, and why it is shown to users. Thanks for sharing what one might do about it, though.
    – Drew
    Commented Jun 10, 2014 at 22:01
  • 59
    The error message seems fairly self-explanatory.
    – Robert Harvey Mod
    Commented Jun 10, 2014 at 22:05
  • 25
    @RobertHarvey At an implementation level, perhaps. It is not a very user-friendly, user-level message, IMHO. In particular, it does not help a user understand what, if anything, s?he should do about it. And that's the most important thing: what it means to the user. In this case, it seems to mean, roughly, "Check your internet connection. If it is good then there is probably a temporary StackOverflow problem" etc.
    – Drew
    Commented Jun 10, 2014 at 23:42
  • 1
    It doesn't really mean that though, as it isn't related to Stack Overflow's servers. I believe Stack Overflow uses a few external CDNs for popular libraries -- at least jQuery is loaded using Google's CDN on Stack Overflow. Even if a user's connection is otherwise fine, if they can't access the external URL then it will show this message. Commented Jun 11, 2014 at 3:38
  • 12
    If SO is a "site for professional and enthusiast programmers", should the error message need to be user-friendly as in "user-friendly"? If not, then could this be seen as a notification rather than an error message? ;)
    – Abhitalks
    Commented Jun 11, 2014 at 5:52
  • 3
    @abhitalks I was just typing a similar comment. The message is quite clear. Commented Jun 11, 2014 at 5:53
  • 68
    The message isn't clear. It doesn't say what library is missing, how many are missing, and if the site will continue to function without it, or what will fail as a result of it not loading. Also, not everyone on this site is a web programmer, so that isn't an excuse.
    – corsiKa
    Commented Jun 11, 2014 at 6:26
  • 3
    Many companies block certain CDNs at the proxy level. I, for example, can never see pictures in questions or answers due to the CDN used for that. Is is possible the JavaScript resources are being served from multiple different CDNs and you companies' are blocking a subset of those CDNs?
    – user1454117
    Commented Jun 11, 2014 at 13:29
  • 23
    @abhitalks I find this kind of thinking incredibly annoying. Just because I'm a developer in my day job doesn't mean I want to waste my time trying to figure out someone else's cryptic error messages. I have enough trouble getting through my own terrible logging. User friendliness doesn't become a worthless ideal just because your users spend 90% of their time slogging through crap. Commented Nov 29, 2014 at 23:55
  • 1
    @Abhitalks The number of sites for non-programmers/non-programming topics on the SE network outweighs the number of sites for programmers/programming topics. Is Stack Overflow the only site in the network that loads from a CDN? I doubt it. Commented May 29, 2015 at 9:30
  • 2
    Im having this issue right now, on Chrome. And it seems only on chrome (IE, FF and Opera working ok). Clear history, cache and everything and still the problem persists. :( Even had to use one of the others so I could post this.
    – Stargazer
    Commented Oct 20, 2015 at 13:51
  • 1
    I have this issue today again
    – demonplus
    Commented Oct 20, 2015 at 16:01
  • 2
    I added an answer that was deleted (for some unknown reason); as an fyi anyone viewing this answer and visiting SO from China, you will get this error. Otherwise, SO works "mostly". But because stackexchange sites ALL use googleapis.com, which is blocked from China, you get this error message. This breaks functionality like logging in, viewing your message "inbox", and expanding hidden comments. See also meta.stackoverflow.com/questions/258288/…
    – michael
    Commented Nov 1, 2015 at 7:27
  • 1
    Got that today the first time. I even did not restart my machine and not my browser. It appeared all of a sudon. Really strange. Was the add blocker updated in the background? Could that be the reason?
    – robsch
    Commented May 11, 2017 at 6:46

15 Answers 15

30

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

This is the error which troubled me a lot but with this temporary fix you can really overcome this issue

just add https:// in front of the link say this meta.stackoverflow.com/questions/260115/whats-this-stack-overflow-requires-external-javascript-from-another-domain-w and the error will no longer haunt you.

This is a temporary fix but this works :)

4
  • 1
    Great, thanks! That would be easy to fix from my side...would just require to attach a kind of on-change listener on the address bar here in Firefox (only for the SO/SE domain group o. c.), and once we are not on 443 (i. e. http:// only) we will simply auto-redirect the page thereto by force. As I've already done that before, I'd just have to dig amongst my old add-on source code files... Commented Jul 4, 2015 at 0:25
  • 3
    This isn't a fix for all cases. I've been using SO and MSO via forced SSL for a year or so, and I still get this error every now and again. Could be an HTTP failure, could be some weirdness with my NoScript plugin.
    – halfer
    Commented Jul 4, 2015 at 0:33
  • @halfer Heh heh, shaking hands with a fellow NoScript user :) They just dislike us, everywhere, no wonder :P Thanks for the info about even forced SSL not being the ideal path to take...:-/ Commented Jul 4, 2015 at 2:04
  • @syntaxerror: heh, hello! Well (IMO) it works well enough to stick with it. There's some redirect weirdness with Careers, and the blog doesn't have a valid cert I think. But in general SSL works fine.
    – halfer
    Commented Jul 4, 2015 at 10:41
23

I've currently got a fairly inconsistent Internet connection at work, and I get that error message semi-regularly.

The message itself is pretty self explanatory, SE loads JavaScript files from an external domain (presumably a central point for all forums). The connection to Stack Overflow would have been successful, but the request to the other domain to get these resources would have failed (hence the message).

3
  • 3
    Maybe displaying the message and have it link to more details, like what it all means. We had this issue months ago due to a cdn being blocked.
    – JonH
    Commented Jun 11, 2014 at 16:38
  • 2
    So what to do about it? F5!
    – Bergi
    Commented May 29, 2015 at 9:28
  • 1
    Yeah. What else can the client do?
    – scrowler
    Commented May 29, 2015 at 10:09
16

There are several scripts included from CDNs, for example //ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js. Probably one of the used providers were unresponsive.

6
  • 2
    More likely, a proxy/router/ISP bugged out. Commented Jun 11, 2014 at 6:08
  • 1
    ...even more likely, the DNS server is hosed at the ISP. Commented Jun 11, 2014 at 10:41
  • Which would mean that the user cannot do anything about it most likely? Commented Jun 11, 2014 at 10:43
  • @Trilarion The user could switch to a better DNS server? Google works well developers.google.com/speed/public-dns
    – Vality
    Commented Jun 11, 2014 at 13:14
  • This address definitely seems to have a problem right now.
    – l0b0
    Commented Jan 22, 2015 at 14:52
  • for a certain subset of users (e.g., browsing from China, as I am now, via VPN), googleapis.com is simply blocked; see also: meta.stackoverflow.com/questions/258288/…
    – michael
    Commented Nov 1, 2015 at 7:28
10

Here is the list of scripts loaded on SO, I could find through dev-tools:

Would be a concern if the first two fail to load, because that would prevent the site from being functional.

  1. "googleapis.com": CDN for jQuery. If the message in the question is being shown, it would perhaps mean at least this is being loaded?
  2. "sstatic.net": This is SE's own domain for cookieless content delivery. There are two scripts being loaded actually from this domain. If the message in question is being shown, it would perhaps mean at least one of these is loaded fine. (I am guessing that the code to show the msg would be in one of these scripts). Also, it is more than likely that if one of these scripts is loaded fine, the domain is reachable and is responding and hence the second would also load.

Rest all seem to be either "Ads" or "Traffic Stats" or relating to "SO Careers". These I wouldn't worry about. "Careers", I wouldn't worry much unless it is the careers am after.

So, it seems that one of these ad-related or traffic-related scripts are the culprits. I quite often face problems with these scripts elsewhere too. Could be any reason: the provider is not responding at that moment of time, lot of latency, DNS issues, router problems etc.

Here is the list of scripts loaded on SO

10

Now I've just got this too (though never before). It turned out that I had ajax.googleapis.com blocked, which was for a good reason because Stack Overflow never needed access to this server before (as otherwise, my anxiously monitored NoScript would have detected it!).

Is it really that necessary to load jQuery (min) from an external server instead of simply putting it locally on stackoverflow.com main server? As I would never fully trust Google APIs and what they could misuse this AJAX technology for spying us users out behind our backs, I'd rather prefer to have jQuery loaded locally instead of externally.

If you can stand the red banner, the site will perfectly work without access to jQuery @ Google APIs. Appears just window-dressing to me?

As a user with medium-advanced experience in add-on programming here on Firefox, I am probably just going to write me a simple add-on that nukes this banner to simply let it complain for keeps, and still keep access to Google APIs blocked on this site for safety reasons (if possible).

5
  • The reasons are briefly explained here with links to some more Commented Jul 4, 2015 at 0:29
  • Thanks, will check that out. In that jumble of articles, one is not always successful in finding the right one which explains the matter. {edit} Well I would never have attempted to read that question...ever. Because I don't really care about "China-friendliness" ;) We in Europe are having way more than enough problems on our own, so let the Asians have theirs. Commented Jul 4, 2015 at 1:28
  • 1
    There are rumors of Europeans living in Asia... Pretty crazy, I know. ;) Commented Jul 4, 2015 at 8:56
  • 2
    You can probably use GreaseMonkey to redirect the Google asset to your own server (which can be local if you wish). That solves the problem in a better fashion, since the features that rely on jQuery will carry on working.
    – halfer
    Commented Jul 4, 2015 at 10:49
  • I live in China, and "according to the law", some domain you mentioned above is not reachable, I guess that's where the problem is.
    – Liang Zhao
    Commented Nov 28, 2017 at 3:24
5

If you are using Decentraleyes on Firefox you would get this error too. Disabling Decentraleyes for StackExchange websites helps.

2
  • That's exactly what I just did. I wish Decentral would have a 'temporarily' disable feature though, because I don't want to forget I gave any site a pass. Thanks for pointing this out; I figured it out, but only because your answer was at the bottom. You got a vote from me. Commented Sep 6, 2018 at 16:22
  • thanks, your method works. i don't need to disable decentraleyes at few weeks ago. guess that SO becoming more aggressive for m*. Commented Sep 6, 2018 at 23:27
4

I just received this message for the first time. The cause was an incompletely loaded jQuery file that was then cached locally. Reloading the page did not correct it, but clearing my local browser cache immediately resolved the problem.

1
  • 1
    Sometimes this can be a result of a DNS route failing or your ISP dropping packets. It seems to be more common for international users.
    – Travis J
    Commented Apr 6, 2015 at 17:22
3

I've started to getting this error message out of the blue. I was thinking it's just some temporary server-side problem, so I was expecting it to dissapear after some time. Few days passed and still the same error. Therefore I decided to open Console in Chrome and there was it: "Failed to load resource: net::ERR_BLOCKED_BY_CLIENT". It turned out my Avira Browser Safety plugin in Chrome decided to block those external .js resources. I've unblocked it and everything works fine again :)

0
3

I got this problem today, whit Chrome Developer tools, I fond out that one js file https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js was blocked by Great Firewall. So, I opened my vpn and fixed it.

2

This happens because the browser is blocking tracking attempts. In Firefox , just select 'enable temporarily' and you can enjoy the site without hinderance.

0

Just put a 'https://' and everything will work as it should :)

1
  • 1
    This shouldn't be needed anymore since the whole network moved to and actively redirects to https if it isn't already on that.
    – rene
    Commented May 31, 2019 at 10:30
-4

It happened to me today.

With a clean install of GNOME Ubuntu, I got this error message with Firefox.

I just turned off wired connection and turn on again. And the message's gone.

I have no idea why. But it worked.

-4

Latest, shall we say incarnation :-) of the problem happens to be "cache read failure" (== Chrome's own).

So, whenever you see that kind of message, first hit F12 and look at the console "log".

If you see something like "Failed to load resource: net::ERR_CACHE_READ_FAILURE", just go back and Ctrl-F5. If it doesn't help try obliterating Chrome's cache and if that fails start it as admin (or as plain user is the session with error was "as admin") - the name of the game is "convince Chrome to really re-fetch without pretending to be smart".

Console will also show you if it might be one of already mentioned problems. Say if an ad blocker blocked something it may appear as ERR_BLOCKED_BY_CLIENT in console (uBlock has its own logger to check things and it's action may appear as an extension invocation in console).

1
  • This doesn't seem to answer the question of what to do when receiving the error in the OP. IIt would be better as a new question Commented Jan 21, 2020 at 14:06
-5

I encounter this problem whenever I'm running a proxy (Charles Proxy in my case). Disabling the proxy for my browser fixes it

-6

In my case, the issue was resolved after removing google api,ajax related entries from hosts file as they were pointing to localhost in windows/system32/drivers/etc folder.

2
  • @rene Thanks, actually I have checked it again and the root cause was to remove google API's related host entries. Edited my answer.
    – nik
    Commented May 31, 2019 at 10:34
  • You don't have to guess what should be accesible. It is listed here at the end of the answer.
    – rene
    Commented May 31, 2019 at 10:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .