3 Replies Latest reply on Sep 28, 2012 7:11 AM by biosopher

    Widget.js is 7.7MB!  Why is it included?

    biosopher Level 1

      I have a very basic app which hasn't been changed much from the default "New App" and yet when I save my web pages, I'm seeing a 7MB file called widget.js.  Obviously I can't expect customers to download this so why does it show in my saved files now?  Is that because I have the full design/editing functionality saved as well?


      I.e. it won't be included in my final website?

        • 1. Re: Widget.js is 7.7MB!  Why is it included?
          kasq Level 3



          widgets.js file is used only in the edit mode in auhor CQ instance, so if you save your page in this mode, probably it was downloaded also. If you want to see if this file will not be included to the final publish version ofv your website, please try start publish instance of CQ, then activate your website from author to publish and then try to save one page on your local PC and you will see that this file won't be downloaded with all other sources like css,js and final html for a page.


          Another thing is that inside of jsp's which are into your app, please do not include cq client library like bellow :


          <cq:includeClientLib categories="cq.wcm.edit"/>


          becuase in other case all widgets used by foundation compnents will be collected to one widgtes.js file and added to your website.




          • 2. Re: Widget.js is 7.7MB!  Why is it included?
            todd.haser Level 2

            This file is all of the ExtJS and related items that allow content authors

            to interact with the authoring environment.  By default, this will not be

            included in Publish.  However, if you customize any of your components,

            extend the ExtJS, etc. make sure to add runMode check for Author vs.

            Publish.  Otherwise, you will end up including  this file in your Publish






            • 3. Re: Widget.js is 7.7MB!  Why is it included?
              biosopher Level 1

              Thanks Todd and Kasq.  That's what I thought was happening but wanted to ensure I understood correctly.


              I'll look into the runMode check.