We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50923
    • 137 Posts
    I have created a simple HTML Minify for Revo, if someone need, please take a look, to see your remarks and updates, txanks

    https://github.com/play2web/HTML2Minify

    HTML2Minify

    HTML2Minify is a plugin for MODX Revo 2.2.xxx that compresses the HTML output to reduce file size and improve performance. It's forked from a script by DVS.

    Getting started with HTML2Minify is as simple as installing a plugin:

    Create new Template Variable called Minify with options
    Listbox (Single-Select)
    Input Option Values: Yes==1||No==0
    Default value : 1
    Assign Minify Template Variable to your desired Template in Template Access tab
    And that's it, you're done. Nice work! Now in every Resources you will have Minify TV to disable or enable HTML minify output

    It's recommended that you also install the GitHub Updater plugin to get automattic updates.
    Known Issues

    It's been reported that sometime inline Javascript is break, just put your Javascript code in external file.



      <a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>
      • 42562
      • 1,145 Posts
      ... just put your Javascript code in external file.
      hahahaha!

      Maybe you can add a regex script to strip all comments, i.e, from double back slash to end of line.
      from // to \n|\r or something like that

      Inline comments are notorious for breaking HTML/JS minification.

      I am just saying that your plugin is a great idea but it might not be convenient for users to put their JS in external file. They might strip the comments themselves though, if this indeed is the cause of issue.

      Cheers
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 50923
        • 137 Posts
        Quote from: donshakespeare at Jun 04, 2016, 11:55 AM
        ... just put your Javascript code in external file.
        hahahaha!

        Maybe you can add a regex script to strip all comments, i.e, from double back slash to end of line.
        from // to \n|\r or something like that

        Inline comments are notorious for breaking HTML/JS minification.

        I am just saying that your plugin is a great idea but it might not be convenient for users to put their JS in external file. They might strip the comments themselves though, if this indeed is the cause of issue.

        Cheers

        This is beta verion, all remarks and sugestion are welcome ;0
          <a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>