In this Article
This option addresses the PageSpeed recommendation:
“Eliminate render-blocking resources”
If you have any issues on your site after activating this option, you may need to activate Safe Mode, which excludes jQuery from being deferred, for compatibility reasons:
Depending on your site, you may also need to exclude some more files from being deferred:
Exclude files from Defer JS
Files that will not have defer applied
defer attribute will not be applied to elements that already have either of the following attributes:
Files excluded for compatibility
If you have enabled Safe Mode, jQuery.js is excluded to prevent issues on your site. You can try disabling Safe Mode, but make sure you check your site carefully while logged out of WordPress, to make sure everything is working as expected on your site.
We automatically exclude this Google Recaptcha file to prevent an issue.
- There are a few other automatic exclusions we make to prevent known issues when deferred. List of excluded files
Files injected by Cloudflare
If you've activated certain options in Cloudflare they will inject some JS files when the page loads. We don't have control over them and they won't be deferred. For example, if you've activated their Email Address Obfuscation feature, you'll find this file listed by GT Metrix:
Files loaded indirectly
- Google Recaptcha files, e.g:
- Youtube files, e.g:
Files without a .js extension
Files must have a .js extension to be deferred. Common examples of files flagged by GT Metrix, without the .js extension:
- Google Maps files, e.g.
- Youtube files, e.g.