Cache and optimization: page cache, minify and fonts

The Cache & Optimization tab speeds up public pages without a separate cache plugin. It caches pages, trims the HTML, loads scripts later, handles fonts, and tests the result. Open it in Baza Helper > Cache & Optimization.

Page cache

Turn on Enable public page caching. Only anonymous GET requests without cookies or query parameters are cached. Account, checkout and excluded paths always bypass the cache.

  • Cache lifetime (seconds): default one hour, from 60 seconds up to a day. A short lifetime keeps booking data and security tokens fresh, a long one keeps the site fast for every visitor.
  • Maximum cached pages: the limit for the stored copies.
  • Clear cache when content or theme settings change: keeps visitors from seeing stale pages.
  • Excluded URL paths: one path per line, starting with /. A path and everything below it skips the cache.

The tab opens with three cards in this order: Cache management, the Speed advisor, then Page cache and the other settings. In Cache management you see the number of cached pages, the cache size and the expired entries. Clear page cache empties it, and Warm public pages requests up to 100 published pages in small WP-Cron batches so the first visitor gets a cached page. Warmup skips personalized responses. If WP-Cron is disabled on your server, warmup needs a server cron job.

HTML, CSS and JavaScript

  • Conservative HTML minification removes comments and extra whitespace. It keeps inline text spaces, scripts, JSON-LD, styles, SVG, pre and textarea untouched.
  • Use compiled minified theme CSS / JavaScript picks the .min file of the theme when there is one.
  • Defer compatible theme scripts uses WordPress dependency-aware loading. External provider scripts and booking plugin assets are kept as they are.
  • Defer all scripts (jQuery and the theme included) loads every script file after the page is parsed. WordPress keeps the order of scripts that need each other. A script with inline code printed after it, and visitors who are logged in, are left as they are, and if the page runs inline code that calls jQuery by itself, jQuery is kept first. Off by default. Test forms, menus and sliders after turning it on. The setting Scripts kept as they are when deferring all takes one WordPress script handle per line. Those scripts stay in the head and everything else is deferred.
  • Combine local stylesheets / scripts into one file works for visitors who are not logged in. Files that load one after another become one file in the same order. Styles with inline code, other media types or @import, and scripts with inline data or modules, stay separate. Test forms, menus and sliders after you turn it on.
  • Defer booking calendar scripts appears only when Baza Booking Calendar is installed. Make a test booking after turning it on.
  • Defer Elementor and add-on scripts and Do not load jQuery Migrate on the public site remove more blocking requests. Check sliders, counters, menus, popups and forms afterwards.
  • Turn off WordPress emoji drops the emoji script and styles. Typed emoji still work because browsers draw them.

Images and the first screen

  • Fill missing local image dimensions adds width and height only when both are absent.
  • Lazy-load unconfigured images after the first three keeps the first images eager.
  • Keep initially visible content static for LCP stops entrance animations from holding back the first screen.
  • Preload the largest picture of each page learns from your visitors’ browsers which picture was painted largest and, after two visits agree, adds a high-priority preload for it, separately for phones and larger screens. This picture is never lazy-loaded: loading="lazy" is removed and the priority is set to high.
  • Repair accessibility markup automatically gives unnamed links an aria-label, adds a main landmark when the page has none and removes invalid aria-value attributes.

Fonts

  • Use font-display swap for local stylesheets creates a hashed copy of the CSS with swap added.
  • Preload the fonts of local stylesheets automatically preloads the first Latin font file of each @font-face, and Most fonts to preload automatically (1 to 5, default 2) limits how many.
  • Preload important font URLs takes up to five WOFF2, WOFF, TTF or OTF addresses. Preload only fonts that are used above the fold.

Critical CSS and deferred styles

The Critical CSS field holds CSS only, with no style tags or imports. It is required before you list Stylesheet handles to load after critical CSS. Unlisted styles stay blocking. The Critical CSS generator can fill the field for you, see its own article.

Direct HTML delivery

Serve HTML directly without WordPress hands cached pages to the web server without starting PHP. It needs page caching and automatic invalidation, and it must pass a real server check first. On Apache and LiteSpeed the button Install the rules automatically backs up .htaccess, writes the rules in front of WordPress’s own, tests the home page, and puts the old file back if anything fails. Remove the rules takes out only the block Baza Helper added. On Nginx the tab shows rules to copy into the server configuration.

Browser cache rules

The browser cache card writes a marked block into .htaccess on Apache or LiteSpeed: one year for images, fonts and video, one month for CSS and JavaScript. On Nginx it shows the lines to copy. It then checks that the server really sends a max-age header. This answers the PageSpeed note “Use efficient cache lifetimes”.

Performance diagnostics

Enter a page address, run the check, or import a Lighthouse JSON report. The result lists problems with the facts and a next step for each, the first own CSS and JavaScript files with their browser cache age, and render-blocking styles. It shows no invented score. The Speed advisor card above it turns the same findings into switches, see the article about the Speed advisor.

Last Modified: 19.10.2026