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.
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
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 siteRelated checks
LCP (Largest Contentful Paint)
Checks Largest Contentful Paint — how fast the main content appears. Target under 2.5s.
PerformanceCLS (Cumulative Layout Shift)
Checks Cumulative Layout Shift — how much the page jumps during load. Target under 0.1.
PerformanceINP (Interaction to Next Paint)
Checks Interaction to Next Paint — responsiveness to clicks/taps. Target under 200ms.
PerformanceFCP (First Contentful Paint)
Checks First Contentful Paint — when the first text or image appears. Target under 1.8s.