Updated

Technology · Servers & delivery

Google Hosted Libraries

developers.google.com

What is Google Hosted Libraries?

Google Hosted Libraries is a content delivery network that serves popular open-source JavaScript libraries from Google's servers. A site loads a library by adding a script tag that points to the hosted copy.[1]

Google Hosted Libraries is a robust, reliable, and high-speed content distribution network specifically designed for popular, open-source JavaScript libraries. It leverages Google's vast global infrastructure to deliver commonly used libraries such as jQuery, Angular, and React with minimal latency. This service allows developers to include these libraries in their projects without hosting them locally, saving bandwidth and improving page load times. Google Hosted Libraries ensures that the most up-to-date versions of libraries are always available, and it supports both HTTP and HTTPS protocols. By using this service, developers can benefit from Google's proven reliability and performance optimization techniques, enhancing their websites' overall user experience.

Google Hosted Libraries belongs toCDNcategory.

What it is

A content delivery network for JavaScript libraries[1]

How to use it

Paste an HTML snippet into your page[1]

Protocol

Google recommends loading over HTTPS[1]

Versions

Google accepts new versions as library teams release them[1]

144websites

use it — 5.7% of the 2,539 websites we scanned in the last 12 months

#7of 28

tools in its category seen in our scans (we recognize 69)

60public pages

on UptimeCard — open any of them to see how that site is doing

In short: a way to load common JavaScript libraries without hosting the files yourself. Load them over HTTPS.[1]

4% of all websites we track run Google Hosted Libraries

What is Google Hosted Libraries used for?

In short, from the websites we scan

Loading libraries without hosting them
A page loads libraries such as jQuery from the hosted network instead of its own server.[1]
Adding a library with one snippet
Each library has an HTML snippet that you copy into your page.[1]
What it does
Google Hosted Libraries is one of the CDNs websites use. In our scans it is #7 of the 28 we see.
On real websites
Among 54 public websites we scan that use it: delivering JavaScript libraries (52 sites), caching scripts for speed (30 sites), offloading origin bandwidth (6 sites). Counted automatically from a short description of each site (one site can do several jobs), so read it as an estimate.
Who uses it
Compared with all public websites we scan, it is more common in Business Services (18% of its sites, 12% overall), Software as a Service (SaaS) (10% of its sites, 6% overall).
Used together with
It is often installed next to Google Analytics, Google Tag Manager, Cloudflare.

Should you use Google Hosted Libraries?

The 10-second version, from the vendor’s own pages and what we see in our scans

Google Hosted Libraries fits if…

  • You want to load a common open-source library from a shared network instead of your own server[1]
Load the files over HTTPS, even if your own site only uses HTTP[1]

Google Hosted Libraries next to other library CDNs

All four serve open source JavaScript libraries by URL. Wording comes from each service's own page.

Google Hosted LibrariesjsDelivrcdnjsUnpkg
What each one serves
Described asLibrary CDNfor popular open-source libraries[1]Free CDNfor open source projects[2]Free CDNfor open source libraries[3]CDN for npmfor everything on npm[4]
Where files come fromLibrary teamsGoogle accepts new versions as released[1]npm and GitHub[2]JS, CSS and fonts[3]Any npm package file[4]
NetworkGlobal network[1]Multi-CDNglobal network built for production[2]Cloudflare[3]Cloudflare edge[4]
What we see in our scans
Websites running it1445.7% of 2,539 scanned sites31812.5% of 2,539 scanned sites2419.5% of 2,539 scanned sites1054.1% of 2,539 scanned sites
Typical page load time4.4 s59 public sites4.0 s157 public sites3.9 s100 public sites3.8 s✓45 public sites
Typical page weight3.2 MB✓typical home page3.5 MBtypical home page4.5 MBtypical home page4.4 MBtypical home page
Security grade B or better24%5 of 21 graded sites score B or better29%✓12 of 42 graded sites score B or better21%7 of 34 graded sites score B or better25%2 of 8 graded sites score B or better
  • jsDelivr: A free CDN for open source projects, delivered from npm and GitHub[2]
  • cdnjs: A free CDN for open source libraries, cached on Cloudflare's network[3]
  • Unpkg: A CDN that loads any file from any npm package by URL[4]

Choose Google Hosted Libraries if…

  • You want a short list of popular libraries served by Google, loaded with a copy-paste snippet[1]

Choose jsDelivr if…

  • You want to load files straight from npm or GitHub[2]

Choose cdnjs if…

  • You want JavaScript, CSS and font files cached on Cloudflare's network[3]

Choose Unpkg if…

  • You want any file from any npm package by URL[4]

How Google Hosted Libraries sites protect themselves

Share of the 144 sites we scanned that run each protection

HSTS63% · 91 sites

HTTP Strict Transport Security (HSTS) informs browsers that the site should only be accessed using HTTPS

reCAPTCHA24% · 34 sites

reCAPTCHA is a free service from Google that helps protect websites from spam and abuse

Protections add up, they do not replace each other: a site can run all of them.

What sites use Google Hosted Libraries for

An estimate from UptimeCard's technology map of 54 public sites

Runs the whole site43 sites

accurx.com · appfigures.com · appspace.com

Runs the marketing site10 sites

accredible.com · aplos.com · billpocket.com

Runs a shop or catalog1 sites

shippit.com

Rough guide, not a measurement: each description is written automatically from the site’s technology stack and the site has not confirmed it. A site is counted once, in the first group its description fits (shop, help and docs, blog, marketing site; otherwise the whole site). Descriptions that only guess (“likely”, “may”) are left out.

At a glance

UptimeCard's own scans and tests of 2,539 websites · refreshed weekly

How Google Hosted Libraries sites scoreout of 100 · hover or tap a score for details

49PerformancePooraverage site: 5190AccessibilityGoodaverage site: 9196Best practicesGoodaverage site: 9692SEOGoodaverage site: 92

Page load time

Loads about 27% slower than the average site

Google Hosted Libraries sites
4.4 s
All sites
3.5 s

Most Google Hosted Libraries sites load in 3.3–7.9 s. Home page weight: 3.2 MB vs 3.4 MB for all sites. 59 public sites measured.

Where are they hosted?

Mostly Cloudflare and Amazon Web Services

  • Cloudflare55%
  • Amazon Web Services18%
  • Google Cloud3%
  • Akamai International B.V.2%
  • Other22%
United States 70%Canada 15%KE 2%

Who uses it?

Software as a Service (SaaS) sites use Google Hosted Libraries 1.7× more than average

Technology and Software53%
Business Services1.6× avg18%
Software as a Service (SaaS)1.7× avg10%
E-commerce7%

Share of 60 classified public sites. “× average” compares with all 961 public sites.

Browser-security check

24% of graded sites pass

5of 21 score B or better

Rates each site’s own security settings, not Google Hosted Libraries. 21 public sites graded so far.

How Google Hosted Libraries sites are built

Closest partners. The number says how many times more often the tool runs on Google Hosted Libraries sites than on an average website. Hover a partner for its share of sites.

Webflow9×LottieFiles4×jsDelivr3×Unpkg3×cdnjs3×Hotjar3×Linkedin Insight Tag2×DoubleClick Floodlight2×Reddit Ads2×

Stacks we see most. Tools that tend to run together with Google Hosted Libraries on the same websites. The percentage is the share of all 144 Google Hosted Libraries sites that run the whole stack.

7 stacks · swipe, drag or use the arrows
#1

Google Hosted Libraries + jsDelivr + Webflow + Unpkg

4.9%7 of 144 sites
#2

Google Hosted Libraries + CivicTheme + Oxygen

4.9%7 of 144 sites
#3

Google Hosted Libraries + Webflow + cdnjs + GSAP

2.8%4 of 144 sites
#4

Google Hosted Libraries + jsDelivr + cdnjs + jQuery CDN

2.8%4 of 144 sites
#5

Google Hosted Libraries + cdnjs + Unpkg

3.5%5 of 144 sites
#6

Google Hosted Libraries + Amazon S3 + Webflow Ecommerce

2.8%4 of 144 sites
#7

Google Hosted Libraries + jsDelivr + Osano

2.8%4 of 144 sites

Usually installed alongside

The bigger the bubble, the more of the 144 Google Hosted Libraries sites also run the tool. Colour shows what the tool does. Hover or tap a bubble for details.

Google Analytics81%Facebook Pixel41%Linkedin Insight Tag40%Google Tag Manager80%Webflow33%DoubleClick Floodlight22%Microsoft Advertising22%Linkedin Ads13%HubSpot22%OneTrust15%
AnalyticsTag managerPage builderAdvertisingMarketingCookie consent

Similar tools in its category

CDN: 69 tools known, 28 seen in our scans

How websites combine Google Hosted Libraries with other tools

Relationships found on the websites that use it, from the same map status pages show.

Needs another tool 23Overlaps with another 13Built on a platform 12Complements another tool 10Integrates with another 5

Websites using Google Hosted Libraries

144 websites use Google Hosted Libraries: 5.7% of the 2,539 websites we scanned in the last 12 months. A selection is shown below.

Scores are out of 100: P Performance · A Accessibility · B Best practices · S SEO. Green 80+, yellow 65–79, orange 50–64, red below 50. The dot shows whether our last scan found the site failing (red) or not (green); Red, amber or blue: an active incident on the site's status page (outage, degraded, maintenance) or a failing scan; amber also means a certificate ending within 30 days. Hover the dot for details.

Who is behind Google Hosted Libraries

From its own pages and public records, with sources

Operated by

Google[1]

Questions about Google Hosted Libraries

What is Google Hosted Libraries?
Google Hosted Libraries is a content delivery network that serves popular open-source JavaScript libraries from Google's servers. A site loads a library by adding a script tag that points to the hosted copy.
What is Google Hosted Libraries used for?
A page loads libraries such as jQuery from the hosted network instead of its own server. Each library has an HTML snippet that you copy into your page. Google Hosted Libraries is one of the CDNs websites use. In our scans it is #7 of the 28 we see. Among 54 public websites we scan that use it: delivering JavaScript libraries (52 sites), caching scripts for speed (30 sites), offloading origin bandwidth (6 sites). Counted automatically from a short description of each site (one site can do several jobs), so read it as an estimate. Compared with all public websites we scan, it is more common in Business Services (18% of its sites, 12% overall), Software as a Service (SaaS) (10% of its sites, 6% overall). It is often installed next to Google Analytics, Google Tag Manager, Cloudflare.
How do I add a hosted library to a page?
Copy the HTML snippet for that library into your page.[1]
Should I load the files over HTTP or HTTPS?
Google recommends HTTPS, even if your own website only uses HTTP.[1]
Which libraries are hosted?
The page lists many popular libraries, including Bootstrap, D3.js, Dojo, Hammer.js, jQuery and jQuery Mobile, each with its own snippet.[1]
Does Google add new versions?
Google works with each library's key stakeholders and accepts the latest versions as they are released.[1]
How do I load jQuery from it?
Embed the script tag for the jQuery file hosted at ajax.googleapis.com.[1]
How many websites use Google Hosted Libraries?
We found Google Hosted Libraries on 144 of the 2,539 websites we scanned in the last 12 months (5.7%). 60 of them have a public status page.
What are the alternatives to Google Hosted Libraries?
Other CDNs we recognize include Cloudflare, Amazon CloudFront, jsDelivr, cdnjs.

Is your website built with Google Hosted Libraries?

Create a free status page that shows your visitors your site is up. It also gives your site its own public page where new people can discover it.

Example status page card