I remember reading somewhere that it is a lot better to load a JS framework from Google's AJAX Libraries API, rather than using a locally hosted one.
This means that instead of :
<script src="jquery.js"></script>
You load the framework from Google:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
I think that the advantage was mostly about caching but I'm not sure about it.
Can someone explain to me the reason exactly on why it is better to load frameworks from Google instead of hosting them locally ?
There is a good chance another site will also be using the same js files from Google's servers, so the file will already be cached by your browser and it won't need to download it again for your site.
Check out this article for some of the other benefits as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With