000 Web Host isn't compressing my CSS and my JS [GZIP]


#1

Helo, that's the simple question.

Why isn't 000 Web Host compressing (GZIP) my CSS files and my JS files? It does compress my HTML but I don't understand why it doesn't compress the other files!

Expect help! Thanks a lot!


#2

Helli,

Have you configured from the .htaccess file for your CSS and JS files are sent compressed?


#3

Of course. The rare thing is that it compressess only HTML, but doesn't compress CSS nor JS.

Don't know what's wrong... I used:

This to enable compression:

php_flag zlib.output_compression On
php_value zlib.output_compression_level 5

I tried this to compress all this file types:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

Didn't work!

What another command can I use


#4

Hi,
Any updates on this topic?

I'm trying to optimize my blog and I'm faced with the same problem. In my .htaccess file, I have:

[FONT=Courier New]# ENABLE GZIP COMPRESSION

# 000webhost-only:
php_flag  zlib.output_compression On
php_value zlib.output_compression_level 5

# General:
<IfModule mod_deflate.c>
  # Compress HTML, CSS and JavaScript
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml
</IfModule>[/FONT]

But GTMetrix tells me this:

Enable gzip compression

Compressing the following resources with gzip could reduce their transfer size by 277.2KiB (71% reduction).

And proceeds to list all my css and js files.

However, if I test my blog for compression, the result is that it is actually gzipped:

http://checkgzipcompression.com/?url=http%3A%2F%2Foctopusinvitro.tk

although I guess it only takes into account html files...

Is it possible to gzip JavaScript and CSS files in 000webhost servers through a custom .htaccess file?

Thank you in advance.

PS. My guess is that 000webhost servers are ignoring the <IfModule mod_deflate.c> part. Could this be the case?


#5

Any updates on the topic...?


#6

Rewording my question:
Is "mod_deflate" enabled in 000webhost servers?


#8