Skip to content

Commit

Permalink
Docs: Update jQuery CDN related info from faq.md
Browse files Browse the repository at this point in the history
Update documentation to include the information from the recent
jQuery team announcement:

   "To mitigate the risk of “breaking the web”, the jQuery team
    decided back in 2013 that jquery-latest.js could not be
    upgraded to the 2.0 branch even though that is technically
    the latest version. There would just be too many sites that
    would mysteriously stop working with older versions of Internet
    Explorer, and many of those sites may not be maintained today.

    As jQuery adoption has continued to grow, even that safeguard
    seems insufficient to protect against careless use of
    http://code.jquery.com/jquery-latest.js. So we have decided to
    stop updating this file, as well as the minified copy, keeping
    both files at version 1.11.1 forever ...

    The Google CDN team has joined us in this effort to prevent
    inadvertent web breakage and no longer updates the file at
    http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js. That
    file will stay locked at version 1.11.1 as well."

   (from: http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/)

Ref: h5bp/html5-boilerplate#1554
  • Loading branch information
alrra committed Jul 5, 2014
1 parent c7b44e0 commit 27d4311
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions doc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@ Setting up a local server can be done using:

### Why don't you automatically load the latest version of jQuery from the Google CDN?

* The latest version may not be compatible with the existing plugins/code on
the site, plus, version updating should always be an intentional decision!
* The latest version has a very short cache time (`1 hour`) compare to the
specific version (`1 year`), which means that users won't get the benefits
of long-term caching.
The [file](http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js) to which
the Google CDN points to is [no longer updated and will stay locked at version
`1.11.1` in order to prevent inadvertent web
breakage](http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/).

In general, version updating should be an intentional decision! You shouldn't
include a URL that will always point to the latest version, as that version:

* may not be compatible with the existing plugins/code on the site
* will have a very short cache time compare to the specific version,
which means that users won't get the benefits of long-term caching

### Why is the Google Analytics code at the bottom? Google recommends it be placed in the `<head>`.

Expand Down

0 comments on commit 27d4311

Please sign in to comment.