Skuid’s feature to automatically include JS & CSS (see ) is extremely beneficial. That said, it comes with some challenges when using features such as Page Includes as, unfortunately, not all javascript, jQuery, etc. is written to properly handle multiple “loads.” Also, browsers like Chrome, etc. have some hidden “tricks” when loading a file multiple times and gaining access to the source in the debug console is not terribly obvious (e.g. Chrome creates VM#### files for secondary copies of js, etc.). On top of all that, there is a slight performance hit that is unnecessary to incur.
In our particular case, we use multiple third-party libraries that track state and when getting reloaded, lose their state or end up having multiple objects all tracking the same things (e.g mutation events). Note that we’re concat’ing all of these libraries in to a single JS file.
One solution would be to modify all these libraries to “ifdef” around the loading - not ideal because as new versions come out, customization’s are required each time to the library.
Would like to see a property added to components (eg. Page Includes) that could result in JS/CSS getting automatically loaded that would instruct skuid to not auto-load JS & CSS files.
As always, thanks for considering!