Skip to content

Critical CSS

Extract the critical CSS your first screen needs.

PerfBee loads your page on mobile and desktop and keeps only the CSS rules that draw the first screen. Compare the result with your full page, then inline it.

A critical CSS generator you can check.

Before and after puts the first paint with only the critical CSS next to the page with its full stylesheet, and gives a match in percent. Scripts are off in both.

What one extraction gives you.

  • Mobile CSS, desktop CSS and one combined file, each with its size.
  • The size shows green when it fits in 14 KB, what a browser gets in the first round trip.
  • Copy the CSS, or download it as a .css file.
Several pages

Run it on every template.

Paste up to 10 pages, one per line. PerfBee loads each one on mobile and desktop and keeps the CSS its first screen needs.

  • Set your own mobile and desktop sizes.
  • Or start from one of 5 device presets.
  • Minify the CSS, or leave out @import and @font-face rules.
Scheduled

Re-extracted on a schedule.

A schedule extracts a page again daily, weekly or monthly. PerfBee alerts you when its critical CSS changes by the percentage you set or more.

  • The default is a change of 5% or more.
  • In the app, and by email on every plan.
History

All your past extractions.

Every extraction is saved, whether you ran it or a schedule did. Copy the CSS again, or extract the page again after a design change.

  • Kept for 30 days on Free, longer on paid plans.
Inline it

Paste it in the head.

Put the CSS in a style tag in the head, then load the full stylesheet without blocking, with a noscript fallback. PerfBee writes the CSS; you decide where it goes.

  • The guide shows how for plain HTML, WordPress and Next.js.

What Critical CSS extracts and does.

Every Critical CSS feature, what it gives you and the plans it is on
FeatureWhat you getPlan
Extract
PagesUp to 10 pages in one run, one per line.Every plan
ViewportsMobile 375 × 667 and desktop 1920 × 1080 by default, 5 device presets, or your own sizes.Every plan
OutputMobile CSS, desktop CSS and a combined file, each with its size and its rule count.Every plan
OptionsMinify is on by default. Leave out @import and @font-face rules when you want to.Every plan
Check and keep
Before and afterThe first paint with only the critical CSS next to the full page, with a match in percent. 70% and up looks good. Kept for 7 days.Every plan
Copy and downloadCopy the CSS, or download it as a .css file.Every plan
HistoryEvery extraction, by hand or by schedule, kept for 30 days on Free and longer on paid plans.Every plan
Keep it current
SchedulesA page extracted again daily, weekly or monthly.Every plan
Change alertsIn the app when the critical CSS changes by 5% or more, or by the percentage you set.Every plan
Alert emailsThe same alert by email.Every plan

Critical CSS, answered.

Anything else? Talk to us.

What is critical CSS?

The CSS rules a page needs to draw its first screen, the part visible before scrolling. Inlined in the head, it lets the browser draw that screen without waiting for the full stylesheets.

What does PerfBee extract, and for which screens?

PerfBee loads the page in a headless browser and keeps only the rules needed for the first screen, once for mobile (375 × 667 by default) and once for desktop (1920 × 1080 by default). You get mobile CSS, desktop CSS and a combined file, each with its size. Both viewport sizes can be changed, and up to 10 URLs run in one extraction.

How do I know the critical CSS is complete?

Run Before and after. PerfBee screenshots the first screen as it is, then with every stylesheet blocked and only the critical CSS applied, and gives a match in percent. A match of 70% or more looks good. Previews are kept for 7 days.

How do I inline it?

Paste the CSS into a style tag in the head, then load the full stylesheet without blocking, with a noscript fallback. The docs show how for plain HTML, WordPress and Next.js.

When should I extract it again?

When your first screen changes: a new header, a new hero, a new template. A scheduled check extracts the page again daily, weekly or monthly and tells you when the critical CSS size changed by your threshold or more, 5% by default.

Does PerfBee change my site?

No. PerfBee never changes your site. It writes the CSS, and you decide where it goes and paste it yourself.

What do I need to start?

A PerfBee account. The Free plan works. Extractions and scheduled runs use your plan's credits.

Ship the first screen first.

  • Mobile and desktop in one run
  • 14 days of Business free
  • No card