Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 2.77 KB

Standard_Variant_for_Bootstrapping_91f1f45.md

File metadata and controls

43 lines (27 loc) · 2.77 KB
loio
91f1f4536f4d1014b6dd926db0e91070

Standard Variant for Bootstrapping

The standard variant for bootstrapping loads all JavaScript modules of a library in advance with one single request for performance reasons.

The library preload file library-preload.js contains all modules of a certain library. These modules will only be executed on demand, if the application requires them. Using preloads significantly reduces the number of roundtrips since the single modules are bundled in one file.

Note:

An application must not reference the library-preload.js. If preload files exist, OpenUI5 automatically loads them. The dependencies to libraries are defined as part of the manifest namespace sap.ui5/dependencies/libs. For further information, see Manifest (Descriptor for Applications, Components, and Libraries).

By setting the async=true configuration parameter, the module loader loads the modules and preload files asynchronously. You can enable it in an existing application by specifying the sap-ui-async configuration parameter in the start URL, or by adding the data-sap-ui-async attribute to the bootstrap tag:

<script
    id="sap-ui-bootstrap"
    src="resources/sap-ui-core.js"
    data-sap-ui-async="true"
    data-sap-ui-on-init="module:my/app/main"
    data-sap-ui-resource-roots='{"my.app": "./"}'
></script>

Note:

Before you use the async configuration parameter, make sure your app is ready for asynchronous loading, see Best Practices for Loading Modules and Is Your Application Ready for Asynchronous Loading?.

Related Information

noJQuery Variant for Bootstrapping

Configuration of the OpenUI5 Runtime

Is Your Application Ready for Asynchronous Loading?