We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    I have always been fond of lightweight, high speed loading pages, even if most people have a fast DSL connection there is something to be said for bandwith saving and optimized web pages.

    AJAX libraieries are nice, but kind of heavy (135 kb of script...).

    /manager/media/script/scriptaculous/prototype.js 46 kb
    /manager/media/script/scriptaculous/effects.js 30 kb
    /manager/media/script/scriptaculous/controls.js 25 kb
    /manager/media/script/scriptaculous/dragdrop.js 18 kb
    /manager/media/script/scriptaculous/slider.js 11 kb
    /manager/media/script/scriptaculous/builder.js 3 kb
    /manager/media/script/scriptaculous/scriptaculous.js 2 kb

    My question is, are all those scripts necessary ? Given the templates I build don’t use those librairies, aside from QuikEdit, what does use them ? Is there a way to load only necessary scripts ?

    Thanks !
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 32982
      • 674 Posts
      for me is a good way to edit the backend like the old times whithout the menu.
      it for me give more customization to the editing for my clients. anyone know how to do?
        Jabiertxof (formerly XYZVISUAL)
        My bussines: http://marker.es
        https://www.youtube.com/user/jabiertxof/videos
        • 6726
        • 7,075 Posts
        Not sure I get what you mean...

        Anyway, I was certainly not talking about the backend but the frontend aspect of things...
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 25663 MODX Staff
          • 12,272 Posts
          Prototype and scriptaculous are the only ones loaded unless the others a needed (they load on demand). They should also be cached after the first load. It’s a tradeoff I guess. :/
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 1764
            • 680 Posts
            Most of them are needed anyway. But of course these only get included in the frontend for logged in manager users. So there’s no added overhead for the common visitor or web users.

            NEEDED /manager/media/script/scriptaculous/prototype.js 46 kb
            NEEDED /manager/media/script/scriptaculous/effects.js 30 kb
            NOT NEEDED /manager/media/script/scriptaculous/controls.js 25 kb
            NEEDED /manager/media/script/scriptaculous/dragdrop.js 18 kb
            NOT NEEDED /manager/media/script/scriptaculous/slider.js 11 kb
            NOT SURE /manager/media/script/scriptaculous/builder.js 3 kb
            NEEDED /manager/media/script/scriptaculous/scriptaculous.js 2 kb
              • 6726
              • 7,075 Posts
              Quote from: rthrash at Jan 04, 2006, 07:51 AM
              Prototype and scriptaculous are the only ones loaded unless the others a needed (they load on demand). They should also be cached after the first load. It’s a tradeoff I guess. :/

              Not a bad tradeoff, of course!

              I just realized this when I started testing with websiteoptimization

              I suspected it got cached, good to have confirmation smiley

              Quote from: aNoble at Jan 04, 2006, 07:52 AM
              Most of them are needed anyway. But of course these only get included in the frontend for logged in manager users. So there’s no added overhead for the common visitor or web users.

              Thanks a lot for the clarification Adam !
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l'outil id
                • 32963
                • 1,732 Posts
                When compressed you get around half the size of the original source files.

                I just use a js packager to compress them.

                http://dean.edwards.name/packer/
                http://dean.edwards.name/download/#packer
                  xWisdom
                  www.xwisdomhtml.com
                  The fear of the Lord is the beginning of wisdom:
                  MODx Co-Founder - Create and do more with less.
                  • 25663 MODX Staff
                  • 12,272 Posts
                  That’s a great idea Raymond! laugh
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 6726
                    • 7,075 Posts
                    This is a really cool tip ! Thanks a LOT !

                    Dean Edwards is known for IE7, but this one is nice as well...

                    Quote from: xwisdom at Jan 04, 2006, 04:03 PM

                    When compressed you get around half the size of the original source files.

                    I just use a js packager to compress them.

                    http://dean.edwards.name/packer/
                    http://dean.edwards.name/download/#packer
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l'outil id
                      • 14431
                      • 65 Posts
                      Sorry about digging up this old topic, but I guess that’s what "search" is for.
                      Do I understand correctly that the Prototype and Scriptaculous libraryies, as packaged with MODx are required for it to function properly?
                      I had in mind to use a different library, but not if it has to be "in addition to" rather than "instead of".
                      And what about upgrades... prototype 1.5 official just came out.
                      Thanks,
                      joe

                      Quote from: aNoble at Jan 04, 2006, 07:52 AM

                      Most of them are needed anyway. But of course these only get included in the frontend for logged in manager users. So there’s no added overhead for the common visitor or web users.

                      NEEDED /manager/media/script/scriptaculous/prototype.js 46 kb
                      NEEDED /manager/media/script/scriptaculous/effects.js 30 kb
                      NOT NEEDED /manager/media/script/scriptaculous/controls.js 25 kb
                      NEEDED /manager/media/script/scriptaculous/dragdrop.js 18 kb
                      NOT NEEDED /manager/media/script/scriptaculous/slider.js 11 kb
                      NOT SURE /manager/media/script/scriptaculous/builder.js 3 kb
                      NEEDED /manager/media/script/scriptaculous/scriptaculous.js 2 kb