Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/220025-javascript-bootloader/
Share on other sites

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.

  • 6 years later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.