WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Gzip of js and css still not working (5 posts)

  1. Datajack
    Member
    Posted 2 years ago #

    I searched and searched and still I can't get the CSS and JS to GZIP encode. For example Wepagetest.org gives me this (I just put the first few lines here):

    GZIP encode all appropriate text assets: 50/100
    FAILED - (89.7 KB, compressed = 31.6 KB - savings of 58.0 KB) - http://www.mysite.com/wp-folder/wp-includes/js/jquery/jquery.js?ver=1.6.1
    FAILED - (34.3 KB, compressed = 7.0 KB - savings of 27.3 KB) - http://www.mysite.com/wp-folder/wp-content/themes/mysite/style.css
    FAILED - (15.8 KB, compressed = 5.9 KB - savings of 9.8 KB) - http://www.mysite.com/wp-folder/wp-content/plugins/fancybox-for-wordpress/fancybox/jquery.fancybox.js?ver=1.3.4
    FAILED - (9.9 KB, compressed = 2.2 KB - savings of 7.7 KB) - http://www.mysite.com/wp-folder/wp-content/plugins/fancybox-for-wordpress/fancybox/fancybox.css?ver=3.2.1
    FAILED - (9.3 KB, compressed = 4.2 KB - savings of 5.0 KB) - http://piwik.mysite.com/piwik.js
    FAILED - (6.0 KB, compressed = 1.5 KB - savings of 4.5 KB) - http://www.mysite.com/wp-folder/wp-content/plugins/sociable/css/sociable.css?ver=3.2.1

    This has been brought up many times, without being answered. The author did reply a few times with arrogance saying it works fine. Some suggestions are to make sure minify is on, and to use help on the minify page.

    First let me tell you the instructions and FAQs on this plugin are a total mess. And regarding the "help" to automatically detect the Javascripts and CSS in your theme... You might look a long time. You have to enable that function by going to "General" settings, and choosing "manual". THEN you'll see options in minify. Shouldn't the option to see advanced minimize options be, well, in the MINIMIZE page? Took a while to figure out.

    I've put all Javascript and CSS, testing the URI of all, everything is fine. Still they don't gzip.

    At the bottom of the minify settings page, it tells me this: 'Enable HTTP compression in the "Cascading Style Sheets & JavaScript" section on Browser Cache Settings tab.'
    Well thank you for that, IT IS ENABLED ALREADY. I disabled all gzip options, saved, cleared cache, re-enabled them, cleared, rinsed and repeated countless times, compression never kicks in.

    YES - Gzip compression is installed on my server. That, and all other modules required are installed.

    Also nowhere can you find an option to "combine" or not the CSS and JS. Some options to "combine only" or "combine only" before body or head, etc. Where's the option to combine? No way to say if it's on.

    Then I saw another suggestions somewhere else: To uninstall, delete and reinstall. So I proceeded to do that.

    THIS PLUGIN DOESN'T UNISTALL???
    I deactivated and deleted. Tested the site with webpagetest.org and Google Page Speed. Have the same speed as without W3 Total Cache. Strange, right? So I reinstall W3TC, and all my settings were the same as before. Settings were not removed on delete. Maybe even caching. So I reset settings.... All the manually entered JS and CSS in minify were still there.

    IMAGE CACHING and EXPIRE date.
    Just another quick thing. I searched and searched. This plugin doesn't set expiry headers correctly. Many images won't be cached. And from what I read, images that were created long before you installed this plugin won't be cached because W3TC sets the expiry relative to the image creation date, not access time. Author said option to chose the expiry method would be implemented. So someone asked a year ago"is it updated by any chance?". Author replied "Yes". Well it's not. If it is, then I didn't find it. Try to find anything in this spaghetti interface. Total mess.

    Another thing the so nicely designed documentation for this plugin doesn't tell you is which folders WT3C will set the image expire date for.... Will only work for images in the folders where you upload images in WP (not images uploaded to another folder manually).

    This plugin might increase your site performance, but it's a mess and only basic functions will work properly for most people. The author will tell you "well, try without W3TC, and without, see, it works". Yeah that's because the most basic caching function, to make static pages, works. That's what makes the biggest different and any other cache plugin will do just as well or better. Sure W3TC offers lots of functions. But they don't work really well and confuses non-tech people.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Pothi
    Member
    Posted 2 years ago #

    YES - Gzip compression is installed on my server. That, and all other modules required are installed.

    If Gzip compression is already installed on your server, your site doesn't need any plugin to enable compression of JS and CSS files.

    Check out the official Apache page to know more.

    FAILED - (9.3 KB, compressed = 4.2 KB - savings of 5.0 KB) - http://piwik.mysite.com/piwik.js

    I love piwik. But, to enable compression of piwik.js (with or without a plugin), the gzip compression need to be enabled on the sub-domain of your site via .htaccess.

    If you have access to the server configuration file, then the process is even more easier to implement (so that you don't have to write the same code on .htaccess file of each domain or sub-domain).

  3. Datajack
    Member
    Posted 2 years ago #

    The thing is with .htaccess is that W3TC writes to it. Sorting out what is has done from what it hasn't is complex. And you don't want to write duplicate or conflicting commands in .htaccess. If compressing is done automatically by the server (which is isn't), then why would W3TC propose settings for it? Just saying: WT3C can be powerful but it's a mess. Those who can really comprehend all the settings are also probably able, and better off, writing their own .htaccess file.

    Piwik is another matter, maybe shouldn't have included it in the example.

  4. Pothi
    Member
    Posted 2 years ago #

    If compressing is done automatically by the server (which is isn't), then why would W3TC propose settings for it?

    The server may have support for compression, but may not have been enabled for certain file types. So, W3TC enables compression of those file types.

  5. seriocomic
    Member
    Posted 2 years ago #

    After running W3TC successfully for over a year in Self-Hosted CDN mode, i recently switched to Amazon CloudFront CDN.

    Since then both the CSS and JS minified files are being served without GZIP compression. I understand (vaguely) that you can't control headers on files that aren't served by your own host server - but I'm sure there's a work around this?

    My site is http://www.seriocomic.com and the CDN is CNAMEd using static.seriocomic.com. Is there anything basic i'm missing?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic