JQuery

Keep your jQuery to latest release automatically

TAGs: 1 Comment

Posted By: eligeske on in JQuery

Here is a real quick way to add the jquery library to your website without having to worry about the version.

HTTPS:

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

HTTP:

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

Both are provided by google.

Now here are some reasons on why you may not want to do this.

CONS:
  1. The version of the library can change and if there are bugs in the newer version you may experience issues.
  2. If the version you have works with your code in a certain way, it can change without you knowing it.
  3. The less people using the above link means that less people have it cached in the browser. But this could also work in your favor.
  4. Google may someday change their link.
PROS:
  1. Makes it easy to stay up to date on your jquery library.
  2. If you have re-usable templates or presets to your IDE, you could have it set to this without needing to change to newer version.
  3. Enables laziness.
  4. Enabling laziness could actually mean, more time to code. 

Well there ya have it, a real easy way to add the jquery library to your website or application without have to worry about minor releases.

One Response to "Keep your jQuery to latest release automatically"

"SHARING IS CARING"
  1. PaulH says:

    Nice tip! Thanks. Also you can use src="//ajax.googleapis.com/ajax/libs/..." which negates the need to decide if you are in an htpp or an https environment.

Learning DHTMLX Suite UI

Learn the foundation of the DHTMLX Suite quickly while building a single page application with multiple components in harmony.

Popular post