Skip to main content
Notice removed Draw attention by CommunityBot
Bounty Ended with no winning answer by CommunityBot
Question Protected by CommunityBot
Notice added Draw attention by Jeremy
Bounty Started worth 100 reputation by Jeremy
edited title
Source Link
Jeremy
  • 23.7k
  • 7
  • 110
  • 206

Add a fallback for Load jQuery in case it fails to load from Stack's CDN if Google's CDN is blocked (or always)

Google's CDN is nice, but nothing'sit's not 100% reliable for all users. It occasionally fails to load for me. Other users have had trouble with it due to sloppily-configured networks, and some may prefer to block external scripts by default. 

It's one more possible point of failure. It would be preferable if Stack Exchange didn't depend on it.

I'm not suggesting thatIf you don't want to stop using it, but consider adding a fallback if it fails to load. Something like this:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript"><script>
  if (!window.jQuery) {
    document.write('<script src="https://cdn.sstatic.net/stackoverflow/content/js/jquery-1.7.1.min.js"><\/script>');
  }
</script>

Add a fallback for jQuery in case it fails to load from Google's CDN

Google's CDN is nice, but nothing's 100% reliable for all users. It occasionally fails to load for me. Other users have had trouble with it due to sloppily-configured networks, and some may prefer to block external scripts by default. It's one more possible point of failure. It would be preferable if Stack Exchange didn't depend on it.

I'm not suggesting that you stop using it, but consider adding a fallback if it fails to load. Something like this:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
  if (!window.jQuery) {
    document.write('<script src="https://cdn.sstatic.net/stackoverflow/content/js/jquery-1.7.1.min.js"><\/script>');
  }
</script>

Load jQuery from Stack's CDN if Google's CDN is blocked (or always)

Google's CDN is nice, but it's not 100% reliable for all users. It occasionally fails to load for me. Other users have had trouble with it due to sloppily-configured networks, and some may prefer to block external scripts by default. 

It's one more possible point of failure. It would be preferable if Stack Exchange didn't depend on it.

If you don't want to stop using it, consider adding a fallback if it fails to load. Something like this:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
  if (!window.jQuery) {
    document.write('<script src="https://cdn.sstatic.net/stackoverflow/content/js/jquery-1.7.1.min.js"><\/script>');
  }
</script>
replaced http://meta.stackexchange.com/ with https://meta.stackexchange.com/
Source Link

Google's CDN is nice, but nothing's 100% reliable for all users. It occasionally fails to load for me. Other users have had trouble with it due to sloppily-configured networkshave had trouble with it due to sloppily-configured networks, and some may prefer to block external scripts by defaultmay prefer to block external scripts by default. It's one more possible point of failure. It would be preferable if Stack Exchange didn't depend on it.

I'm not suggesting that you stop using it, but consider adding a fallback if it fails to load. Something like this:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
  if (!window.jQuery) {
    document.write('<script src="https://cdn.sstatic.net/stackoverflow/content/js/jquery-1.7.1.min.js"><\/script>');
  }
</script>

Google's CDN is nice, but nothing's 100% reliable for all users. It occasionally fails to load for me. Other users have had trouble with it due to sloppily-configured networks, and some may prefer to block external scripts by default. It's one more possible point of failure. It would be preferable if Stack Exchange didn't depend on it.

I'm not suggesting that you stop using it, but consider adding a fallback if it fails to load. Something like this:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
  if (!window.jQuery) {
    document.write('<script src="https://cdn.sstatic.net/stackoverflow/content/js/jquery-1.7.1.min.js"><\/script>');
  }
</script>

Google's CDN is nice, but nothing's 100% reliable for all users. It occasionally fails to load for me. Other users have had trouble with it due to sloppily-configured networks, and some may prefer to block external scripts by default. It's one more possible point of failure. It would be preferable if Stack Exchange didn't depend on it.

I'm not suggesting that you stop using it, but consider adding a fallback if it fails to load. Something like this:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
  if (!window.jQuery) {
    document.write('<script src="https://cdn.sstatic.net/stackoverflow/content/js/jquery-1.7.1.min.js"><\/script>');
  }
</script>
prefer HTTPS to protocol-relative (in agreement with update to http://www.paulirish.com/2010/the-protocol-relative-url/)
Source Link
Jeremy
  • 23.7k
  • 7
  • 110
  • 206
Loading
deleted 10 characters in body
Source Link
Braiam
  • 15.4k
  • 4
  • 36
  • 95
Loading
Migration of MSO links to MSE links
Source Link
Loading
edited title
Link
Jeremy
  • 23.7k
  • 7
  • 110
  • 206
Loading
Source Link
Jeremy
  • 23.7k
  • 7
  • 110
  • 206
Loading