Um, its about your JavaScript...

Learn how to measure and track JavaScript performance to ensure your website is fast and responsive. Discover key metrics, performance budgets, and tools to optimize your JavaScript code for a better user experience.

Key takeaways
  • CPU metrics are important for understanding JavaScript performance. Blocking CPU time, in particular, can lead to jankiness and a poor user experience.
  • There is no one-size-fits-all metric for JavaScript performance. Different metrics are relevant for different types of websites and users.
  • Performance budgets can be used to track and manage JavaScript performance. They can be set for any metric that is supported by the browsers.
  • It is important to validate JavaScript metrics against business metrics. This will help you to ensure that you are focusing on the metrics that matter most to your users.
  • Lightweight JavaScript is not enough. You also need to make sure that your JavaScript is efficient and that it is not blocking the main thread.
  • Third-party scripts can have a significant impact on your website’s performance. It is important to track and manage third-party scripts carefully.
  • First CPU idle is a new metric that measures how quickly the browser responds to user input. This metric is important for understanding the user experience of your website.
  • First input delay is another new metric that measures how long it takes for the browser to respond to a user’s first input. This metric is important for understanding the interactivity of your website.
  • It is important to monitor your website’s performance over time. This will help you to identify trends and to track the impact of changes to your website.
  • There are a number of tools available to help you measure and track JavaScript performance. These tools can be used to generate performance budgets, track violations, and visualize performance data.