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>
Clive Walkden
Posted:
Latest Articles
Linux —
How to Install NordLayer VPN Client on Ubuntu 20.04 and Connect to a Virtual NetworkA simple to follow installation guide for NordLayer VPN
Author
MySQL —
Mastering MySQL Database Imports on LinuxLearn 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.
Author
DevOps —
Mastering SSH Key Conversions for DevOpsA guide to convert SSH keys from one version to another using Linux CLI
Author