Skip to content

Using Frontend Optimiser

This guide is for owners and operators. Frontend Optimiser makes your pages load faster by streamlining the files visitors download and by inlining the styles needed for the top of the page. Most of the time it runs on its own and there is nothing to do. Occasionally you may turn an option on or off, or clear the optimised files after a big change. The advanced settings are best left to your developer. No technical knowledge needed. Every step uses the labels you see on screen.

  1. Open Settings and find the Frontend Optimiser settings.
  2. Under Critical CSS, switch on Enable critical CSS. This inlines the styles needed for the top of the page so visitors see content sooner, before the rest of the stylesheets load.
  3. Save.

How to let the optimiser keep itself up to date

Section titled “How to let the optimiser keep itself up to date”
  1. Open the Frontend Optimiser settings.
  2. Switch on Automatic generation. When a page is missing its optimised styles, the optimiser queues the work to rebuild them in the background.
  3. Save. From now on the optimised files refresh on their own as pages are visited.

If your developer has not set up background processing, leave Automatic generation off and ask them before turning it on, so the heavy work does not run inside a visitor’s page load.

How to choose how widely optimisation applies

Section titled “How to choose how widely optimisation applies”
  1. Open the Frontend Optimiser settings.
  2. Set the Profile scope to decide how the optimised styles are grouped (for example per layout). A broader scope reuses one optimised set across more pages; a narrower scope tailors it more closely.
  3. Save.

How to refresh optimised files after a big change

Section titled “How to refresh optimised files after a big change”

There is no clear button. Optimised files are rebuilt in the background, and only when the setup below is in place. Until a fresh file exists, visitors get the normal full stylesheet, so a stale or failed file does not break the page.

  1. After a large design or content change, open a page that looks wrong once, so its render profile is queued again.
  2. Confirm Enable critical CSS and Automatic generation are on, and that the page’s own above-the-fold setting has not been disabled.
  3. If the page still looks wrong after a few minutes, ask your developer to check the background processing and Diagnostics, using the operator notes at the end of this guide.
  1. The Frontend Optimiser settings include advanced options such as Max inline CSS bytes, Viewports, Fold multiplier, Extra fold pixels, Playwright wait strategy, and Playwright timeout.
  2. These control exactly how the top-of-page styles are measured and built. The safe defaults work for most sites.
  3. Do not change these unless your developer advises it.

Rolling out Frontend Optimiser (for owners)

Section titled “Rolling out Frontend Optimiser (for owners)”
  • Enable critical CSS. This is the main speed-up and is safe to switch on. Get it working before touching anything else.
NeedWhat to use
Show content sooner at the top of the pageEnable critical CSS
Keep optimised files fresh automaticallyAutomatic generation (needs background processing set up)
Control how optimised styles are groupedProfile scope
Fine-tune how top-of-page styles are measuredThe advanced settings, with developer guidance only
RoleWhat they do
Site ownerSwitches on Enable critical CSS, leaves advanced settings at default
DeveloperSets up background processing, tunes the advanced options, confirms the optimiser is active
What you seeWhat it meansWhat to do
A page looks wrong after a big changeThe optimised files are out of date, or have not rebuilt yetOpen the page once, confirm the queue worker is running, and ask your developer to check Diagnostics
You are unsure about a settingIt is one of the advanced tuning optionsLeave the safe defaults on and ask your developer before changing it
The site still feels slowOptimisation may be off, or the cause is elsewhereConfirm Enable critical CSS is on; raise persistent slowness with your developer
Turning on Automatic generation worries youThe background work needs proper queueing to run out of bandConfirm with your developer that background processing is set up first
  • A queue worker must be running with a database, redis, sqs or beanstalkd driver, with Node, Playwright and Chromium available to it.
  • Generation must not be paused for a deployment.
  • After a failed attempt the next one waits 1 minute, 5 minutes, 15 minutes, 1 hour, 6 hours, then 1 day. After 8 attempts the profile stops until repaired.
  • The scheduled repair (status --repair --probe-storage) runs every 30 minutes in the production environment only. Elsewhere, run it by hand when you need it.
  • Run capell:frontend-optimizer:status --repair and read the attempt and next-attempt state in Diagnostics. Once the cause is fixed, regenerate with capell:frontend-optimizer:generate-critical-css.