Luckily, there is an additional option, which is sometimes referred to as asynchronous loading, but also called deferred loading or lazy loading. However, from a scripting perspective, defer and asynchronous are two separate attributes. Setting the defer attribute tells the browser to process the HTML and not wait for the script. The script will load in the background and will run once the DOM is finished. This ensures that page loading is never delayed. It is also important to note that the defer attribute should be used only with external scripts. On the other hand, the async attribute, while like the defer attribute, scripts will load in the background and run when they are finished downloading, but the DOM and other third-party scripts, for example, do not wait for each other.
Lighthouse is an open-source tool that is used to run an audit against your web pages and provides scores and suggestions for improving page performance, accessibility, SEO, and more.
PageSpeed Insights is a tool created by Google that reports on the performance of a page on both mobile and desktop devices, and provides suggestions on how that page may be improved.