Skip to content

5 Steps to Configure Browser Caching and Clear the Cache in Shopify Plus

Shopify has no clear cache button and rarely needs one. Five steps to check what Shopify already caches, version your theme files, replace images safely and clear your browser cache when a change doesn't show.

5 Steps to Configure Browser Caching and Clear the Cache in Shopify Plus

Shopify has no "clear cache" button, and for most changes you don't need one. When you save a theme file, Shopify gives it a new versioned URL, so browsers download the new copy on the next page load. If you still see the old version, do a hard reload (Ctrl + Shift + R on Windows, Cmd + Shift + R on Mac) or clear your browser cache, then check the page in a private window.

Browser caching is also set up for you. Shopify serves theme files and images from its Cloudflare-backed CDN with a cache lifetime of about one year, and on a Liquid theme you can't change those headers. What you control is how your theme points to its files, how you replace images, and which third-party scripts you load. The five steps below cover exactly that, on Shopify and Shopify Plus alike.

How does caching work on a Shopify store?

There are four layers between your store and a shopper, and each one is refreshed differently:

LayerWhat it storesWho controls itHow it gets refreshed
Browser cacheTheme files, images and fonts the visitor already downloadedThe visitor's browserA new file URL, a hard reload, or clearing browser data
Shopify CDNTheme assets, files and images served under /cdn/ShopifyA new versioned URL. There is no manual purge.
Page HTMLThe rendered storefront pagesShopifyBrowsers are told to check with the server on every page view
Third-party scriptsApp, chat, review and analytics files from other domainsThe vendorThe vendor's own cache settings

We checked the headers on Shopify's Dawn demo store and on live Shopify stores on 24 October 2026. Theme assets came back with cache-control: public, max-age=31557600, which is about one year. Storefront pages came back with cache-control: private, max-age=0, must-revalidate, so a browser doesn't reuse a stored page without asking first. That is why customers see price, stock and content changes on their next page view.

According to Shopify's platform documentation, files on the CDN are also minified and compressed with Brotli and gzip automatically, and asset URLs sit on your own domain under a /cdn path, so the browser reuses its connection to your store.

What can you control about caching on Shopify?

You can't, on a Liquid themeYou can
Set Cache-Control or Expires headers, or cache times per file typeReference every theme file through Liquid filters so its URL changes when the file changes
Edit .htaccess or any server configuration (there is none to edit)Replace images and files in a way that gives them a new versioned URL
Purge Shopify's CDN or clear your customers' browsersClear your own browser cache and test in a private window
Put your own Cloudflare proxy in front of the store. Shopify doesn't support Cloudflare proxy setups, including Orange-to-Orange.Remove or delay third-party scripts with short cache lifetimes
Change how Shopify caches storefront pagesSet your own headers on a headless storefront such as Hydrogen

That rules out a lot of older advice. A <meta http-equiv="Expires"> tag in theme.liquid does not set cache headers for your images, CSS or JavaScript, and Apache rules such as FilesMatch or mod_expires blocks have nowhere to run on Shopify. There is also no browser caching setting under Online Store > Preferences.

Step 1: Check what Shopify already caches

  1. Open your store in Chrome and press F12 to open DevTools.
  2. Go to the Network tab and reload the page.
  3. Click a CSS or JavaScript file from your theme and open Headers. Under Response Headers, look for cache-control: public, max-age=31557600.
  4. Reload again. Files served from the cache show that in the Size column instead of a download size.
  5. Tick Disable cache when you want to see the page the way a first-time visitor does.

If you prefer the command line, the same check takes one request:

curl -sI "https://your-store.com/cdn/shop/t/53/assets/base.css?v=144968985024194912401720118919" | grep -i cache-control
# cache-control: public, max-age=31557600

Step 2: Load theme files through asset_url

Liquid's asset_url filter adds a version parameter to every theme file URL. When the file changes, the number changes, and browsers fetch the new copy. This is Shopify's own cache busting, and it is why you never need to clear a cache after editing a theme file.

<link rel="stylesheet" href="{{ 'base.css' | asset_url }}">
<script src="{{ 'global.js' | asset_url }}" defer></script>

The output looks like this:

<link rel="stylesheet" href="//your-store.com/cdn/shop/t/53/assets/base.css?v=144968985024194912401720118919">

Images referenced inside a plain CSS file don't get a version, so they can stay stale. Shopify's fix is to rename the stylesheet to .css.liquid and use the filter inside it:

.hero {
  background-image: url('{{ "hero-bg.jpg" | asset_url }}');
}

Don't add your own version strings by hand. Shopify only recognizes the v parameter for cache busting. A March 2026 changelog confirms that bare query strings such as image.png?123 no longer refresh cached assets.

Step 3: Replace images and files without stale copies

Files you upload under Content > Files and images picked in the theme editor are cached too. Output them with file_url or image_url, which emit the current versioned URL:

<a href="{{ 'size-chart.pdf' | file_url }}">Size chart</a>
{{ section.settings.image | image_url: width: 1200 | image_tag }}

These two patterns leave stale copies behind:

<img src="https://cdn.shopify.com/s/files/1/0000/0001/files/banner.jpg">
<link rel="stylesheet" href="/cdn/shop/t/53/assets/base.css?123">

The first is a hardcoded cdn.shopify.com URL. Since 7 April 2026, replacing or deleting a file no longer purges its cdn.shopify.com URL, so that URL keeps returning the original file until its cache time runs out. The same applies to cdn.shopify.com links pasted into product descriptions and blog posts. For products, Shopify recommends adding images with the media uploader instead. The second line uses a bare query string, which no longer busts the cache.

