Reduce Unused JavaScript Bundles

How to optimize youtube.com

Generic SiteScore: 56/100Analyzed June 2026Re-analyze this site

Reduce Unused JavaScript Bundles

High Impact+22 points estimated

Why It Matters

616 KiB of unused JavaScript is blocking render and delaying LCP by 1.45 seconds.

How to Fix

Implement code splitting to load only essential JavaScript for initial page render. Use dynamic imports for player functionality that loads after user interaction. Split the large base.js bundle (437KB) into smaller chunks and lazy-load video player components. Analyze bundle with webpack-bundle-analyzer to identify unused modules.

0Needs Improvement

What This Score Means

A score of 56 falls in the "Needs Improvement" range (50-89). While it is better than poor (0-49), you should aim for 90+ to provide an optimal user experience and maximize SEO benefits.

This site is slower than approximately 35% of similar sites. The main issues affecting performance are image optimization, JavaScript execution time, and layout stability.

Addressing these issues could improve your conversion rate by 15-20% and boost your search engine rankings.

Core Web Vitals Analysis

LCP

Largest Contentful Paint

9.9s
Poor

Good: < 2.5s

Measures how long it takes for the main content to appear on screen

INP

Interaction to Next Paint

194ms
Good

Good: < 200ms

Measures how quickly the page responds to user interactions

CLS

Cumulative Layout Shift

0.00
Good

Good: < 0.1

Measures visual stability - how much content shifts during page load

AI Performance Analysis

YouTube's mobile site is performing poorly with a score of 56/100, indicating significant performance issues that hurt user experience. The biggest problem is excessive page redirects that waste 1.5 seconds before the page even starts loading, combined with massive amounts of unused JavaScript (616 KB) and CSS (181 KB) that slow down content rendering. The site takes an alarming 9.9 seconds for the main content to appear and 12.4 seconds to become fully interactive, which is far too slow for modern web standards. YouTube could dramatically improve performance by eliminating redirects, removing unused code, and optimizing their resource loading strategy.

Other Optimization Recommendations

Eliminate Multiple Page Redirects

High Impact+25 points estimated

Why It Matters:

Three consecutive redirects are adding 1.54 seconds of unnecessary delay before any content can load.

How to Fix:

Update all internal links to point directly to https://m.youtube.com/ instead of youtube.com or www.youtube.com. Configure server to redirect non-mobile traffic directly to the mobile domain without intermediate redirects. Test redirect chains using tools like Redirect Checker to ensure single-hop redirects.

Remove Unused CSS Rules

High Impact+18 points estimated

Why It Matters:

181 KiB of unused CSS is delaying First Contentful Paint by 600ms and blocking critical rendering.

How to Fix:

Use PurgeCSS or similar tools to remove unused styles from the main stylesheet. Split CSS into critical above-the-fold styles and defer non-critical player styles. Inline critical CSS directly in the HTML head and load remaining styles asynchronously after page render.

Keep Your Site Fast After Optimization

Once your site is optimized, maintain that speed. Use DeployHQ for zero-downtime, automated deployments—so performance fixes and updates go live safely every time, without breaking your site.

Explore DeployHQ →Trusted by engineering teams shipping high-performance sites

Want to Analyze YOUR Website?

Get AI-powered performance insights with actionable fixes in 30 seconds

More Generic Speed Tests

Generic Performance Resources

Frequently Asked Questions