Issues

PageSpeed: Duplicated JavaScript

back to issues overview

Duplicated JavaScript

Pages with duplicate JavaScript libraries across different code bundles. Lighthouse detects duplicated code that would be quicker to load once.

How to Analyse in the SEO Spider

To populate this filter the PageSpeed Insights API must be connected via ‘Config > API Access > PSI’.

View URLs with this issue in the ‘PageSpeed’ tab and filter and use the lower ‘Lighthouse Details’ tab to click on the issue on the left-hand side, and see details of the duplicated JS on the right-hand side.

Bulk export the pages and duplicate code bundles via ‘Reports > PageSpeed > Duplicated JavaScript’.

What Triggers This Issue

This issue will trigger if a page fails on any of the below checks:

  1. For pages with multiple JavaScript bundles, code splits large dependencies needed by multiple bundles to a common bundle.
  2. Within individual JavaScript bundles, ensure there is only one version of large dependencies.

How To Fix

Remove large, duplicate JavaScript modules from bundles to reduce unnecessary bytes consumed by network activity.

Further Reading

Back to top