Skip to main content
GrN.dk

Main navigation

  • Articles
  • Contact
  • Your Digital Project Manager
  • About Greg Nowak
  • Services
  • Portfolio
  • Container
    • Excel Freelancer
    • Kubuntu - tips and tricks
    • Linux Apache MySQL and PHP
    • News
    • Image Gallery
User account menu
  • Log in

Breadcrumb

  1. Home

Critical CSS for Faster Pages: When It Helps and When It Does Not

By Greg Nowak. Last updated 2026-07-06.

Critical CSS is the small slice of styling a browser needs to render the first visible part of a page. If a large stylesheet sits in the <head>, the browser may need to download and process it before it can paint useful content. Inlining the right CSS can make a page feel alive sooner.

That does not make critical CSS a universal fix. For a business site, the useful question is not whether Google likes faster pages. The useful question is whether render-blocking CSS is actually delaying the pages that matter: service pages, campaign landing pages, quote forms, ecommerce category pages, or high-traffic editorial templates.

Start With the Bottleneck

Critical CSS should come after measurement, not before it. Use Lighthouse, PageSpeed Insights, WebPageTest, or Chrome DevTools to see what is really slowing the first useful render. If the main delay is server response time, an oversized hero image, web font loading, third-party scripts, or JavaScript hydration, inlining CSS may add complexity without moving the business metric.

It is most promising when important templates share a large stylesheet, Lighthouse flags render-blocking CSS, and the largest visible content is waiting on layout and styling rather than image transfer. It is less promising when your CSS is already small, your pages are highly unique, or your CMS allows editors to assemble unpredictable first screens.

Decision Evidence to Look For Practical Action
Use it Render-blocking CSS delays first render or LCP on valuable templates. Generate critical CSS per template in the build or release process.
Pilot it Large shared CSS bundle, but mixed causes in the waterfall. Test one or two lead-generating templates before rolling it across the site.
Skip it for now Slow TTFB, heavy images, JavaScript, or unstable layout are the bigger problems. Fix those bottlenecks first, then retest CSS delivery.
A simple decision matrix for deciding whether critical CSS belongs in the next performance sprint.

What Belongs in the Critical Layer

Keep the critical layer boring and small. It should cover the base layout, typography needed for the first screen, header, navigation, hero area, visible buttons, and any above-the-fold form fields. It should also preserve reserved space for visible media so the first render is not followed by a layout jump.

Leave out below-the-fold components, footers, admin styles, editor-only UI, rarely used utility classes, animations, and page-builder widgets that do not appear immediately. Be careful with font rules and background images. Sometimes they belong in the first render; often they are better loaded normally or intentionally ignored during extraction.

Make It a Repeatable Build Step

Manual critical CSS ages badly. Online generators are fine for proving the idea, but production work should run from the same templates, routes, and assets your site actually deploys. Generate by page family, not by random individual URLs, and test both mobile and desktop viewports because breakpoint-specific layout rules are easy to miss.

For Node-based builds, the critical package remains a practical starting point:

pnpm add -D critical
import { generate } from 'critical';

await generate({
  base: 'dist/',
  src: 'index.html',
  inline: true,
  target: {
    html: 'index-critical.html',
    css: 'critical.css'
  },
  dimensions: [
    { width: 390, height: 844 },
    { width: 1280, height: 900 }
  ]
});

Watch the maintenance details: asset paths, CDN URLs, web fonts, cookie banners, logged-in CMS states, and editor-controlled blocks. Also be cautious with extraction options that create page-specific non-critical CSS files. A template can look faster in a one-page test while losing cache efficiency across the wider site.

Pair It With CSS Cleanup

If the global stylesheet has years of legacy selectors, critical CSS is only part of the answer. Remove unused CSS carefully, then keep the critical layer small. PurgeCSS can help, but CMS and JavaScript classes must be safelisted or you will remove styles that only appear at runtime.

await new PurgeCSS().purge({
  content: ['templates/**/*.html', 'src/**/*.js'],
  css: ['dist/app.css'],
  safelist: [/^is-/, /^has-/, /^js-/],
  rejected: true
});

Review the rejected list during rollout. That quick check often catches over-pruning before a campaign page, menu state, or form validation message breaks in production.

Drupal Notes

For Drupal sites, the critical_css module is still available. As of July 2026, Drupal.org lists the module as feature-complete with maintenance fixes only, and the stable 2.0.x release supports Drupal 9, 10, and 11:

composer require 'drupal/critical_css:^2.0'

The important detail is that the module does not remove the need to generate critical CSS. It loads the critical file you provide and can load other head CSS asynchronously. Treat it as a Drupal delivery mechanism, while your build or release process remains responsible for producing accurate CSS for each template.

