Skip to main content

How to Use HTML Caching and Refresh Cached Page Parts in Breeze

Learn how to speed up your website with HTML Caching, and how to keep specific page parts (like a mini-cart) up to date using Refresh Cached Page Parts.

Written by Syed Abuzar Mehdi

HTML Caching speeds up your site by saving a copy of the page. If you don't want a specific part or block of the page to be cached, you can use Refresh Cached Page Parts instead.

This setting fetches only that part or block directly from the origin server (the main server that hosts your website), while the rest of the page stays cached.

Note:

This Breeze feature is currently in the Beta phase. This means it is still being tested and refined, so you may notice occasional bugs or unexpected behavior. We recommend testing these settings on a staging site before applying them to a live website.


How to Use HTML Caching and Refresh Cached Page Parts in Breeze

You can access these options by going to:

Settings → Breeze → File Optimization → HTML Settings

Note:

Starting with Breeze 2.6.0, HTML Caching is turned on by default. If you have updated from an older version of Breeze, check that the toggle is set to On, save your changes, and purge the cache if the toggle appears to be Off.

Recommended Settings

Option

Recommended

Cache System (Basic tab)

On

Cache Full Page HTML

On

Refresh Cached Page Parts

Off — unless one block of the page keeps showing outdated content

Page Parts to Refresh

Fill in only if the option above is On

Show Loading Overlay

Off — unless the refresh looks jumpy or sudden

Overlay Color

Default color is fine

Do Not Refresh on These Pages

Leave empty — unless one page should not be refreshed

Important:

After making any change, remember to click Save Changes, purge the Breeze cache, and purge Varnish. Test your changes in a private/incognito browser window to confirm the results.


Cache System vs. HTML Caching

It's important to understand the difference between these two settings:

  • Cache System (found under the Basic tab) is the main switch for Breeze's caching feature. Keep this On.

  • HTML Caching (found under File Optimization) saves a copy of your page's HTML (the code that builds the page you see in your browser).

Both settings should be On for a normal website setup.

  • If the Cache System is turned Off, HTML Caching will not work at all.

  • If you turn only HTML Caching Off, features like gzip (file compression) and minification (removing extra code to reduce file size) can still run, but Breeze will not save or serve the cached HTML page copy.

Important:

HTML Caching is not the same as HTML Minify. HTML Minify only removes extra spaces from the HTML code — it does not save a cached copy of the page.


Refresh Cached Page Parts

Use this setting when your cached page loads quickly, but one specific block or area on the page shows outdated information. Common examples include:

  • The mini-cart still shows 0 items

  • The header still says "Hello, Guest" after a customer logs in

  • A Wishlist or stock count does not update

When Refresh Cached Page Parts is turned on, the cached version of the page loads first. Breeze then updates only the parts you have listed in the Page Parts to Refresh box. This extra step can slow down the page slightly, so only turn this setting on if you actually need it.

Tip:

If an entire page must always show fresh content (for example, the cart, checkout, or my account page), use the Never Cache URLs option under the Advanced tab instead. Don't use Refresh Cached Page Parts for whole pages.

To set up Refresh Cached Page Parts:

  1. Keep HTML Caching turned On.

  2. Turn Refresh Cached Page Parts On.

  3. Fill in the Page Parts to Refresh box (see the next section for details).

  4. Click Save Changes and purge the cache.


Page Parts to Refresh

In this box, list one page element per line. If this box is left empty, the feature will not do anything.

Example entries:

#site-header-cart

.mini-cart

How to Find the Right Value

  1. Open your live website in a browser.

  2. Right-click on the outdated area of the page and select Inspect.

  3. If you see id="site-header-cart" in the code, enter it in the box as #site-header-cart.

  4. If you see class="mini-cart" in the code, enter it in the box as .mini-cart.

Tip:

Start by adding just one page element. Save your changes, purge the cache, and test the page before adding more elements.

Important:

Do not enter html, body, or head in this box. Also, do not target login, checkout, or add-to-cart forms. Any invalid lines you enter will be removed automatically when you save.


Show Loading Overlay and Overlay Color

  • Show Loading Overlay: Turn this On if the cart or header area flickers noticeably while it updates. Leave it Off if the update already looks smooth.

  • Overlay Color: Sets the background color of the loading overlay (the default color is #000000, which is black). This color only appears when Show Loading Overlay is turned On.

Important:

How the overlay looks depends on your website's theme, so it may not look perfect on every design.


Do Not Refresh on These Pages

Use this box to list pages that should stay cached but do not need the "Refresh Cached Page Parts" feature applied to them.

Add one exact page URL or path per line.

For example:

https://yoursite.com/sample-page/

or

/sample-page/
  • Wildcards (such as /shop/*) are not allowed.

  • Query strings (extra text added after a "?" in a URL, such as ?utm_source=...) are ignored.

  • Adding /sample-page/ will not automatically include /sample-page/child/ — you would need to add that path separately.

Note:

This setting is different from Never Cache URLs. Pages listed here can still be cached — they simply won't have their listed parts refreshed.


How to Verify Your Settings Are Working

Test your website while logged out, using a private/incognito browser window. Do not add ?nocache to the URL when testing.

  1. Open a page that is not on your "Do Not Refresh on These Pages" list. Right-click and select View Page Source, then search for breeze-dc-elem or __breezeDcHasRun. You should be able to find these terms.

  2. Open a page that is on your excluded list and search again. You should not find these terms on this page.

If these terms still appear on an excluded page, double-check the URL you saved, purge the cache, and re-test using the exact same page path you entered.


Troubleshooting: If Something Looks Wrong

  1. Turn Show Loading Overlay off and test the page again.

  2. Keep only one line in the Page Parts to Refresh box while testing.

  3. If the issue is still there, turn Refresh Cached Page Parts Off.

  4. Keep Cache System and HTML Caching turned On at all times.


Frequently Asked Questions (FAQ)

Should every website use Refresh Cached Page Parts?

No. Most websites only need Cache System and HTML Caching turned on.

I turned it on, but nothing changed. What should I do?

Add a matching ID or class to the Page Parts to Refresh box, save your changes, and purge the cache.

Does this feature replace Varnish?

No. If you are using Cloudways, keep Varnish turned on as well.

The setting names look different from an older version of Breeze (2.6.0). Why?

Some settings were renamed for clarity:

  • "HTML Double-Check" is now called Refresh Cached Page Parts

  • "HTML Double-check elements" is now called Page Parts to Refresh

  • "Enable Double-check Loader" is now called Show Loading Overlay

  • "Double-check Loader Overlay Color" is now called Overlay Color

  • "HTML Double-check exclude pages" is now called Do Not Refresh on These Pages


That's it! We hope this article was helpful.

Did this answer your question?