☰
PageSpeed Optimizations · Chapter 10 of 45

PageSpeed Optimizations – Combine External JavaScript

Just as combining external CSS helps improve page load time and reduce latency, so does combining external JavaScript. And like the PageSpeed recommendation for combining CSS, the recommendation for combining JavaScript is similar. Additionally, they recommend splitting JavaScript into two files, one that loads the minimum code needed at initial startup, and one to render after the page load has completed. Another caveat of JavaScript is that browsers will not load the rest of a page if they encounter JavaScript code. It must download that file first and then work on the rest of the page elements. Additionally, consider where the JavaScript code is positioned in relation to other elements, to help take advantage of parallel loading.

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.

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.

See this audit in your own report

Run a free real-browser speed test from up to 3 of 30+ locations: Lighthouse, waterfall, Core Web Vitals and video.

Run a free speed test