Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
605
infragistics.js or infragistics.loader.js, a difficult decision!
posted

infragistics.js combined all controls js, it's too huge, over 2M even minified. 

infragistics.loader.js is lightweight, it will raise more http request. Look the grid control which is the most commonly used in out application.

Almost 20 request raised.

Code:

$.ig.loader({
scriptPath: '/gaia/Scripts/',
cssPath: '/gaia/Content/',
resources: 'igGrid.Paging,igGrid.Resizing,igGrid.Updating',
locale: 'zh-CN',
regional: 'zh-CN'
}); 
Parents
No Data
Reply
  • 23953
    Suggested Answer
    Offline posted

    Hi,

    My advise is to stick with the loader, because the files will be initially cached in the browser cache and for the subsequent page visits the files will be loaded from the browser cache so there will be no http requests.

    As an alternative you can examine the files requested by the loader and then combine them in one file(one for JavaScript code and one for the Style sheets), but you have to be careful to order them correctly in the file because there are dependencies between features. Then use your custom generated file in the production page. The drawback is that you have to create such file on each Volume release/Service release from Infragistics, so it will be best to incorporate this in your build procedure.

     

    Best regards,

    Martin Pavlov

    Infragistics, Inc.

Children