Next.js Discord

Discord Forum

Latest version uses async scripts instead of defer

Jersey Wooly posted this in #help-forum
Open in Discord
Jersey WoolyOP
I was doing some performance analysis on my website and found my LCP element was blocked by JS execution. Digging more, noticed with latest version of NextJS, scripts (application server scripts generated by NextJS) are loaded async instead of defer. Is there any way to change this behavior?

Found this old issue where the default was changed from async to defer but looks like the default was changed back again ?

Tested with NextJS 14.0.3.

0 Replies