DOMContentLoaded fires when the HTML is fully parsed and deferred and module scripts have run, without waiting for images, iframes or late stylesheets. load fires only when every subresource, including images, has finished. Most app code only needs the DOM, so it should run at DOMContentLoaded (or simply as a defer/type="module" script): users can interact sooner, which helps perceived performance and INP. Waiting for load holds interactivity hostage to the slowest image. Use load only for code that genuinely needs final image sizes or every resource, such as measuring layout.
Checks they understand page lifecycle events
Last updated 23 Nov 2026.