Thanks for stopping by. I really tried this on my own, but again it seems to me that there is too much for me to handle.
SITUATION...
I live with my own site on a shared host. When I came to compress my tons of jms and css created with cms to make me happy, and I realized that
my host did not install either mod_gzip or mod_deflate . Installed ZLIB. Therefore, I was looking. Found a typical php append solution and didn't like it. Found some neat lines of code for htaccess that made me happy because they worked right away:
AddHandler application/x-httpd-php .html .htm .php .js php_flag output_buffering On php_value output_handler ob_gzhandler php_flag zlib.output_compression Off
I confirmed that it works with GIDZipTest . This is all good and I like it.
But as soon as I put .css in the AddHandler list, my page completely breaks.
I tried to use php solution with ob_gzhandler only for css files, but in the end it doesn't work at all. It just does nothing.
Temporary solution? (NOT VALID)
I manually minimized all css and downloaded the css.gz version of each file, serving it with
RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond %{REQUEST_FILENAME}\.gz -s RewriteRule ^(.*)\.css $1\.css\.gz [QSA] RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
It works great.
QUESTIONS!
- What do I need to define / refine for css compression? I feel like Iβm just lacking conversion information ...
- When I manually serve my mini .css.gz files for the client, will they still be compressed additionally?
- Will it have any additional benefits in files, or should I just stick with the manually maintained versions and give ** about Google PageSpeed?
(GIDZipTest still shows what-if scenarios even for mini files that I would like this to ...)
Thanks in advance for any comment.
Respectfully,
Marian
source share