Created
September 14, 2013 17:18
-
-
Save mojaray2k/6563800 to your computer and use it in GitHub Desktop.
The best first step to improving the JavaScript performance of your web site is to simply include the latest
version of jQuery, as every new release brings more optimizations and bug fixes. Requesting jQuery from a CDN
is also a good choice, as it will minimize the loading time of your site (a CDN is faster to serve the library, and
many people …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- jquery-cdn-js.html--> | |
<!-- Case 1 - requesting jQuery from the official CDN --> | |
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> | |
<!-- Case 2 - requesting jQuery from Googles CDN (notice the protocol) --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<!-- Case 3 - requesting the latest minor 1.10.x version (only cached for an hour) --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10/jquery.min.js"></script> | |
<!-- Case 4 - requesting the absolute latest jQuery version (use with caution) --> | |
<script src="http://code.jquery.com/jquery.min.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment