Features
xSpeed Hub Pricing Docs Blog Scan
Appearance
Get Plugin

How to optimize CSS and JavaScript

Optimization 4 min

The panel that controls how your stylesheets and scripts are delivered — minification and loading behaviour, plus Pro tools for critical and unused CSS.

Caching makes your server fast. What arrives in the browser is a separate problem: stylesheets and scripts that block rendering, ship code the page never uses, and load in an order nobody chose. The CSS & JavaScript panel is where you fix delivery.

Where to find it

  1. In your WordPress admin, click xSpeed Cache in the left menu.
  2. In the xSpeed Cache sidebar, open the Optimization group.
  3. Click the CSS & JavaScript card.

Shortcut: open wp-admin/admin.php?page=xspeed#/performance/minify directly.

✅ This panel is part of xSpeed Cache (Free). Two of its tabs are ⭐ Pro.

The CSS & JavaScript panel and its three tabs


Tabs on this panel

TabFeatureTierGuide
MinifyCompress and reorder CSS/JS deliveryFreeHow to minify CSS and JavaScript
Critical CSSInline above-the-fold styles⭐ ProHow to generate Critical CSS
Unused CSSStrip rules the page never uses⭐ ProHow to remove unused CSS

Each tab has its own address, so you can link straight to one:

TabURL
Minify#/performance/minify
Critical CSS#/performance/minify/critical
Unused CSS#/performance/minify/unused

Which one should you use?

These three attack the same bottleneck from different angles, and they’re meant to be layered rather than chosen between.

MinifyCritical CSSUnused CSS
What it changesHow assets are compressed and when they loadWhat renders firstHow much CSS ships at all
Risk levelLow to moderate, per settingLowModerate — needs verification
EffortToggle and testMostly automaticReview before trusting
TierFree⭐ Pro⭐ Pro

A sensible order:

  1. Start with Minify. Compression is nearly free of risk and gives an immediate size win. The loading-behaviour toggles on the same tab are more powerful and more disruptive — introduce them one at a time.
  2. Add Critical CSS once you’re loading stylesheets asynchronously, because that’s the pairing that avoids a flash of unstyled content.
  3. Then Unused CSS, which gives the biggest byte savings but needs the most checking, since “unused” is a judgement about pages you may not have tested.

⚠️ Change one thing at a time here. Unlike caching, these settings alter what the browser receives. A page that breaks after enabling four toggles at once tells you nothing about which one did it — and some breakage only shows on pages you don’t routinely look at.

Minification itself is safe on most themes. The risk sits in the loading-behaviour options — defer, delay, async CSS — because they change execution order, which is what scripted UI depends on.

💡 Check in a private window. Most of what this panel does applies to cached, logged-out responses. Viewing your own site while logged in is the usual reason a change appears to have done nothing.