Today for some strange reason, Firefox stops working properly because it is trying to fetch something from ajax.googleapis.com.
Is there something I can do to avoid this? Safari and Chrome work just fine.
I tried uninstalling Firebug and clearing the cache.
The only thing that worked was disabling the JavaScript altogether.
This seems to be the culprit link:
What can I do?
EDIT
I think I have found where the problem is. My proxy is serving one byte at a time the file, so firefox consume it at that peace.
What I don't understand is why Safari and Chrome takes it right away.
What I did last night was, leave the FF open all the night to give him change to load the file, my hope was that I got cached and the next time there was no need to go for it.
Today in the morning, the page load successfully but the page was not cached, because the next request failed the same.
Here's a video showing the problem:
107 Answers
The Firefox extension Decentraleyes, created in 2015, replaces CDN resources with local ones. Never tried it myself but looks promising according to the reviews.
There are some severe Firefox performance issues with some of the Google API's available from ajax.googleapis.com. One, of many, examples is slow or missing characters when typing into Google's own search bar.
I used Adblock Plus to block access to all the Ajax API's from Google'a "*. This fixed many Firefox Web performance issues. The down side is that some web newer sites may require the Ajax API's to appear or function properly.
2If you don't need it, black hole it in the hosts file by adding
0.0.0.0 ajax.googleapis.comYou might as well take a look at a tutorial and a block list to keep you safe.
It's a good idea to block the connections to your computer from those domains rather than try to block the script of an already established connection.
Is Firebug the only extension you had loaded? What about NoScript or Adblock? Try starting Firefox in "safe mode" and accessing the Google URL you were trying before.
1The ajax.googleapis.com URL refers to an external JavaScript library, that holds functions the web page might be using in some inline JavaScript of its own.
In most (if not all) browsers, nothing in the page is rendered until all inline scripts are done executing*. Even when the inline JavaScript does not need anything from that external JavaScript libraries, your browser needs to download all of the defined external libraries first, just in case they are needed. So, if the external script is not in your browser's cache† (or: whenever you explicitly refresh your browser‡) then everything halts until the script is downloaded.
The ajax.googleapis.com URL loads fine on my internet connection and I assume Safari and Chrome still have the library in their caches? As for the very slow proxy: this could be some virus scanner (not too likely on your Mac) or some firewall? If the problem is in the proxy then that's out of your control, so (assuming you need to use that proxy): contact the administrators? Meanwhile, you could repeat your test for other libraries hosted at Google, like jQuery 1.3.2 or jQuery UI 1.7.2.
(If really all else fails, then you could try to find some way to rewrite request for to a URL of some other host...)
* See (slow) example at Cuzillion. And though IE8 is the first browser to download scripts in parallel, it will still not execute them in parallel.
† Google tells your browser to cache it for 31,536,000 seconds, thus 365 days. And it allows for public caching, so a proxy is allowed to cache it, and use it for other clients as well.
‡ When hitting Refresh, then for cached items most browsers will add a If-Modified-Since header to the request, thus only truly downloading if the thing in the cache is outdated. But: even if the server responds with HTTP/1.x 304 Not Modified, the browser still needs to await that answer. So: hitting Refresh when things are slow might make things worse!
I've randomly ran into this before with Firefox. If you get Firebug, you can go to the Net tab, right click the script that is still loading, and select "Stop loading". This will get around the issue.
Could you enter the "culprit link" (that every 2nd web 2.0 site uses) in your Fx address bar and load it manually?
Try some other sites that references this JQuery library. Just Google the URL, you'll find enough examples.
Have you tried it with a new, clean profile? Addons sometimes work against eachother (NoScript vs. ABP problem...)
2