I recently moved the site to use Google AJAX libraries instead of hosting the js library files myself. I am currently using the Google recommended approach:
<script type="text/javascript" src="http://www.google.com/jsapi?key=MYAPIKEY"></script>
<script type="text/javascript">google.load('jquery', '1.3.2');</script>
But it seems a little silly for me to include an additional JavaScript file, so I can call another script file.
My question is whether there really is any advantage when calling these files through google.load(), rather than just including them through the script tag like this:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
My main reasons for using Google hosted libraries are the speed of their CDN / edge caching systems; Do I still get these benefits if I directly contact the file?
source
share