Shizzle

My little notebook

Let Google host jQuery for you

March 15, 2009

If you want to make use of Google’s hosting platform for all sorts of JavaScript libraries and want to use jQuery in your site, just insert this snippet into the header of your HTML document.

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

This blog post explains why Google hosting is a Good Idea.

Addition

We have started using Prototype and script.aculo.us at work. Here’s Google’s URL for it:

<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js" type="text/javascript"><!--mce:1--></script>
<script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/scriptaculous.js" type="text/javascript"><!--mce:2--></script>
Filed under: Mixed

1 Comment

  1. Rob says:

    Nice article. I wrote a similar, a little more in depth one at http://www.web-design-talk.co.uk/81/reasons-to-let-google-host-your-jquery-files/

    Thanks

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">