PERFORMANCE

JavaScript and third-party services: take back control.

A page can be light to download but expensive to execute.

MEASURE→UNDERSTAND→VERIFY

Take inventory before removing scripts

List the scripts used for navigation, analytics, videos, chat or commercial integrations. For each one, note who added it, its purpose and the pages where it is essential. A component in a shared template may load everywhere even if only one page needs it. This inventory helps you discuss choices with someone who understands the features.

Identify long tasks

A small file can trigger a lot of computation. Use the browser’s Performance panel to observe work during loading. The report’s TBT is a lab indicator; on its own, it neither identifies the responsible function nor replaces measurements of visitor interactions. Distinguish download size, processing time and user behavior.

Defer what can wait

A video below the fold can sometimes start as a preview that the user activates. A secondary tool may wait for interaction. However, arbitrarily delaying a script needed by a menu or form can break the page. Test on a copy of the site and document script dependencies before changing their order.

Check side effects

After making a change, test important journeys: search, navigation, forms and payment if available. Run another test with the same profile and compare metrics, not just the overall score. If a speed improvement harms a useful feature, reconsider it. Keep a simple way to restore the previous version.

Your next action

Choose one page, note what you want to check and save a report. After making a change, use comparison to examine the differences. Review the context before concluding that there has been an improvement.

Open the optimization checklist ↗

Sources and scope

This guide suggests a working method. No numerical improvement is guaranteed. To check definitions and explore the audits: official documentation.

Put this guide into practice ↗

Continue reading

All guides ↗

Further reading