Question
4
Replies
69
Views
Accenture
Posted: June 1, 2018
Last activity: June 8, 2018
Closed
How to load a control as a backend process on UI which has huge js file
Hi,
I have a control which will load js file internally and it is a huge js file and will take 2 to 3 mins to load. as the js file is taking too much time to load, it is stopping other pega components on UI to respond until that control loads completely.
It would be very helpful if any solution to run control content backend without impacting current page.
Hi,
As JS runs on a single thread so it is obvious that you will see the UI blocked until and uless the JS is not parsed completely.
You can use the saync tag so that it wont interrupt the DOM generation.<script src="example.js" async></script>
Also try to keep the JS call in last of your DOM (if possible ).
Hooe this helps/solves your issue.
Regards,
Vikash