10 Proven Ways to Improve Your Google PageSpeed Score

Boost your PageSpeed Insights score with these practical optimizations — from image compression and critical CSS to font preloading and server response time.

10 min read Performance

A slow website costs you users, conversions, and search rankings. Google PageSpeed Insights scores your site from 0 to 100 across performance, accessibility, best practices, and SEO. Most business sites score in the 40–65 range. Getting to 90+ is achievable with focused effort.

Here are 10 high-impact optimizations you can apply today.

1. Compress and Properly Size Images

Images are the #1 cause of slow page load times. Every image on your site should be:

  • Compressed — use a tool like Squoosh, ImageOptim, or automated pipelines
  • In modern format — WebP or AVIF instead of JPEG/PNG (30-50% smaller at equivalent quality)
  • Correctly sized — don't serve a 2400px image in a 400px container
  • Lazy-loaded — add loading="lazy" to all below-the-fold images
<img
  src="hero.webp"
  alt="Dashboard screenshot"
  width="1200"
  height="630"
  loading="lazy"
>

The width and height attributes prevent Cumulative Layout Shift (CLS) by reserving space before the image loads.

2. Preload Your Largest Contentful Paint Element

LCP (Largest Contentful Paint) is usually your hero image or main heading. If it's an image, tell the browser to fetch it early:

<link rel="preload" as="image" href="/assets/hero.webp" fetchpriority="high">

For LCP text elements (headlines), make sure the font isn't render-blocking by preloading it:

<link rel="preload" as="font" href="/fonts/inter.woff2" type="font/woff2" crossorigin>

3. Eliminate Render-Blocking Resources

Scripts and stylesheets loaded in <head> without async or defer block the browser from rendering your page. Use:

<!-- Non-critical scripts -->
<script src="analytics.js" defer></script>
<script src="chat-widget.js" async></script>

For CSS, if you can't defer it, consider extracting critical CSS (the styles needed for above-the-fold content) and inlining them in <head>, then loading the rest asynchronously.

4. Enable GZIP or Brotli Compression

Text-based assets (HTML, CSS, JS, JSON) compress dramatically. Brotli achieves 15-20% better compression than GZIP.

Nginx:

brotli on;
brotli_comp_level 6;
brotli_types text/plain text/css application/json application/javascript;

Apache:

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript
</IfModule>

On Cloudflare, Brotli is enabled by default for cached responses.

5. Implement Effective Caching

Most static assets (images, fonts, CSS, JS) don't change often. Tell the browser to cache them aggressively:

# Static assets — cache 1 year
location ~* \.(jpg|jpeg|webp|png|gif|ico|css|js|woff2)$ {
  expires 1y;
  add_header Cache-Control "public, immutable";
}

# HTML — don't cache (or short cache with revalidation)
location ~* \.html$ {
  expires -1;
  add_header Cache-Control "no-cache, no-store, must-revalidate";
}

Use content-hashed filenames (e.g., main.a3f9b2.js) so you can set long cache TTLs without worrying about serving stale assets after deploys.

6. Reduce Server Response Time (TTFB)

Time to First Byte (TTFB) should be under 600ms. Slow TTFB points to:

  • Slow database queries — add indexes, optimize queries, use query caching
  • No server-side caching — implement Redis or Memcached for expensive computations
  • Geographic distance — use a CDN to serve content closer to users
  • Underpowered hosting — shared hosting is often the culprit for business sites

Run Website Linter to benchmark your TTFB alongside other metrics.

7. Remove Unused JavaScript and CSS

Modern build tools like webpack and Vite support tree-shaking (removing unused code). For third-party libraries:

  • Load them conditionally (only on pages that need them)
  • Use lighter alternatives (e.g., date-fns instead of moment.js)
  • Remove plugins/libraries you no longer use

In Chrome DevTools → Coverage tab, you can see exactly what percentage of each JS/CSS file is actually used on a given page.

8. Optimize Third-Party Scripts

Ad networks, chatbots, analytics, and A/B testing tools are often the #1 drag on performance. Strategies:

  • Delay non-critical scripts until after the page loads (use setTimeout or Intersection Observer)
  • Host Google Fonts locally instead of loading from fonts.googleapis.com
  • Facade patterns — show a static thumbnail for embedded videos instead of loading the full iframe until clicked
// Load chat widget only after user interaction
let chatLoaded = false;
document.addEventListener('mousemove', () => {
  if (!chatLoaded) {
    loadChatWidget();
    chatLoaded = true;
  }
}, { once: true });

9. Use a CDN for Static Assets

A Content Delivery Network caches your assets at edge locations around the world. Users in Tokyo get assets from Tokyo, not your server in Virginia.

CDNs also provide:

  • Automatic Brotli/GZIP compression
  • HTTP/2 or HTTP/3 multiplexing
  • Automatic image optimization (Cloudflare Images, Cloudinary)

AWS CloudFront, Cloudflare, and Fastly are the most common choices for production sites.

10. Fix Cumulative Layout Shift (CLS)

Layout shifts happen when elements load and push content around. Common causes and fixes:

Cause Fix
Images without dimensions Always specify width and height
Late-loading ads Reserve space with min-height on ad containers
Web fonts causing FOUT Use font-display: swap or preload fonts
Dynamically injected banners Reserve space or inject above the fold content last

Measuring Your Progress

After applying these optimizations, measure the impact:

  1. Run PageSpeed Insights 3× and average the scores (results vary between runs)
  2. Use the Lab data for consistent benchmarking, Field data (Core Web Vitals) for real-user impact
  3. Run Website Linter for a comprehensive report that includes PageSpeed, security, SEO, and accessibility in one scan

Chasing a perfect 100 is less important than maintaining a score above 90 on mobile and ensuring your Core Web Vitals are in the "Good" range. Focus your energy there.