this is why you should let Google to host your jQuery

usually I put the jQuery inside <HEAD> tag like this:

<script type=”text/javascript” src=”jQuery.min.js” ></script>

I found that most of the other script made by other programmer did the same I did. The method above will call the jQuery.min.js which is in the same folder with the script (you host the script). If you’re doing this on a public facing* website, you are doing it wrong. why? Coz you will have to use more resource, more bandwidth, and also more space in your hosting even it don’t use to much space Just kidding I think you should use Google AJAX Libraries content delivery network to serve jQuery to your users directly from Google’s network of datacenters. By doing this, you got several advantages : decreased latency, increased parallelism, and better caching. So how should we add the jQuery? The very simple way is by using the method below:

<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script>

For more information on method and the reason explanation, you can visit this page:

Encosia.com

Andi Setiawan

Loving husband - Caring Father - Slap bet Commissionaire (I wish) find my complete profile on: http://andisetiawan.com/about-me http://facebook.com/andiim3 - http://gplus.to/andiim3 - http://andiim3.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.