Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

How to cause JSDelivr to purge assets

by Roy Revelt   ·   posted on Tuesday, 30 August 2022   ·   a thoughtmeta

As you know, JSDelivr broadcasts all npm content from its CDNs for free. You can access any file of any package’s version ever published to npm. For example, there are “ever-green” URLs:

https://cdn.jsdelivr.net/npm/detergent/dist/detergent.umd.js

and exact versions:

https://cdn.jsdelivr.net/npm/detergent@3.2.0/dist/detergent.umd.js

Besides this cdn. URL, there’s also a purge URL — replace cdn. with purge.:

https://purge.jsdelivr.net/npm/detergent/dist/detergent.umd.js

Calling that URL will trigger JSDelivr to purge the CDN assets and fetch the latest from npm. That’s handy with ever-green UMDs because they power GUI’s (like these), and it can take up to a day for CDN to fetch the latest.

↑ back to top
older newer

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab