Most Efficient Multipage RequireJS and Almond setup

后端 未结 5 849
花落未央
花落未央 2020-12-07 09:55

I have multiple pages on a site using RequireJS, and most pages have unique functionality. All of them share a host of common modules (jQuery, Backbone, and more); all of th

5条回答
  •  有刺的猬
    2020-12-07 10:59

    I prefer to use option 3,and i can surely tell you that why is that.

    1. It's the most logical.
    2. It utilizes the most caching, all common functionality is loaded once. Taking the least traffic and generating the fastest loading times when surfing multiple pages. Loading times of multiple pages are important and while the traffic on your side might not be significant compared to other resources you're loading, the clients will really appreciate the faster load times.

    I have listed much better options for the same.

提交回复
热议问题