GitHub source code address: https://github.com/justjavac/ReplaceGoogleCDN .
Replace Google CDN with domestic ones.
origin
For well-known reasons, you only need to replace a domain name to continue using the front-end public library provided by Google.
Similarly,script
tag, so that the website access speed can be speeded up instantly!
Many websites, especially foreign websites, use Google's CDN in order to speed up the website.
However, in China, due to some reasons, the fastest CDN in the world has become the slowest in the world.
So, I wrote this plug-in/extension to replace Google's CDN with a domestic one.
principle
This plugin/extension can replace the following CDN resources with domestic ones:
ajax.googleapis.com
-front-end public libraryfonts.googleapis.com
-free font librarythemes.googleusercontent.com
-fonts sometimes use the resources in thisfonts.gstatic.com
-free font librarywww.google.com/recaptcha
-Google Image Verification Librarysecure.gravatar.com
-gravatar avatar
effect
After installing the extension/plugin, visit the https://stackoverflow.com/questions page:
The first line is the original request https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
, which was intercepted and replaced. The returned status code was 307 Internal Redirect, which took 26ms. The third line is the request after jquery.min.js is replaced, 33kB, and it takes 95ms.
The following table is a comparison of network requests for various resources (100% based on the speed after replacement):
Resources | source | Size(kB) | Time (ms) | Speed (B/ms) | percentage |
---|---|---|---|---|---|
jquery.min.js | ajax.googleapis.com | 0 | 26 | - | - |
stub.en.js | cdn.sstatic.net | 18.0 | 293 | 61.4 | 18% |
jquery.min.js | ajax.loli.net ⚡️ | 33.1 | 95 | 348.4 | 100% |
clc.min.js | cdn.sstatic.net | 4.2 | 399 | 10.5 | 30% |
full.en.js | cdn.sstatic.net | 99.6 | 534 | 186.5 | 54% |
gpt.js | securepubads.g.doubleclick.net | 21.3 | 85 | 250.6 | 72% |
analytics.js | google-analytics.com | 19.6 | 79 | 248.1 | 71% |
quant.js | secure.quantserve.com | 9.1 | 420 | 21.7 | 62% |
beacon.js | sb.scorecardresearch.com | 1.8 | 73 | 24.7 | 71% |
integrator.js | adservice.google.com 🐌 | 0.3 | 87 | 3.4 | 1% |
markup.js | clc.stackoverflow.com 🐌 | 9.2 | 252 | 36.5 | 10% |
osd.js | googletagservices.com | 28.1 | 90 | 312.2 | 89% |
rules-p-c1rF4kxgLUzNc.js | rules.quantcount.com 🐌 | 0.4 | 96 | 4.2 | 1% |
keyboard-shortcuts.en.js | cdn.sstatic.net | 7.3 | 75 | 97.3 | 27.9% |
installation
Online installation
Manual installation
Chrome installation method (Google is blocked by the wall):
- Download ReplaceGoogleCDN and unzip it to find the
extension
subdirectory- Open Chrome and enter:
chrome://extensions/
- Check Developer Mode
- Select Load unpacked extension... and then navigate to the chrome directory in the unpacked folder, confirm
- This is installed, remove the Developer Mode check.
GitHub source code address: https://github.com/justjavac/ReplaceGoogleCDN .
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。