If you must keep a hardcoded link, upload the new version under a new file name and update the link.

Step 4: Clear the cache when a change doesn't show up

Work down this list in order and stop as soon as the change appears:

  1. Hard reload the page. It reloads the page while ignoring cached content.
  2. Open the page in a private or incognito window. If the change shows there, only your browser cache is stale.
  3. Clear your browser's cached files with the shortcuts below.
  4. Check that you edited the published theme. Changes to a draft theme don't reach the live store until you publish it.
  5. Check the market and language. With Shopify Markets, content can be translated or customized per market and language. If you edited the default version, a market or language that has its own version won't change. Check the market and language selector in the theme editor, and view the storefront in the market you edited.
  6. Look for hardcoded file URLs and replace them as in step 3.
  7. Try another device or a mobile connection. Shopify's theme troubleshooting guide treats an issue that persists across devices, browsers and connections as one that isn't local. At that point, contact the theme developer, the app developer or Shopify Support.
BrowserHard reloadClear cached files
Chrome on WindowsCtrl + Shift + R or Shift + F5Ctrl + Shift + Delete, then tick "Cached images and files"
Chrome on MacCmd + Shift + RCmd + Shift + Delete, then tick "Cached images and files"
Safari on MacEmpty the cache, then reloadOption + Cmd + E (turn on the developer features in Safari's Advanced settings first)
FirefoxCtrl + Shift + R (Cmd + Shift + R on Mac)Ctrl + Shift + Delete (Cmd + Shift + Delete on Mac)

You can't clear your customers' caches, and with the setup above you don't need to. Pages are rechecked on every visit, and changed theme files get new URLs. Only hardcoded file links can leave customers with an old copy.

Some apps keep their own cache, for example page builders or apps that render their own widgets. If an app's content is out of date, look for a refresh or cache option in the app's settings or ask its developer.

Step 5: Fix the cache warnings you can actually fix

PageSpeed Insights and Lighthouse flag short cache lifetimes under Use efficient cache lifetimes. Before Lighthouse 13 in October 2025 this audit was called "Serve static assets with an efficient cache policy". Chrome's guidance asks for at least 30 days on cacheable files.

On a Shopify store, Shopify's own files already have a year. The URLs that fail are almost always on other domains: analytics tags, chat widgets, review and upsell apps, pixels and embedded fonts. Their headers belong to the vendor, so:

  • Remove apps you no longer use, and check that their scripts left with them.
  • Load non-essential widgets later, for example after the first interaction, so they don't compete with the first render.
  • Move theme files you host elsewhere into the theme's assets/ folder and load them with asset_url, as Shopify recommends.
  • Self-host fonts on Shopify's CDN and use font-display: swap.
  • Size images with image_url, which resizes them on the CDN, so the cached copy is not bigger than it needs to be.

Run our free Shopify speed test before and after, and see our guide to speeding up a Shopify website for the rest of the performance work.

What changes on a headless Shopify store?

On a headless storefront, such as one built with Hydrogen, the response headers come from your app, so caching is your job. In current Hydrogen versions you cache individual Storefront API queries with strategies such as Cache.long() (one hour, then up to 23 hours stale while it refreshes) and Cache.short() (one second, then up to nine seconds), and you decide the Cache-Control header for each page. Pages with customer data must never be cached publicly. This is the one Shopify setup where a guide to configuring cache headers really applies, and it is part of our Hydrogen development work.

When should you check caching again?

Check after every theme deployment, after installing or removing an app, and after any change to how images and files are uploaded. A quick look at the Network tab, plus a PageSpeed Insights run on the homepage, a collection and a product page, is enough. If the same third-party scripts keep showing up, deal with the app, not the cache.

FAQ

How do I clear the cache on Shopify?

There is no cache to clear in the Shopify admin. Clear your browser instead: do a hard reload with Ctrl + Shift + R (Cmd + Shift + R on Mac), or clear cached files with Ctrl + Shift + Delete (Cmd + Shift + Delete on Mac), then check the page in a private window.

Is there a "clear cache" button in the Shopify admin?

No. Shopify versions theme files and files automatically, so saved changes get new URLs, and storefront pages are rechecked on every visit. You can't purge Shopify's CDN yourself.

Why don't my changes show up on my Shopify store?

Usually because your browser kept an old copy, you edited a theme that isn't published, you are looking at a different market or language, or a file is linked with a hardcoded URL. Work through the checklist in step 4.

Can I set Cache-Control headers on Shopify?

Not on a Liquid theme. Shopify sets the headers for theme assets, files and pages. You can set your own headers on a headless storefront such as Hydrogen.

How long does Shopify cache images and theme files?

The theme assets and files we checked returned max-age=31557600, about one year. That is safe because asset_url, file_url and image_url change the URL when the file changes.

Can I use Cloudflare in front of my Shopify store?

You can use Cloudflare for DNS with records set to DNS only, but Shopify doesn't support Cloudflare proxy setups, including Orange-to-Orange. Shopify's CDN already runs on Cloudflare.

Need help shipping this on Shopify?

We've built 500+ Shopify and Shopify Plus stores. Talk to our team about your build.

The checklist we run before touching a client's code

Get it by email, plus a few short notes over the next two weeks: what we see most often on Shopify stores and what actually fixes it.

No spam. Unsubscribe anytime. Privacy Policy

Want more of our posts in your Google results? Add Codersy as a preferred source.

Add Codersy on Google(opens in a new tab)