Measure the Business Impact

Critical CSS can support SEO, but it is not a ranking shortcut. Google’s current Core Web Vitals are LCP, INP, and CLS. Critical CSS mainly helps the loading and rendering side of that picture; it will not fix poor interaction latency or layout instability unless those problems are connected to CSS delivery.

Measure before and after on anonymous mobile pages. Look at render-blocking resources, LCP element timing, visual stability, and whether forms or calls to action become usable sooner. Then monitor Search Console field data after enough real users have visited. The win is not a perfect synthetic score. The win is a page that feels credible faster and gives prospects less time to leave.

If you need a practical read on whether critical CSS is worth the effort, Greg can help you scope the right performance fix across CSS delivery, Drupal theming, front-end build workflow, and conversion-critical templates.

Related on GrN.dk

  • Why Your Website's Third-Party Stack Needs a Real Owner
  • Optimizing Drupal: A Practical Speed Checklist
  • WordPress Google PageSpeed: Practical Fixes for Core Web Vitals

Need help with this kind of work?

Get help scoping the right performance fix Get in touch with Greg.

Sources

  • Understand the critical path | web.dev
  • Understanding Core Web Vitals and Google search results | Google Search Central
  • addyosmani/critical | GitHub
  • Configuration | PurgeCSS
  • Critical CSS | Drupal.org
Last modified
2026-07-06

Tags

  • seo
  • Performance
  • css
  • Drupal
  • Core Web Vitals

Review Greg on Google

Greg Nowak Google Reviews

 

Hand-drawn sketch infographic summarizing: WordPress Speculative Loading Needs a Cart, Analytics, and Cache Test
WordPress Speculative Loading Needs a Cart, Analytics, and Cache Test
2026-06-24

WordPress 6.8 adds cautious speculative loading. Before enabling stronger prerendering, test cart state, analytics, personalization, and cache load.

Hand-drawn sketch infographic summarizing: ChatGPT Is Becoming Office Software: Put Admin Hygiene First
ChatGPT Is Becoming Office Software: Put Admin Hygiene First
2026-06-24

ChatGPT now has files, sessions, apps, and scheduled work. Treat it like office software: audit access, clean up retained data, and limit risk.

Hand-drawn sketch infographic summarizing: Search Console Can See Social Posts—Your Reports Need a New Map
Search Console Can See Social Posts—Your Reports Need a New Map
2026-07-13

Search Console now reports how social posts perform across Google. Here’s a practical way to manage properties, permissions, baselines and exports.

Hand-drawn sketch infographic summarizing: WordPress Now Speaks AI; Plugins Still Need Real Guardrails
WordPress 7.0 Has an AI Client. Plugins Need Their Own Guardrails
2026-07-12

WordPress 7.0 standardizes how plugins call AI providers, while leaving developers responsible for access control, cost limits, capability checks and graceful failures.

Hand-drawn sketch infographic summarizing: AI images need a media-library audit before they reach clients
AI images need a media-library audit before they reach clients
2026-06-24

AI-generated images can carry provenance signals, but CMS resizing, plugins, and CDNs may change them. Audit the media path before delivery.

Hand-drawn sketch infographic summarizing: AI disclosure rules belong in the CMS, not a spreadsheet
AI disclosure rules belong in the CMS, not a spreadsheet
2026-06-26

AI-assisted publishing needs visible disclosure choices, review evidence, and SEO checks inside the CMS, not in a side spreadsheet.

Hand-drawn sketch infographic summarizing: The risky part of AI workflow pilots is often the OAuth screen
The risky part of AI workflow pilots is often the OAuth screen
2026-06-26

AI workflow pilots can fail at the access layer. Review OAuth scopes, API keys, service accounts, and revocation paths before launch.

Hand-drawn sketch infographic summarizing: AI crawler permissions now belong in a licensing register
AI crawler permissions now belong in a licensing register
2026-06-27

AI crawler controls now affect search visibility, AI answers, model training, and licensing. A register keeps policy, evidence, and enforcement aligned.

Hand-drawn sketch infographic summarizing: Google’s AI Search toggle needs a test plan, not a gut decision
Google’s AI Search toggle needs a test plan, not a gut decision
2026-07-11

Google’s AI Search control creates a measurable publishing choice. Test visibility, traffic and leads before changing the setting across your site.

Hand-drawn sketch infographic summarizing: WordPress headless menus need an exposure check before launch
WordPress headless menus need an exposure check before launch
2026-06-28

WordPress 6.8 helps headless builds expose menu data through the REST API, but agencies should review exactly what becomes public before launch.

More articles
RSS feed

GrN.dk web platforms, web optimization, data analysis, data handling and logistics.