Eliminate Unused JavaScript and Legacy Code

How to optimize spacex.com

Generic SiteScore: 83/100Analyzed March 2026Re-analyze this site

Eliminate Unused JavaScript and Legacy Code

Medium Impact+6 points estimated

Why It Matters

96KB of unused JavaScript in vendor bundle delays both FCP and LCP by 450ms while legacy polyfills add unnecessary bloat.

How to Fix

Use webpack-bundle-analyzer to identify unused code in your vendor bundle and implement tree-shaking. Remove Object.create and Object.getOwnPropertyDescriptor polyfills as they're supported in all modern browsers. Consider code splitting to defer non-critical JavaScript execution.

0Needs Improvement

What This Score Means

A score of 83 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

4.3s
Poor

Good: < 2.5s

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

INP

Interaction to Next Paint

138ms
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

This SpaceX website has good but not great performance with a score of 83/100. The biggest problem is enormous video files (over 15MB total) that are severely slowing down page load times, causing the Largest Contentful Paint to take 4.3 seconds - much longer than the recommended 2.5 seconds. The site would benefit significantly from compressing these large video files, implementing better caching strategies (currently only 12 hours), and optimizing oversized images that are being served at much higher resolutions than needed. These improvements could easily push the performance score into the 90s and provide a much faster user experience.

Other Optimization Recommendations

Optimize Video and Cache Strategy

High Impact+12 points estimated

Why It Matters:

Large video files (13.8MB) have inadequate caching (12 hours vs. recommended 1 year) causing repeated downloads and delaying LCP by 1.4 seconds.

How to Fix:

Configure your CDN to set cache headers for video files to 1 year (31536000 seconds). Implement video compression to reduce file sizes by 50-70%. Consider using adaptive bitrate streaming for mobile devices to serve appropriately sized video content.

Preconnect to Critical Third-Party Origins

High Impact+8 points estimated

Why It Matters:

Missing preconnections to content.spacex.com and sxcontent9668.azureedge.us add 730ms of network delay to critical resources.

How to Fix:

Add <link rel="preconnect" href="https://content.spacex.com"> and <link rel="preconnect" href="https://sxcontent9668.azureedge.us"> to your HTML head. This allows the browser to establish connections early, reducing the 4.3-second LCP by up to 730ms.

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