Skip to content

Files cached for too short a time

The site’s images, scripts and style sheets tell browsers to keep them only briefly, so a returning visitor downloads them all again.

Why it matters

Visitors who come back, or go on to a second page, wait again for files they already had.

How to fix it

  1. Cache files whose name changes whenever they change, such as theme files with a version in the name, for a year.
  2. Most platforms already do this for their own files: what’s left is usually files from your own server or an app’s, which its host or maker sets.
On WordPress
  1. WordPress.com has no setting for this: its servers run NGINX, whose configuration can’t be changed, so plugins that set cache times in .htaccess don’t work there.

WordPress help: WordPress.com server environment (opens in a new tab)

On Shopify
  1. Shopify has no setting for this: it already tells browsers to keep its files for a year.

Shopify help: Improving your online store performance (opens in a new tab)

On Wix
  1. Wix has no setting for this: it turns on caching for every site automatically.

Wix help: Site Performance: Understanding PageSpeed Insights (opens in a new tab)

On Hostinger
  1. Hostinger AI Builder has no setting for this: its own files are served through a CDN set up automatically. Files with short cache times come from tools added in Integrations or Embed code elements: remove them or ask their maker.

Hostinger help: Hostinger AI Builder: Website speed (opens in a new tab)

On Webflow
  1. Webflow serves its own files through its global CDN. Files with short cache times usually come from scripts or embeds you added: their provider sets them.

Webflow help: Understand site performance (opens in a new tab)

On Cloudflare
  1. Go to Caching › Configuration and, under Browser Cache TTL, choose how long browsers keep files: Cloudflare uses it for files your server sends with a shorter time or none.
  2. Choose a long time only if every file gets a new name when it changes, as the setting covers the whole site: purging Cloudflare’s cache doesn’t clear visitors’ browsers.

Cloudflare help: Set Browser Cache TTL (opens in a new tab)

In code (HTML, CSS or Tailwind)
  1. Send this header with versioned files from your server:
    Cache-Control: public, max-age=31536000, immutable

MDN: Cache-Control (opens in a new tab)

Check your fix

Once the change is live, check the page again.

Want it done for you?

We’re a product design studio. We can make this fix, and check the rest of your site while we’re at it.

Book a call (opens in a new tab)