Loading ...
Sorry, an error occurred while loading the content.

Re[ydn-javascript] ducing number of http requests

Expand Messages
  • vinay12
    One of the first advice by yahoo performance improvement guidelines is to reduce the number of http requests. In our web page we are using YUI library and have
    Message 1 of 4 , May 29, 2009
    • 0 Attachment
      One of the first advice by yahoo performance improvement guidelines is to
      reduce the number of http requests. In our web page we are using YUI library
      and have included some of their scripts and css files.

      Our page includes 24 java scripts files and out of that 8 are from yui . I
      am not sure how can we reduce the number of requests in this case. If we
      combine the files, we lose modularity and maintainability.
      Yahoo had suggested use of http://developer.yahoo.com/yui/articles/hosting/
      YUI configurator
      We have included all the files from YUI library into our application. I am
      trying to use YUI configurator with local paths but is not working. App is
      not able to load the files.

      Any idea how can this be done ? Or how to reduce the number of http
      requests ?
      --
      View this message in context: http://www.nabble.com/Reducing-number-of-http-requests-tp23785333p23785333.html
      Sent from the ydn-javascript mailing list archive at Nabble.com.
    • Eric Miraglia
      vinay12, Combining the files via the CDN is a good way to go, and if you keep your own implementation code separate from the YUI files this should provide good
      Message 2 of 4 , May 29, 2009
      • 0 Attachment
        vinay12,

        Combining the files via the CDN is a good way to go, and if you keep your own implementation code separate from the YUI files this should provide good maintainability over time.

        If you want true modularity, where modules on the page track only their own dependencies and work irrespective of what other content may be on the page, then you may want to look at using YUI Loader in your own code and using YUI Loader, Dom and Event as your "core" YUI package on every page.  Each module, in that case, will use loader to bring in its YUI dependencies before running your own dependent code, and those dependencies will come in as combo-handled JS and CSS files.  This tends to be a performant and maintainable approach.

        This article may be of interest with respect to thinking through your options:


        -Eric


        On May 29, 2009, at 11:53 AM, vinay12 wrote:


        One of the first advice by yahoo performance improvement guidelines is to
        reduce the number of http requests. In our web page we are using YUI library
        and have included some of their scripts and css files.

        Our page includes 24 java scripts files and out of that 8 are from yui . I
        am not sure how can we reduce the number of requests in this case. If we
        combine the files, we lose modularity and maintainability.
        Yahoo had suggested use of http://developer. yahoo.com/ yui/articles/ hosting/
        YUI configurator
        We have included all the files from YUI library into our application. I am
        trying to use YUI configurator with local paths but is not working. App is
        not able to load the files.

        Any idea how can this be done ? Or how to reduce the number of http
        requests ?
        --
        View this message in context: http://www.nabble. com/Reducing- number-of- http-requests- tp23785333p23785 333.html
        Sent from the ydn-javascript mailing list archive at Nabble.com.


      • vinay12
        Hi Eric Thanks for pointing to the post. My initial question is still un answered. I have downloaded the yui library and it is the part of my build. Currently
        Message 3 of 4 , Jun 1, 2009
        • 0 Attachment
          Hi Eric
          Thanks for pointing to the post. My initial question is still un answered.

          I have downloaded the yui library and it is the part of my build. Currently
          there are referenced as below (showing only 2 files)

          <script type="text/javascript" src="<c:url
          value="/scripts/lib/yui/yui_v2_51/build/yahoo-dom-event/yahoo-dom-event.js"/>"></script>
          <script type="text/javascript" src="<c:url
          value="/scripts/lib/yui/yui_v2_51/build/dragdrop/dragdrop-min.js"/>"></script>

          Now using YUI CDN , I can combine two files as below

          <script type="text/javascript"
          src="http://yui.yahooapis.com/combo?2.7.0/build/yuiloader/yuiloader-min.js"></script>

          But I do not want to fetch the files from http://yui.yahooapis.com every
          time the pages are loaded

          My question is can I combine the local files using combo? the was same way
          YUI CDN is doing ?

          Vinay


          Eric Miraglia wrote:
          >
          > vinay12,
          >
          > Combining the files via the CDN is a good way to go, and if you keep
          > your own implementation code separate from the YUI files this should
          > provide good maintainability over time.
          >
          > If you want true modularity, where modules on the page track only
          > their own dependencies and work irrespective of what other content may
          > be on the page, then you may want to look at using YUI Loader in your
          > own code and using YUI Loader, Dom and Event as your "core" YUI
          > package on every page. Each module, in that case, will use loader to
          > bring in its YUI dependencies before running your own dependent code,
          > and those dependencies will come in as combo-handled JS and CSS
          > files. This tends to be a performant and maintainable approach.
          >
          > This article may be of interest with respect to thinking through your
          > options:
          >
          > http://yuiblog.com/blog/2008/10/17/loading-yui/
          >
          > -Eric
          >
          >
          > On May 29, 2009, at 11:53 AM, vinay12 wrote:
          >
          >>
          >>
          >>
          >> One of the first advice by yahoo performance improvement guidelines
          >> is to
          >> reduce the number of http requests. In our web page we are using YUI
          >> library
          >> and have included some of their scripts and css files.
          >>
          >> Our page includes 24 java scripts files and out of that 8 are from
          >> yui . I
          >> am not sure how can we reduce the number of requests in this case.
          >> If we
          >> combine the files, we lose modularity and maintainability.
          >> Yahoo had suggested use of
          >> http://developer.yahoo.com/yui/articles/hosting/
          >> YUI configurator
          >> We have included all the files from YUI library into our
          >> application. I am
          >> trying to use YUI configurator with local paths but is not working.
          >> App is
          >> not able to load the files.
          >>
          >> Any idea how can this be done ? Or how to reduce the number of http
          >> requests ?
          >> --
          >> View this message in context:
          >> http://www.nabble.com/Reducing-number-of-http-requests-tp23785333p23785333.html
          >> Sent from the ydn-javascript mailing list archive at Nabble.com.
          >>
          >>
          >
          >
          >

          --
          View this message in context: http://www.nabble.com/Reducing-number-of-http-requests-tp23785333p23816891.html
          Sent from the ydn-javascript mailing list archive at Nabble.com.
        • Satyam
          The combos are handled by software residing on the server. I heard there are plans to eventually release them to serve YUI3 files (that s the forum where I
          Message 4 of 4 , Jun 1, 2009
          • 0 Attachment
            The combos are handled by software residing on the server. I heard
            there are plans to eventually release them to serve YUI3 files (that's
            the forum where I read it, it doesn't mean they could not possibly serve
            YUI2 files in a similar way.

            When you are downloading from yahooapis you are not simply loading from
            some server in California but from a server close to you, I think they
            use Akamai and unless you are within a corporate intranet, your users
            might be better served by Akamai than by yourself, in fact, you are
            using the same servers YAHOO itself uses to load the YUI files they use
            themselves.

            Satyam


            vinay12 escribió:
            > Hi Eric
            > Thanks for pointing to the post. My initial question is still un answered.
            >
            > I have downloaded the yui library and it is the part of my build. Currently
            > there are referenced as below (showing only 2 files)
            >
            > <script type="text/javascript" src="<c:url
            > value="/scripts/lib/yui/yui_v2_51/build/yahoo-dom-event/yahoo-dom-event.js"/>"></script>
            > <script type="text/javascript" src="<c:url
            > value="/scripts/lib/yui/yui_v2_51/build/dragdrop/dragdrop-min.js"/>"></script>
            >
            > Now using YUI CDN , I can combine two files as below
            >
            > <script type="text/javascript"
            > src="http://yui.yahooapis.com/combo?2.7.0/build/yuiloader/yuiloader-min.js"></script>
            >
            > But I do not want to fetch the files from http://yui.yahooapis.com every
            > time the pages are loaded
            >
            > My question is can I combine the local files using combo? the was same way
            > YUI CDN is doing ?
            >
            > Vinay
            >
            >
            > Eric Miraglia wrote:
            >
            >> vinay12,
            >>
            >> Combining the files via the CDN is a good way to go, and if you keep
            >> your own implementation code separate from the YUI files this should
            >> provide good maintainability over time.
            >>
            >> If you want true modularity, where modules on the page track only
            >> their own dependencies and work irrespective of what other content may
            >> be on the page, then you may want to look at using YUI Loader in your
            >> own code and using YUI Loader, Dom and Event as your "core" YUI
            >> package on every page. Each module, in that case, will use loader to
            >> bring in its YUI dependencies before running your own dependent code,
            >> and those dependencies will come in as combo-handled JS and CSS
            >> files. This tends to be a performant and maintainable approach.
            >>
            >> This article may be of interest with respect to thinking through your
            >> options:
            >>
            >> http://yuiblog.com/blog/2008/10/17/loading-yui/
            >>
            >> -Eric
            >>
            >>
            >> On May 29, 2009, at 11:53 AM, vinay12 wrote:
            >>
            >>
            >>>
            >>> One of the first advice by yahoo performance improvement guidelines
            >>> is to
            >>> reduce the number of http requests. In our web page we are using YUI
            >>> library
            >>> and have included some of their scripts and css files.
            >>>
            >>> Our page includes 24 java scripts files and out of that 8 are from
            >>> yui . I
            >>> am not sure how can we reduce the number of requests in this case.
            >>> If we
            >>> combine the files, we lose modularity and maintainability.
            >>> Yahoo had suggested use of
            >>> http://developer.yahoo.com/yui/articles/hosting/
            >>> YUI configurator
            >>> We have included all the files from YUI library into our
            >>> application. I am
            >>> trying to use YUI configurator with local paths but is not working.
            >>> App is
            >>> not able to load the files.
            >>>
            >>> Any idea how can this be done ? Or how to reduce the number of http
            >>> requests ?
            >>> --
            >>> View this message in context:
            >>> http://www.nabble.com/Reducing-number-of-http-requests-tp23785333p23785333.html
            >>> Sent from the ydn-javascript mailing list archive at Nabble.com.
            >>>
            >>>
            >>>
            >>
            >>
            >
            >
            > ------------------------------------------------------------------------
            >
            >
            > No virus found in this incoming message.
            > Checked by AVG - www.avg.com
            > Version: 8.5.339 / Virus Database: 270.12.48/2148 - Release Date: 06/01/09 06:09:00
            >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.