More Speed for Your Visitors
The Optimize Website feature uses the Apache module mod_deflate to compress your website's content (Gzip) before it is sent to the visitor's browser. The principle is similar to a ZIP file: the data becomes smaller, the transfer is faster, and the browser decompresses it instantly upon receipt.
Activating Compression
You have three options to control the delivery of your data:
No server-side compression takes place. This is the default setting but is not recommended for modern websites.
Recommended: All text-based content (HTML, CSS, JavaScript) is automatically compressed. This is the simplest and most effective setting for most websites.
For experts: You can specifically define which file types should be compressed (e.g.,
text/html text/css application/javascript).Important Notes
- Images: Image formats like JPG, PNG, or WebP are already compressed by nature. Additional Gzip compression would yield no savings here and would only consume server resources unnecessarily.
- PHP Content: While static files are optimized via this tool, compression for dynamic PHP scripts can be further fine-tuned in the MultiPHP INI Editor using the
zlib.output_compressionoption. - Background Technology: cPanel writes these rules directly into the
.htaccessfile in your main directory. Manual changes there should therefore be made with caution.
Want to measure the results?
Use tools like Google PageSpeed Insights before and after activation.