ohdang888 Posted November 28, 2010 Share Posted November 28, 2010 So i've built a javascript bootloader to dynamically load JS files as they are needed and to call a loaded function after the load is complete. I've read facebook does this, and it has dramatically sped up their pages b/c they only load the exact JS they need. I guess you havta be using like 500 KB of JS for this to be useful, but it seems like it could to useful to smaller sites as well, seeing as though my bootloader script is only 900 Bytes. Thoughts? Quote Link to comment Share on other sites More sharing options...
trq Posted November 28, 2010 Share Posted November 28, 2010 I used to use dynamically loading js, but it ended up being allot more efficient to put all js into one file and the minify it. Its the actual http requests to multiple files that hurts more than size. Of course it would also depend on what sizes where talking about. Loading a 50k-80k file just to use one function etc etc. Quote Link to comment Share on other sites More sharing options...
dreamwest Posted November 28, 2010 Share Posted November 28, 2010 waste of time bootloading js, just gzip it a 40kb js file will reduce to 4kb or less...its like some kinda voodoo magic Quote Link to comment Share on other sites More sharing options...
lalittanwar Posted December 2, 2016 Share Posted December 2, 2016 Try this https://lnt.gitbooks.io/spamjs/content/project_structure.html bootloader implementation Quote Link to comment Share on other sites More sharing options...
Barand Posted December 2, 2016 Share Posted December 2, 2016 Don't resurrect 6 year old posts Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.