• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Archives for HTML5

HTML5

WordPress JavaScript async defer

Last updated on February 11, 2019 by Sal Ferrarello

When loading JavaScript on a webpage with the “script” tag, there are additional attributes you can add to tell the browser how and when to load the JavaScript (‘async’ and ‘defer’). In WordPress, there is not a native way to add these attributes but this code snippet does the trick.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming, Solution Tagged With: HTML5, JavaScript, WordPress

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in