Performance and monitoring
Web compression with Brotli and Gzip
The LiteSpeed web server automatically compresses compatible text content, such as HTML, CSS, JavaScript, JSON, XML and SVG. This reduces the data transferred; you do not need to add compression from PHP to turn it on.
The browser says which algorithms it supports and the server decides whether to deliver Brotli, Gzip or an uncompressed response depending on the resource and the configuration. Brotli can shrink some content further, but it is not always used and does not guarantee the same improvement for every file.
Check a response
In the browser's tools, open Red / Network, select the resource and look at Content-Encoding. A compressed response may show br or gzip. Check a fresh request, not only a copy from the browser's memory.
If a JPEG image, a ZIP or a very small file does not show that header, it does not mean something is wrong. The type, the size and the format's own compression all play a part. If there is a CDN, it may choose again how it delivers the resource to the visitor.
See the guide to compression and saving transfer to interpret the sizes. If you need to diagnose an incompatibility, you can temporarily disable compression for a limited scope and restore it afterwards.
You may also find useful
- Gzip compression, saving transfer and speeding up access Explains how Gzip and Brotli reduce the size of text content and why LiteSpeed applies them automati...
- Bulk image optimisation Optimise JPG, JPEG and PNG files by account, domain or directory; check the quality on a sample and...
- Edit images in cPanel: size, thumbnails and format Learn how to resize an image, create thumbnails or convert files from cPanel, keeping the originals...
- AccelerateWP: features, availability and configuration Details the free and premium AccelerateWP features for WordPress, including caching, file optimisati...
Something wrong or out of date? Tell us and we will review it.