We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38290
    • 712 Posts
    I've always just made sure gzip was enabled on the server.
      jpdevries
      • 38290
      • 712 Posts
      gzip compresses the files themselves and typically saves 50 to 70 percent in HTML and CSS file size. You can use site performance tools like yslow to tell you if it is enabled.
      http://www.feedthebot.com/pagespeed/enable-compression.html
        jpdevries
        • 9995
        • 1,613 Posts
          Evolution user, I like the back-end speed and simplicity smiley
          • 38290
          • 712 Posts
          Quote from: fourroses666 at Jan 08, 2014, 12:55 PM
          You can use:
          http://rtfm.modx.com/extras/revo/minifyx

          I don't think MinifyX affects the HTML Output itself other than combining and minifying CSS and JS assets.
            jpdevries
            • 9995
            • 1,613 Posts
            Ah sorry, thought you only wanted to compress your CSS/JS.
              Evolution user, I like the back-end speed and simplicity smiley
              • 2762
              • 1,198 Posts
              Don't know for Revo, but for Evolution there is a small plugin by Agel Nash: HtmlInLine
              I use it often and it works very well

              https://github.com/extras-evolution/HtmlInLine/
                Free MODx Graphic resources and Templates www.tattoocms.it
                -----------------------------------------------------

                MODx IT  www.modx.it
                -----------------------------------------------------

                bubuna.com - Web & Multimedia Design
                • 38290
                • 712 Posts
                I was thinking (this is kinda janky) you could move all your template code to chunks, and then each template would just invoke one chunk and use a output modifier that minifies the output...

                Maybe there is a better way to do it by tapping into plugin events somehow.
                  jpdevries
                  • 42562
                  • 1,145 Posts
                  I use Jade to prepare my MODX template - its output is totally minified.

                  Then [[*content:strip]] and then I bag all other outputs into a snippet/chunk - and strp that too.
                  Final view source on browser is in on one line.
                    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.
                    • 38290
                    • 712 Posts
                    Quote from: donshakespeare at Feb 19, 2016, 08:34 PM
                    I use Jade to prepare my MODX template - its output is totally minified.

                    Then [[*content:strip]] and then I bag all other outputs into a snippet/chunk - and strp that too.
                    Final view source on browser is in on one line.

                    Any tips on resources on how to use Jade to prepare MODX templates? I'm so close to 100/100 speed score!
                      jpdevries
                      • 42562
                      • 1,145 Posts
                      I reckoned it would be a one time thing - so I invested some time in the Jade logic to mimic my MODX ifs and thens.
                      I used blocks so that I could get a fairly working preview offline

                              if slider == "yes"
                                [[+slider:is=`yes`:then=`
                                .bigTitleBG.shiftMe
                                  .container 
                                     block sliderM
                                `]]
                              if h2Content == "yes"
                                [[+slider:is=`pagetitle`:then=`
                                .bigTitleBG
                                  .intros
                                    [[+neighbourNav]]


                      And since, as you know, in Jade, you don't need to close HTML tags, high speeds can be reached.
                      It was fun. And connected to SublimeText, it was cool.
                        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.