BACK TO DIRECTORY

NextGenThemes jsDelivr CDN

by Nicolas Jonas

5.0
(6 ratings)

It replaces all assets with versions available on jsDelivr. No options, nothing to configure, just works.

The code needs to be openly hosted on NPM, Github or wordpress.org.

This plugin adds a little a invisible button in the admin bar on the top right, left of “Howdy, {Name}”. It turns dark red on hover. You can click that and see the assets loaded from jsDelivr. I hope you appreciate how I made it so its not annoying or distracting.

Security

The plugin serves your assets securely. It takes two hashes of your assets (and caches them). One sha256 hash for the jsDelivr API to check if the file is hosted there, another sha384 hash that is put on the integrity attribute of every asset to make 100% sure that the exact same file you have on your server is the served by the CDN! In case this would ever not be the case the files gets rejected client side.

External services

This plugin serves JavaScript and CSS assets from the jsDelivr CDN (cdn.jsdelivr.net, no affiliation) instead of your own server. It also uses the jsDelivr hash lookup API (data.jsdelivr.com) to find whether a file is available on the CDN.

To detect CDN files, the plugin sends a SHA-256 hash of each local asset’s content to the jsDelivr lookup API. Asset requests to the CDN and the hash lookup are made from your server when a page is loaded; your visitors’ browsers then load the assets directly from cdn.jsdelivr.net. jsDelivr may log standard request metadata such as IP addresses and requested URLs (see their policies below).

The CDN and API are provided by Volentio JSD Limited (jsDelivr). See their Terms of Use and Privacy Policy.

Your donation would be appreciated

It took me a lot of time to come up with this plugin and I had many iterations over various different approaches how to do this until I came up with this working solution that also does not need much code. I know the official plugin was abandoned years ago and I looked at complicated bloated code and did not even feel like learning what its doing and never looked at it again and started from scratch.

Please check out my commercial plugin and level up your video embeds with ARVE Pro or Donate here

Plugin Details

Active Installs
300
Total Downloads
18,903
Version
1.3.8
Requires WP
6.5
Requires PHP
8.0
Tested Up To
7.0.4
Added
2018-09-01
Last Updated
2026-08-20 5:12pm GMT

Ratings

5
6
4
0
3
0
2
0
1
0