Latest version uses async scripts instead of defer with app router #58982
Replies: 3 comments
-
@ijjk / @timneutkens / NextJs Community - Is this expected to fix soon as impacting application performances. |
Beta Was this translation helpful? Give feedback.
-
Same problem here. |
Beta Was this translation helpful? Give feedback.
-
@AdarshKonchady it looks like version 13.5.4 has better performance. Still using async in head scripts, but switching back from 14.1.0 my doc head passed from having more than 30 script tags to 3, and my LCP from 5-6 sec to 2.7s. More details on 57989. |
Beta Was this translation helpful? Give feedback.
-
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 ?
#11120
Tested with NextJS 14.0.3.
Beta Was this translation helpful? Give feedback.
All reactions