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
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:
Posted in general, programming, Tips n Trik |