Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i got a litte problem with gzip

YSlow says:

Grade F on Compress components with gzip

There are 5 plain text components that should be sent compressed

Page Speed says:

Enable compression

but its active in my .htaccess:

this is my .htaccess

RewriteEngine on
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.jgz -f
RewriteRule (.*)\.js$ $1\.js.jgz [L]
AddType "text/javascript" .js.jgz
RewriteRule (.*)\.css$ $1\.css.jgz [L]
AddType "text/css" .css.jgz
AddEncoding gzip .jgz

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>

i have my css and js zipped in the same directory.

i tested it this way: i deleted the browsercache and the style.css on my webserver. i refreshed my homepage and the css was sent by gzip with no probs

is there anything else missing?


its just a test-account and the domain is available to sunday

Yslow says:

Grade F on Compress components with gzip
There are 5 plain text components that should be sent compressed

    * http://test72544.test-account.com/
    * http://test72544.test-account.com/css/style.css
    * http://test72544.test-account.com/css/print.css
    * http://test72544.test-account.com/js/js/jquery.min.js
    * http://test72544.test-account.com/js/js/scripts.js

PageSpeed says:

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

Compressing http://test72544.test-account.com/js/js/jquery.min.js could save 20.1KiB (62% reduction).
Compressing http://test72544.test-account.com/css/style.css could save 14.5KiB (79% reduction).
Compressing http://test72544.test-account.com/css/print.css could save 7.2KiB (76% reduction).
Compressing http://test72544.test-account.com/ could save 5.0KiB (74% reduction).
Compressing http://test72544.test-account.com/js/js/scripts.js could save 4.8KiB (65% reduction).

i don't wanna use mod_deflate because i don't want to make excessive demands of the server

share|improve this question

migrated from stackoverflow.com Oct 18 '11 at 2:19

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

Have you got a URL we can look at?

Which resources does YSlow and PageSpeed say aren't compressed?

Also just curious why you're approaching it using URL rewriting rather than mod_deflate (http://httpd.apache.org/docs/2.0/mod/mod_deflate.html)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.