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.
- 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