Lately we’ve been using jQuery more often within our projects. I’ve realized that it becomes a hassle to include the jQuery library for each and every project. When jQuery updates to a newer version it also leaves legacy versions scattered thoughout our projects. As a solution we can make use of Google’s generosity and link to the AJAX Libraries API.
This allows us to link directly to a centrally hosted copy of the latest version of jQuery. The hosted version is also compressed and minified for a smaller file size.
To load in jQuery hosted by Google you can add the following <script> tag to your document’s <head> section.
There are obvious benefits and worries to this approach. For now, I like the idea because it allows me to get started on a jQuery project right away, without having to bring over a new copy.