WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: W3 Total Cache] GZIP without combing CSS / JS in W3TC (4 posts)

  1. remotay
    Member
    Posted 4 years ago #

    W3TC does a great job minifying, combining and Gzipping files but a lot of my JS and CSS files (10+) cannot be combined. When I combine them, the code on the page breaks. Since I can't combine them, I can't let W3TC gZip them, so they get served without any compression.

    Is there a way for W3TC to gzip all my CSS / JS files without also combining them? If not, this would be an excellent new feature that I'd imagine would only require a little bit of tweaking to achieve.

    I'm scared to edit my .htaccess and add my own gzip rules to them, because it may conflict with W3TC rules, and since W3TC already gzips SOME of my files, adding a general gzip to all css / js may screw things up.

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

  2. Frederick Townes
    Member
    Posted 4 years ago #

    Is there a way for W3TC to gzip all my CSS / JS files without also combining them?

    No.

    If not, this would be an excellent new feature that I'd imagine would only require a little bit of tweaking to achieve.

    As far as performance wins are concerned, that feature really isn't too practical, but I'll consider it.

    Things still don't work when you use the "only combine (header)" or "only combine (footer) options (with other checkboxes unchecked)? This just puts the files together, without changing them (and the obviously compresses them). In general I've only see 1 or 2 cases (usually galleries) that don't work even with "only combine," so you may have some dependency issues you're not properly handling.

    I'm scared to edit my .htaccess and add my own gzip rules to them, because it may conflict with W3TC rules, and since W3TC already gzips SOME of my files, adding a general gzip to all css / js may screw things up.

    You can do it, should be fine.

  3. remotay
    Member
    Posted 4 years ago #

    Thanks for the info.

    I tried 'Only combine' with other options unchecked. Right now I have 10 JS files that cannot be combined. Nextgen Gallery makes up like 4 JS files and Featured Content Gallery makes up another 4. Plus 1 PostTabs JS (Some plugin). None of these combine nicely.

    Plus NextGen Gallery and Featured content gallery have a few CSS files each as well which don't combine nicely.

    Both Nextgen Gallery and Featured Content Gallery are enormously popular plugins. Just being able to pull these files and gzip them would certainly make things faster. I'll try and achieve this through htaccess though.

  4. Frederick Townes
    Member
    Posted 4 years ago #

    Unfortunately, I cannot go case by case through each plugin and modify best practices to compensate for "interesting" programming practices some developers take. I would encourage you to open support tickets with each of those plugin developers and ask them instead why their code cannot be minified or even combined (which should always be a fine worst case).

    Again, galleries for reasons you can now see as well as dynamically generated or packed scripts have issues being combined, which is a very simple operation. If you enable, deflate / gzip on your server it's possible you will still have errors as that compression is likely an issue for those scripts as well.

Topic Closed

This topic has been closed to new replies.

About this Topic