Product Design, Manufacturing & Innovation Resources
Home » Online Tools » Critical Path CSS generator

Critical Path CSS generator

This will analyse any URL given and concatenate the CSS needed to display the “above the folder” HTML rendering, i.e. the “critical CSS” or “critical CSS path“.

A nice tool, doing a job that is not easy to do without. And it returns an already  minified css version directly.

You must then incorporate this code into the head of your page(s), either manually, or with a dedicated plugin, or any cache or optimizer plugin.

This will permit to render the th top part of the initially visible zone faster, without loading the external css files.

  • will this increase your your google metrics: likely
  • will it increase your one-time visitors experience : likely
  • will it increase your repeating visitors experience: no (as it will increase the weight of every page this css is added, instead of adding it only to an external file that is loaded only once).

Tip #1: clear any server or plugin cache just after

Tip #2: if going into that optimization route, in order to have the most suited CSS, it worth to make this trick once per every notably different group of page you have in your site, each one using likely a very different CSS (ex: forum pages, normal posts, custom post types …).

Tip #3: as this CSS is purely a static code -on intent-, it should be updated every time you do a major change on the CSS of the page.

Disciplines: Web performance, Web development, SEO, WordPress development.
Free alternative to Penthouse, WP Rocket.
Critical Path CSS generator compared with Penthouse and WP Rocket
Critical Path CSS generatorPenthouseWP Rocket
Form and use: This is an online generator from Core Web Vitals. You enter a URL, set mobile and desktop viewport sizes, and receive critical CSS to paste into a style tag in the head just below the title. It also gives three methods to defer the original stylesheets.Form and use: Penthouse is a Node library described as the original critical path CSS generator. You call it with a URL and a CSS string or file and it returns the critical CSS. Options include viewport width and height (defaults 1300 by 900), forceInclude, forceExclude and a timeout.Form and use: This is a paid WordPress caching plugin. Remove Unused CSS is switched on under File Optimization, Optimize CSS delivery, and the plugin inserts the generated CSS itself.
How the CSS is produced: The tool loads the page in a Chrome-based browser on a custom Node platform, checks several viewports, finds the stylesheet parts that render the visible area, then cleans and minifies them.How the CSS is produced: It drives headless Chromium through Puppeteer, and several jobs can share one browser instance.How the CSS is produced: WP Rocket sends the page URL to an external API that visits the page and builds the used CSS. The result is stored as a gzipped file and inserted in a style element with the id wpr-usedcss after the title tag. It is regenerated every 30 days.
Automation and upkeep: The output is pasted by hand. The tool is in beta, and the page suggests trying again after 5 minutes if it fails.Automation and upkeep: You script it yourself, for example in a build step, and write the result to a file.Automation and upkeep: Generation starts when a non-cached page is visited. Failed attempts are retried up to 5 times with increasing waits.
Requirements: Node.js with npm or yarn and headless Chrome through Puppeteer. On Linux some system libraries such as libnss3 may need installing.Requirements: A publicly accessible site, working WP-Cron and a server or firewall that allows the plugin bot user agents. It does not work behind htaccess authentication, and Cloudflare Bot Fight Mode must be disabled.
Licence and cost: The page calls it a free online tool and lists no usage caps.Licence and cost: The code is under the MIT licence.Licence and cost: Paid plans are annual and scale with the number of sites (1, 3 or 50). The 14-day trial is charged automatically at its end unless cancelled.

Topics covered: Critical Path, CSS generator, URL analysis, minified CSS, above-the-fold, HTML rendering, optimization, performance metrics, user experience, server cache, plugin integration, static code, web performance, page rendering, external CSS, site optimization, responsive design ISO/IEC 25010, ISO/IEC 9126, ISO 9241, ISO/IEC 27001, and ISO 8601..

More Network & Web tools

Suggest your best online tool:

Do you know a better, a complementary or a replacement website to the one listed above ?

> Suggest it here <

10th year anniversary

Full size images and downloads are only available, 100% free, for registered members.

> Login <