WordPress.org

Forums

bodi0`s Easy cache
[resolved] Minify Expectations (3 posts)

  1. jkunkel
    Member
    Posted 1 year ago #

    I might have the wrong expectation, but when I view the source of a cached page, it doesn't look like the HTML has been "minified" at all. I could be wrong, but I see blank lines, extra spaces, etc. Is this expected or should I be getting more?

    Thanks.

    https://wordpress.org/plugins/bodi0s-easy-cache/

  2. Budiony Damyanov
    Member
    Plugin Author

    Posted 1 year ago #

    Not all blank lines and extra spaces are minified and this is on purpose.

    In fact, there could be more compression applied to the HTML source, but this breaks the inline *JavaScript* code and *CSS*.

    Put in short - the plugin replace the following combinations
    "\t","\r","\t\r","\r\t" from the white-space range.

  3. Budiony Damyanov
    Member
    Plugin Author

    Posted 1 year ago #

    ...and it replaces with regular expressions the more that one space with one only (this is the regex pattern preg_replace('~(\s)\1+~', '$1', $buffer);).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • bodi0`s Easy cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.