Contents

Chapter 1

Features

This chapter covers the core features and capabilities of Page Speed Optimizer.

Features

  • HTML minification (comments, whitespace, collapse)
  • CSS minification (comments, whitespace, selectors, semicolons)
  • JavaScript minification (comments, whitespace, string-safe)
  • Automatic lazy loading injection (skips hero image)
  • Full directory audit with performance scoring (0-100)
  • Per-file size checks against best-practice thresholds
  • Image format recommendations (WebP/AVIF conversion)
  • Inline CSS/JS detection and extraction advice
  • Device breakdown by file type with size percentages
  • Text and JSON report output
  • Python stdlib only — zero pip dependencies

Quick Start

bash
# Analyze a single HTML file
python src/page_speed_optimizer.py --analyze examples/sample.html

# Minify HTML
python src/page_speed_optimizer.py --minify examples/sample.html --output index.min.html

# Minify CSS
python src/page_speed_optimizer.py --minify-css style.css --output style.min.css

# Add lazy loading to images
python src/page_speed_optimizer.py --lazy-load index.html --output index.lazy.html

# Audit an entire directory
python src/page_speed_optimizer.py --audit-dir ./dist/ --report
Chapter 2

CLI Reference

Follow this guide to get Page Speed Optimizer up and running in your environment.

CLI Reference

FlagDescription
--analyzeAnalyze a single HTML file
--minifyMinify an HTML file
--minify-cssMinify a CSS file
--minify-jsMinify a JS file
--lazy-loadAdd lazy loading to an HTML file
--audit-dirAudit all assets in a directory
--reportGenerate audit report
--output, -oOutput file
--format, -fOutput format: text or json
--verbose, -vEnable verbose logging

Configuration

See examples/sample.html for a sample landing page to test with.

Chapter 3
🔒 Available in full product

Examples

You’ve reached the end of the free preview

Get the full Page Speed Optimizer and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $19 →
📦 Free sample included — download another copy for the full product.
Page Speed Optimizer v1.0.0 — Free Preview