Osmani says large bundles of JS scripts can slow the loading of a page and long JS execution times can cause a site to hang, due to monopolizing the page's UI thread.
SEE: Tips for building a successful career as a software engineer (free PDF) (TechRepublic)
These issues are particularly pertinent to mobile devices, he says, where the speed of network connections can vary widely and the "huge disparities between the performance of high-end and low-end phones" means JS execution time should be kept as low as possible.
"Download and execution time are the primary bottlenecks for loading scripts in 2019," he writes.
"Aim for a small bundle of synchronous (inline) scripts for your above-the-fold content with one or more deferred scripts for the rest of the page. Break down your large bundles so you focus on only shipping code the user needs when they need it."
Considering how sites and apps run in Chrome and other Chromium-based browsers has long been important to web developers.
Chrome has the largest browser market share worldwide, and Microsoft will soon switch to offering a new Chromium-based Edge browser.
- Six in-demand programming languages: getting started (free PDF) (TechRepublic)
- Telephone interview cheat sheet: Software developer (Tech Pro Research)
- Programming languages: Your best options (ZDNet)
- Want to learn programming? This startup pays you cryptocurrency to study Python (ZDNet)
- 10 popular programming languages developers should learn in 2019 (TechRepublic)
- Get our latest coverage about programming languages (TechRepublic on Flipboard)