Issue with clientlib load order | Community
Skip to main content
Adilmo
Level 4
March 9, 2021
Solved

Issue with clientlib load order

  • March 9, 2021
  • 2 replies
  • 1599 views

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. 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Adilmo

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

2 replies

arunpatidar
Community Advisor
Community Advisor
March 9, 2021

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

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

Arun Patidar
Adilmo
AdilmoAuthor
Level 4
March 10, 2021
Can enforce the order of clientlib loading .... from page component ??
Adilmo
AdilmoAuthorAccepted solution
Level 4
March 12, 2021

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

kautuk_sahni
Community Manager
Community Manager
March 15, 2021
Thank you for sharing the solution with AEM community
Kautuk Sahni