cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

UI5 Components: Component-preload.js

js2
Product and Topic Expert
Product and Topic Expert
0 Likes
17,480

When using Components in UI5 apps I can see a stray GET request each time the application is loaded looking for Component-preload.js in the app directory.

There is a little bit of explanation on preloading in the SDK help (but not much). From what I can gather: library pre-loading is something thats only applicable to the SAP-provided UI5 libraries. Our own code can't execute till the UI5 libraries are loaded anyway

I've tried setting data-sap-ui-preload="async" (sync is the default); but then UI5 won't load. Interestingly if I set sap-ui-preload=auto as a url query string parameter; the app seems to load normally (sync) and there is no stray GET on the Component-preload.js file.

Does anyone have any further information on pre-loading and why there is a GET request on this file and the best way to stop it.

If you also know how to stop all the message bundle GET's that would be interesting to know as well.   😉

View Entire Topic
kammaje_cis
SAP Mentor
SAP Mentor

I too have the same issue.

      Documentation/ReleaseNotes – SAPUI5 Wiki (TIP CORE User Interface)   

Here there is a mention about fixing Component-preload.js Since the component control itself is in development (as per documentation) we may see more changes.

js2
Product and Topic Expert
Product and Topic Expert
0 Likes

Thanks for pointing out the release notes. I can see that in the November release of 1.16.5 it states: "[FIX] Avoid Component preload when Component has been loaded already". I'm testing on the latest 1.16.8 though and still see the requests.

I understand that the component model is marked as experimental; but these have been there since 1.9.2. Actually allot of the "good stuff" in UI5 is marked as "experimental".

😉