Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary reference to googleapis.com to stop page load failing in China etc #1737

Closed
Jon007 opened this issue Sep 30, 2015 · 5 comments

Comments

@Jon007
Copy link

Jon007 commented Sep 30, 2015

html5boilerplate.com. Version: 4.2.0
unnecessary script reference to googleapis.com causes boilerplate to fail (or load unbelievably slowly after timing out on the script) in China (500million internet users) and other countries where googleapis.com is blocked.
index.html contains:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
since jquery is also included locally this line could be modified to:
<script src="js/vendor/jquery-1.9.1.min.js"></script>
to avoid issues due to non-availability of googleapis.com

@coliff
Copy link
Member

coliff commented Oct 6, 2015

HTML5Boilerplate is currently on v5.2.0.
v4.x is no longer maintained or updated.

@roblarsen
Copy link
Member

True, but the reference to googleapis.com is alive and well so the issue is valid.

@roblarsen
Copy link
Member

(When's the last time we talked about where we're loading jQuery from? Two years?)

@Jon007
Copy link
Author

Jon007 commented Oct 6, 2015

I think that was a typo, I was using 5.2.0.
I have tested the alternative CDNs listed on https://jquery.com/download/ and these all seem to be accessible from China without any tricks needed eg:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.4.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js"></script>

comment edited:

  • corrected markdown fail

@ghost
Copy link

ghost commented Oct 7, 2015

I'm not really sure if h5bp should adapt to any form of censorship as a default, which if I understand correct is the case here? Perhaps it could be added to the docs? If else 👍 for code.jquery.com.

roblarsen added a commit to roblarsen/html5-boilerplate that referenced this issue Jan 6, 2016
This commit closes h5bp#1737

In countries where googleapis.com is blocked (China and other countries)
H5BP is broken out of the box as jQuery will not load until the request
times out. This commit changes the default jQuery source to use the
jQuery CDN. The jQuery CDN is as fast or faster (by some reckoning) than
the Google Hosted Libraries version and is available worldwide. While
the chance of hitting the cache lottery is smaller with the jQuery CDN
(it's not as ubiquitous as Google) that chance is not enough to override
the need to ship working code for everyone in the world.
@alrra alrra closed this as completed in 340b012 Jan 9, 2016
eleanor-byhook pushed a commit to eleanor-byhook/html5-boilerplate that referenced this issue Feb 29, 2016
In countries where `googleapis.com` is blocked (e.g.: China),
HTML5 Boilerplate is broken out of the box as jQuery will not load
until the request times out.

This commit changes the default jQuery source to use the jQuery CDN
as it is as fast or faster (by some reckoning) than the Google Hosted
Libraries version and is available worldwide.

While the chance of hitting the cache lottery is smaller with the
jQuery CDN (it's not as ubiquitous as Google), that chance is not enough
to override the need to ship working code for everyone in the world.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix h5bp/html5-boilerplate#1737
Close h5bp/html5-boilerplate#1739
jeffreznik pushed a commit to jeffreznik/sw-test that referenced this issue Oct 15, 2017
In countries where `googleapis.com` is blocked (e.g.: China),
HTML5 Boilerplate is broken out of the box as jQuery will not load
until the request times out.

This commit changes the default jQuery source to use the jQuery CDN
as it is as fast or faster (by some reckoning) than the Google Hosted
Libraries version and is available worldwide.

While the chance of hitting the cache lottery is smaller with the
jQuery CDN (it's not as ubiquitous as Google), that chance is not enough
to override the need to ship working code for everyone in the world.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix h5bp#1737
Close h5bp#1739
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants