Local CDN for Chrome

Local CDN is a browser extension for the Google Chrome browser that will load certain libraries from the local system instead of content distribution networks.

The extension is a fork of the Decentraleyes add-on that is only available for Firefox, and brings the add-ons functionality to Chrome and Chromium-based browsers.

If you monitor network traffic when you connect to sites, for instance by opening the networking tab of the browser's Developer tools, you may notice that a lot of sites load libraries.

Some load them from the local server, while others may load them from popular content distribution networks, for instance Google's or CloudFlare's.

Local CDN for Chrome

local cdn

Local CDN ships with local copies of these libraries. It redirects requests to the local copies whenever a site tries to load one of these matching libraries.

The core benefits for the user are twofold. First, loading libraries from the local system is always faster than loading it from a remote host.

Second, a connection to the remote host is not made, which means that your device's IP address does not end up in the log file of said site.

Local CDN adds an icon to Chrome's toolbar that indicates the number of libraries that it redirected to local files.

You can verify this by opening the Network tab in Chrome, and looking for resources with the status code 307 internal redirect under headers.

The following hostnames are supported by the current version of the extension:

  • ajax.googleapis.com
  • ajax.aspnetcdn.com
  • ajax.microsoft.com
  • cdnjs.cloudflare.com
  • code.jquery.com
  • cdn.jsdelivr.net
  • yastatic.net
  • yandex.st
  • libs.baidu.com
  • lib.sinaapp.com
  • upcdn.b0.upaiyun.com

Only supported libraries are redirected. The developer states that "almost all versions" of the following libraries are supported:

  • angular
  • backbone
  • dojo
  • ember
  • extCore
  • jQuery
  • jQueryUI
  • modernizr
  • mootools
  • prototypeJS
  • scriptaculous
  • swfobject
  • underscore
  • webfont

For the extension to do anything, it is therefore required that a site loads one of the supported libraries from one of the supported hostnames. If it does not do one or the other, libraries won't be loaded from the local system.

Local CDN resolves one of the gripes that I had with Decentraleyes for Firefox. It highlights if resources are replaced with local copies, whereas the Firefox add-on did not do that back then when I reviewed it.

The extension is as limited as the Firefox add-on when it comes to flexibility. It is not possible to add your own CDN servers to the list for instance, or configure the extension to load these libraries even if they are not loaded from a CDN but the site in question directly.

Closing Words

Local CDN is a useful extension for Chrome that improves privacy and also speed when supported libraries are loaded from hostnames that it supports. It is likely that it works in other Chromium based browsers as well, and maybe even in Firefox. That has not been tested however.

Now You: Feel free to share your experience using the extension in the comment section below

Summary
Author Rating
2.5 based on 6 votes
Software Name
Local CDN
Software Category
Browser
Landing Page
Please share this article

Facebooktwittergoogle_plusredditlinkedinmail



Responses to Local CDN for Chrome

  1. Ken February 15, 2017 at 11:02 pm #

    Hi Martin. Long time user of DecentralEyes here. Another benefit not mentioned: user is not vulnerable to attack from a Man-in-the-middle serving malicious script when scripts are loaded over non-secure pages (eg: attacker poisoned your DNS cache so your browser resolves whatever.cdn.com/file.js to a malicious file)

    One note of correction: on Firefox, although DecentralEyes doesn't make its redirection obvious in the UI (the author said he would but hasn't yet), the extension does add a note to the source script. If you use dev tools to view the source for a locally loaded script, you will see a note from the extension above the script.

    Finally, one limitation you mentioned was that the script is not locally loaded unless the original URL is one of the supported domains. This makes sense (at least until sub-resource-integrity checks become standard) because the extension has no way to know that a file of the same name but from a different URL is in fact the same script as from the supported URL

  2. Jonnyredhead February 17, 2017 at 12:24 am #

    So this is safe to use Martin. Installing on Opera and Vivaldi also.

  3. greg February 18, 2017 at 11:56 pm #

    Has anyone tested this for actual speed benefits? Does it make a significant difference in page load times?

  4. war59312 February 19, 2017 at 7:11 am #

    Has security issues, see: https://github.com/Synzvato/decentraleyes/issues/124

  5. Helpful March 14, 2017 at 12:03 pm #

    Decentraleyes is now available for Chrome!

    https://chrome.google.com/webstore/detail/decentraleyes/ldpochfccmkkmhdbclfhpagapcfdljkj

  6. Brandon Giesing March 24, 2017 at 11:00 pm #

    So this is like Web Boost (http://webboost.fse.guru/ and https://chrome.google.com/webstore/detail/web-boost-wait-less-brows/ahbkhnpmoamidjgbneafjipbmdfpefad?hl=en) but with select local cdn files cached at add-on install time instead of any cdn file cached on first load?

Leave a Reply