0

I'm using the following line in my .htaccess file to enable compression:

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript text/javascript application/json image/svg+xml image/jpeg

This works fine except for the initial html request. Is there a way to compress the html as well?

This is what my request looks like:

Response Header

Connection: close Content-Type: text/html; charset=UTF-8 Server: Apache/2.2.15 (CentOS) Transfer-Encoding: chunked X-Powered-By: PHP/5.6.21

Request Headers

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Encoding: gzip, deflate, sdch Accept-Language: en-US,en;q=0.8,de-DE;q=0.6,de;q=0.4 Cache-Control: no-cache Connection: keep-alive Pragma: no-cache Upgrade-Insecure-Requests:1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Marcel Otten
  • 160
  • 10
  • Possible duplicate of [How do I enable mod\_deflate for PHP files?](http://stackoverflow.com/questions/2835818/how-do-i-enable-mod-deflate-for-php-files) – Anonymous Feb 11 '17 at 20:08
  • I'm not struggling with enabling mod_deflate in general, just for the html request. – Marcel Otten Feb 13 '17 at 13:22

0 Answers0