Minify CSS

Check whether visitors receive production CSS and verify the build, cache and visual result after minification.

A CSS minification finding often reveals a deployment mistake: readable development assets reached the public site instead of the optimised build. Before adding another optimisation tool, use DevTools to inspect the stylesheets requested by the URL tested in Sitepulse. Establish who produces each file, where it is served and whether production HTML points at the intended version.

Confirm which bytes visitors receive

Open the stylesheet response with browser caching disabled. Distinguish its on-the-wire size from the larger decoded file. Minification removes dispensable syntax from the file; transfer compression reduces the bytes sent over the connection. One does not replace the other.

A source map can make a compact file readable in developer tools. That does not mean the browser downloaded the original source stylesheet. Inspect the network response and its URL before drawing a conclusion from a formatted editor view.

Repair the production build

Use the project's existing CSS build step and deploy its output. Check that a theme, plugin or application template has not hard-coded the development filename. If the flagged file belongs to a third party, first check whether the provider offers an appropriate production asset; changing your own bundler will not rewrite a remotely hosted response.

The following is an illustrative source-to-output change, not a file to maintain by hand:

/* Authoring source */
.notice {
  padding: 12px 16px;
  color: #334455;
}
/* A possible minified output */
.notice{padding:12px 16px;color:#345}

Remove duplicate optimisation layers

A site may already minify assets during its build and again through a hosting or CMS optimisation layer. Establish which layer owns the transformation. Keep generated file references and cache keys consistent; do not leave HTML pointing at a removed filename after replacing an asset.

Preserve required licence notices through the tool's supported configuration. Avoid manually stripping comments or applying a text-replacement expression to CSS, where strings, URLs and syntax need to remain valid.

Check the public build and its appearance

After release, verify the asset URL, response content and transfer size on the public site. Invalidate only the relevant stale cache entries if the origin and CDN disagree. Re-run the same Sitepulse check and test the styled states that matter, including an open menu and form validation.

Do not expect minification to fix an oversized dependency or CSS loaded on the wrong route. If the reduction is small, investigate unused styles rather than chasing a nominally perfect audit result. Estimates for minification and other changes to the same stylesheet may overlap.

Technical references