What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

Hey,

These days Google has some connectivity problems (even their main website Google.com and GMail) in my

country at least!

and since SO depends on jQuery from ajax.googleapis.com, FireFox shows waiting for

ajax.googleapis.com... and hangs there...

and since JavaScript/jQuery represents the main nerve in the interactivity and high user experience SO provides to us:

Are you considering loading your own hosted JS files, which does not affect site operations I guess?

I can't comment, I have no tag lookup, I can't see my notifications...etc.

-

UPDATE 22 Apr: I'm observing the same situation currently (actually, for several hours already).

-

UPDATE 26 Apr: JavaScript is broken again.

share|improve this question
4  
Works for me... Tell your country to stop breaking The Internet! –  Shog9 Jan 20 '11 at 17:59
1  
Since it works at least on Meta, it stands to reason the problem is not my country but clearly at the SO side. –  user136634 Jan 20 '11 at 19:19
1  
@Developer Art, Good analysis, but even Meta was not working, now it does. –  Kenan F. Deen Jan 22 '11 at 7:53

4 Answers 4

up vote 3 down vote accepted

No need to break the caching for the shared dependency but It's always good to have a fallback in the rare event that it's not cached in the browser and the Google CDN is not delivering.

<!-- Grab Google CDN's jQuery. Fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="http://fallbackdomain.com/js/jquery-1.4.4.min.js"%3E%3C/script%3E'))</script>
share|improve this answer
    
That's quite smart! –  user136634 Apr 26 '11 at 22:45
1  
But, Jeff stated this cannot be used: "We looked at this, but unfortunately the fallback from failure-to-load-JQuery is quite difficult, as we can no longer use the standard JQuery ready event -- which we use all over the place." –  Arjan Apr 27 '11 at 6:59

It would make sense to host external dependencies on sstatic. They could be cached versions of the official release, but coming from sstatic, everyone who normally has access to SO will have access to all dependencies.

Even though google is usually dependable, it does make sense not to tie critical site functionality to a service SOIS cannot control.

Considering Amazon's recent outage, sites that depend on external resources really should take note. At minimum dynamic checking and switching to a backup when an outage is suspected should be considered.

share|improve this answer
4  
this would break caching for the shared dependency, though -- meaning if you visit 20 sites all over the web, and they all use google to host jquery, that's 20 times where the download didn't have to happen for you, resulting in a better experience. –  Jeff Atwood Jan 20 '11 at 22:58
    
@Jeff - True. You have to balance which is more important - shared dependency caching, or knowing that regardless of what happens to google your site will work. –  Adam Davis Jan 20 '11 at 23:04
    
@polly since the site is still readable, and still works for questions and answers.. I'm 120% comfortable with that. –  Jeff Atwood Jan 20 '11 at 23:09
2  
@Jeff - That's pretty dang comfortable. Are you sure that's not just your chair? –  Adam Davis Jan 20 '11 at 23:14
    
@Jeff @Pollyanna, Can't we provide and consider a Plan B for such scenario? which would be automatically switched to in such cases? –  Kenan F. Deen Jan 22 '11 at 7:52
    
@LordCover - I think your best bet is to write, or have someone else write, a user script (or greasemonkey script) that will rewrite that HTML with the location of a known available copy. –  Adam Davis Jan 22 '11 at 7:54

A bit too long for a comment, so:

If there are intermediate problems with any site, then be sure to use your browser's reload button as little as possible.

Reloading a page by using the reload button or some keyboard shortcut, makes many (if not all) browsers still ask the web servers if cached resources are really still valid.

Like even though Google's jQuery can be cached for a year, clicking reload yields:

GET /ajax/libs/jquery/1.5.1/jquery.min.js HTTP/1.1
Host :ajax.googleapis.com
If-Modified-Since: Thu, 24 Feb 2011 22:13:46 GMT

304 Not Modified
Age: 575051
Connection: Keep-Alive
Date: Wed, 20 Apr 2011 16:04:51 GMT
Expires: Thu, 19 Apr 2012 16:04:51 GMT

Even this quick and small 304 Not Modified reply does require a browser to wait for a response. It won't use the cache until it has received that response.

In such cases, click the Stack Overflow logo to reload the main page, not the reload button.

share|improve this answer

Confirm that. StackOverflow and Programmers are broken. Serverfault and SuperUser are also broken. All Ajax buttons do not work.

Meta is working for now.

All tested with the same FireFox browser 3.6.13.

NoScript is though active the necessary domains are allowed. The same configuration has been in use for the last several months without any glitches.

share|improve this answer

You must log in to answer this question.

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