/ jQuery

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

Latest Articles

Linux command line tools, installations etc

Linux

Terraform Installation

A quick installation guide for Terraform on Ubuntu 18.04

Bitcoin - Cryptocurrency not just for geeks

Bitcoin

RollerCoin Intro

An introduction to the RollerCoin site and how you can use it to mine your own coins

Magento 2 Blog Posts

Magento 2

Magento 2.4.x Writing to a Log File

How to log to information to a file in different Magento 2.4.x versions