Rohan Yeole - HomepageRohan Yeole

Using JSDelivr Purge but Cache Won’t Update?

By Rohan Yeole
Table of Contents
You hit the purge URL on JSDelivr, refresh your page, and… nothing. Still serving the old file.
You might be using like e.g
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yeole-rohan/ray-editor@main/ray-editor.css">
or exact version like
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yeole-rohan/ray-editor@main/ray-editor.css">
Instead of using cdn.jsdelivr.net, you can trigger a purge by replacing cdn. with purge. in the URL.
<link rel="stylesheet" href="https://purge.jsdelivr.net/gh/yeole-rohan/ray-editor@main/ray-editor.css">
Visiting the purge URL forces JSDelivr to clear its cache and pull the latest version from npm. 

This is especially useful for evergreen UMD builds used in GUIs, since the CDN can take up to 24 hours to update on its own.

checkout our mine new html based content editor here