WordPress.org

Support

Support » Plugins and Hacks » W3 Total Cache » [Plugin: W3 Total Cache] Minify-CSS does not compress redundant white space?

[Plugin: W3 Total Cache] Minify-CSS does not compress redundant white space?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Frederick Townes

    @fredericktownes

    You haven’t enabled line break removal, seems combine only is selected.

    Thanks, I made those changes.

    “Google page-speed” score is still low (red) – it seems that the issue is spaces and tabs that are not compressed rather than just line breaks.

    Basically, any string mixing spaces and tabs can be compressed to a single space. Tabs should not be treated separately from spaces – something like <SP><TB><SP> should become <SP>

    Is there a way to cause compression of redundant spaces and tabs?

    Thanks

    P.S. You can look at the UPDATED minified CSS file
    http://www.porticor.com/wp-content/w3tc/min/b82dd9/default.include.1925601153.css

    Plugin Author Frederick Townes

    @fredericktownes

    I get the point, the problem is I’ve never seen this fail, even after reviewing hundreds and hundreds of sites. What is special about your files? How are your line feeds set?

    Frederick,

    I am sending you an email with

    1. the original CSS
    2. CSS after w3tc minify
    3. CSS after pagespeed minify (they have a capability to do this in Google)

    As you can see, (1) is pretty regular except it uses tabs a lot. You can check for yourself – and also see how \r and \n are used

    (2) does not compress combinations of \n and \t (and perhaps \r) into a single space <SP> but rather into several characters

    As a result (3) is smaller and Google Page Speed gives a low score

    Hope this helps

    More input:

    I think you are treating tabs \t as “different” from spaces <SP> and line feeds/carriage returns.

    The upshot is that combinations of line feeds and tabs (text\n\tmoretext) are not handled perfectly. The line feeds and carriage returns are turned into spaces, and the result is “text<SP>\tmoretext”

    It may also be an ordering problem, perhaps compression happens before line feeds are turned to spaces?

    In any case, I sent you the original and compressed files, so you should be able to run the W3TC algorithm on them. As I see it, the goal is to achieve the same compression as pagespeed minify (3) – so you can benchmark against that if you like.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: W3 Total Cache] Minify-CSS does not compress redundant white space?’ is closed to new replies.
Skip to toolbar