Webflow sync, pageviews & more.
NEW

How can I implement an efficient cache policy in Webflow to improve my website performance according to GTmetrix audits?

TL;DR
  • Use Webflow’s built-in hosting to apply long-lived cache headers and enable asset minification and GZIP compression.
  • Optimize and resize images in WebP format with responsive and lazy loading, reduce unused third-party scripts, and republish the site to update assets.

To improve website performance in Webflow according to GTmetrix audits, implementing an efficient cache policy is crucial to reduce repeated downloads of static resources and lower load times.

1. Use Webflow's Built-in Hosting Optimization

  • Webflow automatically sets cache headers for most static assets like images, CSS, and JavaScript.
  • Assets like JS, CSS, and images are served with long-lived cache headers (up to 1 year) using Webflow’s CDN (Fastly + AWS Cloudfront).
  • There is no native control panel to customize cache policies in Webflow, but the built-in configuration is designed for high performance.

2. Optimize Static Assets

  • Minify assets: Use Webflow’s option under Site Settings > Hosting to enable “Minify HTML, CSS, and JS”.
  • Enable Asset Compression: This is done automatically by Webflow for GZIP-compression of served files.

3. Use Proper Image Formats and Sizing

  • Serve images in WebP format when possible. Webflow supports WebP on export and when uploaded.
  • Resize images before uploading and set image width and height attributes in the Designer to avoid layout shifts.
  • Enable responsive images in image settings (Webflow automatically generates variants).

4. Leverage Lazy Loading

  • Set image elements and custom embeds to lazy-load by using the built-in lazy loading toggle (found in the Element Settings panel under "Loading" set to Lazy).
  • For embedded videos or iframes, use lazy loading by including loading="lazy" in the Embed code.

5. Use Browser Assets Efficiently

  • For custom fonts, consider reducing font variants (weights/styles) to decrease file size.
  • Avoid linking unnecessary external libraries that are not cached by CDN (e.g., unused scripts from third-party sources).

6. Reduce External Requests

  • GTmetrix often flags third-party scripts (like chat widgets or analytics). To optimize:
  • Use only essential external scripts.
  • Load scripts asynchronously if possible (Webflow allows adding scripts in the Before area in Page or Site settings).

7. Clear Site Cache and Republish

  • When updating files, Webflow handles cache invalidation automatically by changing asset URLs.
  • After edits, click “Publish to Selected Domains” to ensure new assets are pushed.

Summary

Webflow automatically applies efficient cache headers on static assets via its CDN. While you can't manually set custom cache policies, ensure all files are optimized: enable asset minification, use responsive/lazy-loaded images, reduce third-party scripts, and republish after changes. This aligns with GTmetrix recommendations and improves page load times.

Rate this answer

Other Webflow Questions