Performance
PerformanceMedium

JavaScript Payload Size

Checks total JavaScript downloaded — target under 300KB compressed.

What this check measures

We sum all JS file sizes (compressed) referenced from the page. Total over 300KB on mobile is flagged — every additional 100KB slows down parse/compile by ~50ms.

Why it matters

JavaScript is the most expensive resource on mobile. A 1MB JS bundle takes 2-4s to parse/compile on a mid-range Android. INP suffers, time-to-interactive suffers.

search

How our audit detects it

List all <script src> references. Fetch each, sum compressed byte sizes.

Typical findings

  • error_outline1.5MB of React bundle on a content page.
  • error_outlinejQuery (87KB) loaded for a site using React.
  • error_outline500KB analytics + chat + ad libraries.

How to fix

Tree-shake unused imports. Lazy-load routes with dynamic import(). Remove redundant libraries. Use bundle analyzer (webpack-bundle-analyzer, vite-bundle-visualizer) to find the biggest offenders.

Frequently asked questions

Acceptable JS size?expand_more
Under 170KB compressed is Google's aspirational target. Under 300KB is realistic for most apps.

Want this checked on your site?

Pantra runs the full audit (SEO, Security, GEO, Performance, Schema, Technical, Images) in 10 seconds and generates stack-specific fix prompts.

Scan my site

Related checks