Just a quick post about jQuery on Google CDN

I was using 1.3.2 version of jQuery on this blog using Google CDN URL: http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js?ver=1.3.2. First this is not very good URL in the sense that few proxy is not good in caching the URLs with parameter. One example is squid. I am not sure about the current version of squid. That was not the reason for writing this post. I also got another trouble in that version. It is the content type. The above version has a content type: JScript Script File which is not a text file. and when you point that URL, it will prompt for download in both Firefox and chrome. I have not tested in Internet Explorer.

I was looking for the newer version to use and I got 1.4.4 version without above issues. Though the first problem discussed was not the Google created. It was my script which was using the jQuery like that. Second problem is Google created. wp_register_script was called unnecessarily complicate way. Here is an URL for the jQuery version 1.4.4. You can directly link (hotlink) from your website/blog.

This code can be used to tell WordPress that you already have jQuery on your installation and other plugins can use it. Many plugins need jQuery, and with the below code those all plugins are getting informed about the jQuery existence. So, they will not include it again.

if( !is_admin()){
   wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js');

JQuery has mentioned available jQuery CDNs, where you can directly hotlink from your blog/website.

Comments are open for an year period. Please, write here on Facebook page.