Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter houmie

    (@houmie)

    Hi Frederick,

    Just a recap the minifier was breaking the theme js files no matter if I used closure, YUI or default jsmin.

    Hence I decided to ignore these theme js, but despite the gzip compression being enabled, I get a low score from google, saying I should enable compression. It seems W3C only applies compression if minified.

    Compressing the following resources with gzip could reduce their transfer size by 105.2KiB (77% reduction).
    
        Compressing https://cdn.chasebot.com/wp-content/themes/optimize/includes/js/prettyPhoto.js?ver=3.5.1 could save 23.2KiB (74% reduction).

    I see you have mentioned a fix in 0.9.2.8

    – Fixed an issue with auto minify

    Is any of these two problems fixed?

    many thanks

    Thread Starter houmie

    (@houmie)

    Sure here it is:

    # BEGIN W3TC CDN
    location ~ \.(ttf|otf|eot|woff)$ {
       add_header Access-Control-Allow-Origin "*";
    }
    # END W3TC CDN
    # BEGIN W3TC Browser Cache
    gzip on;
    gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
    location ~ \.(css|htc|js|js2|js3|js4)$ {
        expires 31536000s;
        add_header Pragma "public";
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        add_header X-Powered-By "W3 Total Cache/0.9.2.7";
    }
    location ~ \.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$ {
        expires 3600s;
        add_header Pragma "public";
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        add_header X-Powered-By "W3 Total Cache/0.9.2.7";
        try_files $uri $uri/ $uri.html /index.php?$args;
    }
    location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ {
        expires 31536000s;
        add_header Pragma "public";
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        add_header X-Powered-By "W3 Total Cache/0.9.2.7";
    }
    # END W3TC Browser Cache
    Thread Starter houmie

    (@houmie)

    gzip on;
            gzip_disable "msie6";
    
            gzip_vary on;
            gzip_proxied any;
            gzip_comp_level 9;
            gzip_buffers 16 8k;
            gzip_http_version 1.1;
            gzip_min_length 0;
            gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    This is the full settings with gzip types. The way I see it it is a bug. If you need any more information let me know please.

    Thread Starter houmie

    (@houmie)

    Thank you

    Thread Starter houmie

    (@houmie)

    You are right. Restarting it has solved it.

    So you are saying every time I enable/disable Minifier option, I have to restart nginx?

    Thank you,
    houmie

    Thread Starter houmie

    (@houmie)

    Thanks Poti, actually around teh time you responded, I had my CDN off in order to update the website ?? I recon you couldn’t experience the problem.

    Nonetheless by activating “Disable CDN on SSL pages”, it works now like a charm.

    It is a bit of a shame that CDN doesn’t work with SSL. Is it intended or part of a bigger configuration or something I haven’t done yet?

    Thanks

    Thread Starter houmie

    (@houmie)

    Thanks I will try that and see. ??

    Thread Starter houmie

    (@houmie)

    Thanks Rahul,

    The content of /var/www/example/htdocs/nginx.conf was already in full above.

    And this is the vhost:

    depricated

    and this is /etc/nginx/nginx.conf

    depricated
    Many thanks for your advice,

    Thread Starter houmie

    (@houmie)

    Thanks Rahul, I found a website that creates CSS sprites.

    I will check out that discussion you have started. No problem with reloading the nginx config manually.

    One last thing, there is no fault currently in my settings regarding expiry headers, correct? So is my assumption correct that I have to simply wait a bit longer until my score goes up? Or is there something else I am missing in that area?

    Many Thanks,

    Thread Starter houmie

    (@houmie)

    @rahul286

    Thank you for your excellent blog. I have read it before and it was helpful getting nginx working so far. I was reading five other tutorials before I had found yours, and they all failed on me. ?? I am not sure if editing the vhost manually is really necessary where W3C does exactly that for you. Please carry on reading and I explain it later.

    @andreiguru

    Thank you for the help. I am in fact using PHP-FPM ??

    This my setting:

    location ~ \.php$ {
                   # With php5-fpm:
                   fastcgi_pass unix:/var/run/php5-fpm.sock;
                   fastcgi_index index.php;
                   include fastcgi_params;
            }

    Regarding editing manually the vhost, I am not sure if that is necessary. Please continue reading the post.

    Today I tested the analysis again and it jumped up to 76 points.

    The “Enable Compression” is completely gone.
    “Leverage browser caching” is now yellow instead of red.

    It says now:

    The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:

    Correct me if I am wrong, it seems the header expiry are set but are a bit fresh. So in a week’s time, this should become “old” enough and hence score higher?

    Now to your setting suggestions. I think the only manual step is to include the nginx.conf that W3C is creating for you in the vhost.

    include /var/www/example/htdocs/nginx.conf;

    It seems W3C has already generated all settings in there that you have both suggested in the external conf file:

    # BEGIN W3TC Browser Cache
    gzip on;
    gzip_types text/css application/x-javascript text/x-component text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
    location ~ \.(css|js|htc)$ {
        expires 31536000s;
        add_header Pragma "public";
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        add_header X-Powered-By "W3 Total Cache/0.9.2.4";
    }
    location ~ \.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$ {
        expires 3600s;
        add_header Pragma "public";
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        add_header X-Powered-By "W3 Total Cache/0.9.2.4";
    }
    location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ {
        expires 31536000s;
        add_header Pragma "public";
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        add_header X-Powered-By "W3 Total Cache/0.9.2.4";
    }
    # END W3TC Browser Cache
    # BEGIN W3TC Minify core
    rewrite ^/wp-content/w3tc/min/w3tc_rewrite_test$ /wp-content/w3tc/min/index.php?w3tc_rewrite_test=1 last;
    rewrite ^/wp-content/w3tc/min/(.+\.(css|js))$ /wp-content/w3tc/min/index.php?file=$1 last;
    # END W3TC Minify core

    Do you think it is missing anything there? Because I think its best to drive the settings from one place. Otherwise the manual settings could get in the way of W3C settings. Don’t you think?

    So I have a few question for you gurus ??

    1) How do I combine images into CSS sprites? (Another yellow)
    2) If I go to https://www.chasebot.com (secured connection) it is all garbled. Is that because of minify? because over http it is just fine. https://www.chasebot.com
    3) Now that you know my settings, is there any other setting missing you would recommend?

    Many Thanks for your time,

    Thread Starter houmie

    (@houmie)

    Btw, I have managed to get minify working as well. Everything is now like it was with Apache. Why do I get those two red errors:

    Leverage browser caching
    Enable compression

    No difference in scroe. Still 57.

    Thread Starter houmie

    (@houmie)

    actually uninstalling and reinstalling it makes it work. Strange!

    I completely agree. Right now it is not possible using SSL with W3 Cache + Amazon CloudFront. We need a solution to this.

    Many Thanks,
    Houman

    Thread Starter houmie

    (@houmie)

    Dear Abinav,

    Thank you so much for your kind help. I was investigating this issue for four days without any solution.

    Thanks god, I saw your code before the moderator kindly deleted it.

    I have it now almost working

    https://venuscloud.com/crm-software/

    However for some reason the right column goes to the bottom instead.
    I don’t understand why. May you be able to have a look at the source code and enlighten me please?

    Many Thanks for your kind help,
    Regards,
    Houman

    Thread Starter houmie

    (@houmie)

    I am pretty much stuck on this and googling for two days without any clear solution to this.

    [Wed Jan 11 07:29:35 2012] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.11 with Suhosin-Patch mod_ssl/2.2.14 OpenSSL/0.9.8k configured -- resuming normal operations
    [Wed Jan 11 07:29:38 2012] [alert] [client xxxxx] /var/www/xxx/wp-content/w3tc/min/.htaccess: ExpiresActive not allowed here
    [Wed Jan 11 07:29:42 2012] [alert] [client xxxxx] /var/www/xxx/wp-content/w3tc/min/.htaccess: ExpiresActive not allowed here
    [Wed Jan 11 07:33:36 2012] [alert] [client xxxxx] /var/www/xxx/.htaccess: ExpiresActive not allowed here, referer: https://www.xxx.com/wp-admin/admin.php?page=w3tc_browsercache
    [Wed Jan 11 07:33:36 2012] [alert] [client xxxxx] /var/www/xxx/.htaccess: ExpiresActive not allowed here

    I have already sudo a2enmod expires

    The moment I insert this into the .htaccess file I get the 500 Error again:

    <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresDefault "access plus 1 hour"
    </IfModule>
Viewing 15 replies - 1 through 15 (of 16 total)