Docs / JavaScript / Exclude Scripts from Defer

Exclude Scripts from Defer

Every script will not be compatible when you enable defer.

Sometimes you'll need to exclude some script from defer. A common suspect is jQuery!

You can exclude scripts from defer by adding the file or entire URL as a keyword (any word that matches the script tag).

For example, lets saw I've two script related to jQuery as follows:

<script src="https://example.com/wp-includes/jquery.min.js">
<script src="https://example.com/wp-includes/jquery.migrate.min.js">

In order to exclude both these scripts from defer, add keyword jquery to JavaScript -> Exclude Scripts from Defer.