title: Apache 2.4 gzip compression not work on JS but work on CSS
body: <p>Apache 2.4 with mod_deflate compress CSS but not JS</p>
  
  <p><strong>.htaccess</strong></p>
  
  <pre><code># Proper MIME types for all files
  &lt;IfModule mod_mime.c&gt;
      AddType application/javascript  js
      AddType text/css                css
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_deflate.c&gt;
      &lt;IfModule mod_setenvif.c&gt;
          &lt;IfModule mod_headers.c&gt;
               SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
              RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
          &lt;/IfModule&gt;
      &lt;/IfModule&gt;
  
      &lt;IfModule mod_filter.c&gt;
          AddOutputFilterByType DEFLATE application/javascript text/css               
      &lt;/IfModule&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Response of <code>site.com/src/css/core.css</code>is OK <strong>(encoded: 30.38 KiB / decoded: 146.31 KiB)</strong></p>
  
  <pre><code>Status: HTTP/1.1 200 OK
  Connection: close   
  Expires:    Tue, 06 Oct 2015 14:55:59 GMT   
  Date:   Mon, 06 Oct 2014 14:55:59 GMT   
  Content-Type:   text/css; charset=utf-8 
  Server: Apache  
  Accept-Ranges:  bytes   
  Last-Modified:  Mon, 06 Oct 2014 13:13:31 GMT   
  Vary:   Accept-Encoding 
  Cache-Control:  max-age=31536000    
  Transfer-Encoding:  chunked 
  Content-Encoding:   gzip    
  Vary:   Accept-Encoding
  </code></pre>
  
  <p>Response of <code>site.com/src/js/core.js</code> is KO </p>
  
  <pre><code>Status: HTTP/1.1 200 OK
  Connection: close   
  Content-Length: 236437  
  Expires:    Tue, 06 Oct 2015 14:57:50 GMT   
  Date:   Mon, 06 Oct 2014 14:57:50 GMT   
  Content-Type:   application/javascript; charset=utf-8   
  Server: Apache  
  Accept-Ranges:  bytes   
  Last-Modified:  Mon, 06 Oct 2014 12:49:48 GMT   
  Vary:   Accept-Encoding 
  Cache-Control:  max-age=31536000
  </code></pre>
  
  <p><strong>http.conf</strong> (active modules)</p>
  
  <pre><code>LoadModule access_compat_module modules/mod_access_compat.so
  LoadModule alias_module modules/mod_alias.so
  LoadModule auth_basic_module modules/mod_auth_basic.so
  LoadModule authn_file_module modules/mod_authn_file.so
  LoadModule authz_core_module modules/mod_authz_core.so
  LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  LoadModule authz_host_module modules/mod_authz_host.so
  LoadModule authz_user_module modules/mod_authz_user.so
  LoadModule autoindex_module modules/mod_autoindex.so
  LoadModule cgi_module modules/mod_cgi.so
  LoadModule deflate_module modules/mod_deflate.so
  LoadModule dir_module modules/mod_dir.so
  LoadModule env_module modules/mod_env.so
  LoadModule expires_module modules/mod_expires.so
  LoadModule filter_module modules/mod_filter.so
  LoadModule headers_module modules/mod_headers.so
  LoadModule include_module modules/mod_include.so
  LoadModule log_config_module modules/mod_log_config.so
  LoadModule cache_disk_module modules/mod_cache_disk.so
  LoadModule mime_module modules/mod_mime.so
  LoadModule negotiation_module modules/mod_negotiation.so
  LoadModule proxy_module modules/mod_proxy.so
  LoadModule proxy_http_module modules/mod_proxy_http.so
  LoadModule rewrite_module modules/mod_rewrite.so
  LoadModule setenvif_module modules/mod_setenvif.so
  LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
  LoadModule ssl_module modules/mod_ssl.so
  LoadModule status_module modules/mod_status.so
  </code></pre>
  
  <p>Why, apache 2.4 not compress JS, but compress CSS??</p>