Defer Parsing of JavaScript

Defer parsing of JavaScript is like deferring JavaScript that we discussed in the previous section. For a web page to load, all the script contents must be parsed, or analyzed, and then built within the DOM tree. Obviously, the more JavaScript you have on a page, the longer this is going to take, which affects performance. So, developers have options, like the defer and async attributes, at their disposal to help improve response times and run JavaScript when, or where, necessary.

Again, this is especially important for mobile devices. The sooner the user can interact with your page, the longer you can keep them on your site instead of them having to be met with a page loading icon. To understand whether a specific page may need to defer parsing of JavaScript, run your page through a website speed test and review the specific recommendations. A quick review of your page’s performance can make all the difference to the user’s experience.

lighthouse

Lighthouse

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

PageSpeed Terms

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.

yslow

YSlow

YSlow is an open-source website analysis tool that can be used to identify web page performance issues. Learn more about the YSlow to enhance your web pages and the user experience.