I looked through the WordPress documentation and couldn’t find any mention of async javascript loading using wp_enqueue_script(), is it possible at all? I have a couple of scripts and would rather async load them to improve the user loading experience!
Leave a Reply
You must be logged in to post a comment.
You can use
wp_enqueue_script()
to load a “script loader”, which is a script that loads other scripts. That way, you are loading the bootloader synchronously, but the others asynchronously.Your script-loader could contain this: