You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compress CSS stylesheets, JavaScript libraries, and HTML files to limit bandwidth use and improve loading time.
GZIP algorithm is a server-side compression standard, compressing resources on-the-fly before sending them to the clients.
More recently, BROTLI has gained popularity thanks to enhanced performance, and is currently being supported by all major web browsers.
Example
To use BROTLI in Apache, simply add the following configuration:
# compress html, text, xml, css, javascript
AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/javascript
# Or, compress certain file types in a specific directory:
<Directory "/your-directory">
AddOutputFilterByType BROTLI_COMPRESS text/html
</Directory>