Make Your Site Faster with Async and Deferred JavaScript: Introducing script_loader_tag – WPShout

Learn how to speed up your WordPress page loads by using the script_loader_tag filter. WPShout explains how.

Today I’m going to discuss a new, and very nice, site speed improvement that became possible in WordPress 4.1. What changed? The introduction of a new filter, script_loader_tag. This filter lets us easily change the HTML markup of enqueued script elements—that is, of JavaScript files that were correctly added into a WordPress site using WordPress’s wp_enqueue_script function.

Source: Make Your Site Faster with Async and Deferred JavaScript: Introducing script_loader_tag | WPShout