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:
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.
I don't think that's a good idea to combine the css or js manually, since each control loading different resource group.
And the browser will load the infragistics.js from the cache once user downloaded it, that same to the action of infragistics.loader.js.
I have a idea to reduce the css request. I'll refer to the both files infragistics.theme.css and infragistics.css in advance, then when I use infragistics.loader.js to load control's resource, can I avoid the css part files to be downloaded via some settings?
Yes! You understand my question correctly and I understand your answer clearly too.
So there's no any way to optimize it, I see!
Hello Loston,Thank you for your feedback. If you have any other questions related to the script and css loading do not hesitate to ask.
Hi Loston,
Actually you could modify the loader JS file to not load css by removing the css dependency from the control of interest. For example, look at the grid:
/// igGrid /// { widget: 'igGrid', dependency: [{ name: 'igUtil' }, { name: 'igDataSource' }, { name: 'igTemplating' }, { name: 'igShared' }, { name: 'igScroll'}], scripts: ['$path$/modules/infragistics.ui.grid.framework.js'], locale: ['$localePath$/infragistics.ui.grid-$locale$.js'], css: ['$path$/structure/modules/infragistics.ui.grid.css'], regional: ['$localePath$/regional/infragistics.ui.regional-$regional$.js'] },
If you remove the bold css part, then the loader will think the grid has no css to load to work. You could do this for all widgets and just load the structure/themes yourself.
regards,
David Young
Hi, AgentD5
I'will appreciate you if you add a switch in jsloader in future. I think it's a good feature.
Hello Loston,
I have sent your product idea “Add the ability to switch css location in the igLoader” directly to our product management team. Our product team chooses new product ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for this product idea is PI12090130.
If you would like to follow up on your product idea at a later point, you may contact Developer Support management via email. Please include the reference number of your product idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com