Akay Akay - 1 month ago 9
Javascript Question

What is a "Javascript Bootloader"?

I have seen this mainly in the source of Facebook

Bootloader.setResourceMap({"bMxb7":{"name":....
What is exactly a bootloader in javascript? What is its use and purpose?

Answer

Generally speaking, the bootloader is a (relatively) small amount of code responsible for establishing the environment that all subsequent code requires to run, as such it is also the the first code to be executed. It's usually restricted to OSes, but makes sense for FB too.

In the case of Facebook, the bootloader will do things like loading additional JS files and other resources that the library needs in addition to the single public <script /> the developer included in the document.

Comments