Content compression

Activate compression

mod_deflate (for Gzip) is installed on our servers. You can activate it by going to "Services; Webserver Extensions".

 

Individual rules for compression

You can use the following lines in a .htaccess file to customize the compression, for example, by content type:

FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE "%{Content_Type} -strmatch 'text/html*'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} -strmatch 'text/plain*'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} -strmatch 'text/xml*'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} -strmatch 'text/css*'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} -strmatch 'application/x-javascript*'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} -strmatch 'application/javascript*'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} -strmatch 'application/ecmascript*'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} -strmatch 'text/javascript*'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} -strmatch 'application/rss+xml*'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} -strmatch 'application/json*'"
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no

This will compress the most common content types. You may add your own content types if you need.

  • 0 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

Cache lifetime

How can I set the cache lifetime for a website? The module mod_expires is installed on Apache...

CGI scripts

Using CGI scripts File your CGI scripts in the "public_html" folder of your account. Make sure...

CORS

Cross-origin resource sharing (CORS) is a mechanism that allows web applications to access...

Directory index

How can I protect a folder from being viewed in the browser? In the menu, go to "Manage...

Duplicate password request

Why does password protection always ask for access data twice? You can avoid this by adding / at...

Powered by WHMCompleteSolution