Physics is the universe's operating system. -- Steven R Garman

lazyOnLoad

lazyOnLoad works the same way as scripts using afterInteractive. However it will only be loaded during idle time. Next.js uses the window.requestIdleCallbackmethod to check if browser is idle.

Third party scripts that have the lowest priorities should be loaded using lazyOnLoad strategy. For example, third party for comments (that is if comments is something not hugely important).

Sample Code

// code omitted for brevity
<>
<Script src="https://connect.facebook.net/en_US/sdk.js" strategy="lazyOnLoad />
</>