Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Issue with clientlib load order

Avatar

Level 4

Hi All, 

 

We have an issue where clientlibs included directly included in the page (using data-sly-call overriden in customheader and customfooter fragments) is loading after the clientlib included through page policy. This is for XF page. Is there a way We can include the page policy after the statically included base clientlibs. 

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

Xfpage points to a different page rendering component. I adjusted head.Html to reorder inclusion of header css and it worked

View solution in original post

4 Replies

Avatar

Community Advisor

Hi, Use defer to load policy clientlibs after the DOM load.

https://javascript.info/script-async-defer#defer



Arun Patidar

Avatar

Level 4
Can enforce the order of clientlib loading .... from page component ??

Avatar

Correct answer by
Level 4

Xfpage points to a different page rendering component. I adjusted head.Html to reorder inclusion of header css and it worked

Avatar

Administrator
Thank you for sharing the solution with AEM community


Kautuk Sahni