Skip to content

Post processing tips for users (WPO) #49

@DanielRuf

Description

@DanielRuf

Some tips from my past Web Performance Optimization experience.

  • Minimize the css and html (for example with html-minifier-next, a successor of html-minifier and html-minifier-terser*) 1
  • Generate brotli files (for html and css files) to deliver them via webserver if supported (brotli -5 *.{html,css} often yielded the best results for encoding + decoding time, the maximum with -9 does not save much more bytes but results in bigger decoding times)
  • Use system fonts and try to avoid big font files (woff2 is best, others are worse) 2
  • For images use a decent compression tool with good defaults (caesium, squoosh.app), or run the tools directly (mozjpeg, ...) with needed quality settings (60 - 75% image quality and lossless is often ok)
  • Use the right image format (better - worse: webp > jpeg > png) - (I'm not a big fan of avif)
  • (Further steps are not possible without using / changing html: lazy loading of images, blurhash, sourceset / picture element)
  • ...

Further tips can be found at https://calendar.perfplanet.com/


* I was a maintainer of html-minifier-terser and the new version introduces some improvements

Footnotes

  1. https://github.com/j9t/html-minifier-next

  2. https://github.com/system-fonts/modern-font-stacks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions