Load styles/scripts synchronously (or asynchronously) via HTML 'preload'.
Harness the power of
<link rel="preload"> in Chrome and other modern browsers. This library provides a useful set of utilities that can be used to preload styles and scripts, then load them in order, or just load them straight away — synchronously or asynchronously. To learn more, see: Preload: What Is It Good For? & Chop-Chop Docs.
$ npm install chop-chop --save;
$ yarn add chop-chop;
unpkg.com CDNOr install via
If you need to support IE <= 11 (prior to Edge), older versions of Android, and much older versions of other browsers, you can insert this polyfill before all other script tags. The polyfill.io service fills ES6 features that a user's browser is lacking, based on both UA & feature detection.
<!-- Before ALL other script tags in your document. --><!-- Only needed if you want to support much older browsers. -->
More Examples / Documentation
- See: Chop-Chop Docs
This software is created, documented and maintained by Jason Caldwell (
@jaswrks) and a small team of talented developers at ‹src.works/›. It's open source, but if you use it commercially, please pay what you can.
Always use the latest stable version in production. If you want upcoming changes ahead of time use the
@rc tag, but please do so at your own risk. The
@rc tags are potentially unstable at various times throughout a development cycle, and therefore should not be used in production.
|Hackers||@dev||Latest Bleeding Edge
|Lab Rats||@rc||Next Release Candidate
upcoming semi-stable release
|Everyone||@latest||Latest Stable Version
NPM Consumption Examples
|Channel||NPM Tag||NPM package.json|
|Latest Stable Version||
|Channel||NPM Tag||NPM Install|
|Latest Stable Version||
CDN Directory Indexes
|Channel||NPM Tag||CDN Distribution Index|
|Latest Stable Version||https://firstname.lastname@example.org/dist/|
CDN Script URLs
|Channel||NPM Tag||CDN Script URL|
|Latest Stable Version||https://email@example.com|
In production, use the latest stable version with an SRI integrity hash.
Tip: Don't use an SRI hash with a tag like
@latest. Tags reference a version dynamically; e.g., the
@latest tag will point to an updated copy once the next version is released — rendering the SRI invalid. Instead, use a specific
@x.x.x version in the URL.
For full details see: LICENSE.txt
For full details see: CHANGELOG.md
New versions are released following semver.org guidelines.