Case Study: classpresso.com
Real results from using Classpresso to optimize our own website. Here's what happened when we ran Classpresso on classpresso.com.
Results at a Glance
1About classpresso.com
This website is built with Next.js 14 and Tailwind CSS — exactly the kind of stack Classpresso is designed to optimize.
Tech Stack
- Next.js 14 (App Router)
- Tailwind CSS 3.4
- TypeScript
- Server Components
Pages Tested
- Homepage (landing page)
- Documentation
- Performance benchmarks
- Login page
Note: These results are from a real production build, not synthetic benchmarks. The numbers represent what actually ships to users.
2Total Site Improvements
| Metric | Before | After | Improvement |
|---|---|---|---|
| Class Characters | 37,018 | 27,019 | 27.0% fewer |
| Total Classes | 3,570 | 2,736 | 23.4% fewer |
| HTML Size | 254.2 KB | 244.1 KB | 4.0% smaller |
| Layout Duration | 11.55ms | 10.59ms | 8.3% faster |
| Style Recalculation | 3.67ms | 3.59ms | 2.2% faster |
Key takeaway: Across all 4 pages, we eliminated 834 classes and 9,999 class characters. That's less parsing, matching, and computation on every page load.
3Per-Page Breakdown
Different pages see different improvements based on their complexity. Pages with more repeated patterns benefit the most.
Homepage
Documentation
Login Page
Best ResultsThe login page saw the biggest class reduction because it uses highly repeated UI components (buttons, inputs, cards) that all share similar Tailwind patterns.
4How We Did It
Adding Classpresso to our build took less than 5 minutes:
# 1. Install classpresso npm install classpresso --save-dev # 2. Update package.json build script "build": "next build && classpresso optimize" # That's it. Build as normal: npm run build
No code changes. No configuration files. Classpresso automatically detects repeated patterns in the build output and consolidates them.
Pro tip: Run classpresso analyze first to see potential savings before applying changes.
5Benchmark Methodology
Test Environment ──────────────────────────────────────────────────────────────── Browser: Chromium (via Playwright) CPU: Throttled 4x (simulates mobile device) Runs: 5 iterations averaged per metric Metrics Collected ──────────────────────────────────────────────────────────────── - HTML size (raw bytes) - Total class count (class attributes parsed) - Total class characters (characters in class attributes) - Performance.getMetrics() → LayoutDuration, RecalcStyleDuration - performance.timing → First Paint, First Contentful Paint Test Pages ──────────────────────────────────────────────────────────────── - Homepage: Marketing landing page with hero, features, CTAs - Docs: Documentation page with code blocks, navigation - Performance: Data-heavy page with tables, charts - Login: Simple form with authentication UI
All tests run against static exports of the Next.js build. Numbers represent actual browser rendering performance, not theoretical estimates.
classpresso.com is now faster thanks to Classpresso
If it works on our site, it'll work on yours.
Ready to optimize your site?
Get started with Classpresso in under 5 minutes.