Previous Article

jQuery A Beginning

Next Article

I've been using jQuery now for a few months and thought I'd share some observations.

First point is that the libraries are available for free on Google's server. This has some great benefits to your site including, Decreased latency and better caching.

Decreased Latency

When you request the script from Google, your location is given to Google and they can then serve you the file closest to your location. This means that if your site is in London, UK and you're in California, USA, Google will serve you the jQuery code from USA.

Better Caching

When someone visits your site for the first time they have to download your copy of jQuery, this is then cached for subsequent visits. The chances are that someone has already visited a site with Google's jQuery script so when requested the browser returns a 304 not modified. This means one less request and a quicker loading site.

Implementation

After reading the benefits I'm sure you're all asking "How do i set this up on my websites!" Well it's simple. Add the code below in your

tags of your website. Job Done!

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" type="text/javascript"></script>
Avatar of Clive Walkden

Clive Walkden

Posted:

Latest Articles

Linux command line tools, installations etc

Linux

How to Install NordLayer VPN Client on Ubuntu 20.04 and Connect to a Virtual Network

A simple to follow installation guide for NordLayer VPN

MySQL usage, tweaks and learnings

MySQL

Mastering MySQL Database Imports on Linux

Learn efficient ways to import MySQL databases on Linux using the mysql command-line client. Explore the --source option and < operator for seamless data migration. Master MySQL imports on Linux with our comprehensive guide.

DevOps principles and tool usage

DevOps

Mastering SSH Key Conversions for DevOps

A guide to convert SSH keys from one version to another using Linux CLI