Skip to Content

How to set preload=async when sapui5 application run on launchpad

Hi,

To improve performance of sapui5 application, I want load libraries asynchronously.

How set sap-ui-preload="async" when applicatio runs on fiori launchpad .


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Aug 29, 2018 at 11:12 AM

    Hi Poonam,

    Setting the data-sap-ui-preload="async" in the script tag of index.html file should do it.


    Thanks,

    Vaibhav

    Add comment
    10|10000 characters needed characters exceeded

    • HI Vaibhav,

      index.html is called only if you run app stand alone. When app is called from fiori launcpad, index.html of application is not called.

      so can you please tell me when we run app from fiori launchpad or using component.js, how to set this paramter.

  • Jan 04 at 09:59 AM

    Hi,

    Solution is to make the lazyload true for the dependencies in the manifest.json:

    "sap.m": { "lazy":true }

    But we need to be careful because if the call is made asynchronously and the application requires the control even before the call was made then separate calls would be made by the applications for the library files, causing an increase in the number of network call.

    Regards,

    Vineet Raman

    Add comment
    10|10000 characters needed characters exceeded