What are the Best Practices for Managing Client Libraries in Adobe Experience Manager (AEM) | Community
Skip to main content
Level 2
Sep 5, 2023 9:51 AM UTC
Solved

What are the Best Practices for Managing Client Libraries in Adobe Experience Manager (AEM)

I'm working on a project in Adobe Experience Manager (AEM) and need some guidance on managing and optimizing client libraries. How do you efficiently organize and include client libraries in AEM components, and what best practices do you follow to ensure a smooth development and deployment process?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sady_Rifat
Sady_RifatAccepted solution
New Participant
Sep 5, 2023 10:14 AM UTC

Hello @aem101 ,

To manage clientlib you can follow these tips:

  • Define your component clientlib with category, exactly the definition of the component category
  • For a higher environment, build it in a minified format.
  • Load clientlib in gzip encoded format, which will reduce your file size
  • Avoid creating a large clientlib, which will be a blocker of page load.
  • Try to load the js file in defer=true attribute, this will help to load your HTML first.
  • If possible Conditional Load your clientlib [Separate it by Author/Publish]

Again for your architectural discussion, you can follow this thread:  https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/clientlibs/m-p/586477/highlight/true#M146476 

2 replies

aanchal-sikka
New Participant
Sep 5, 2023 11:21 AM UTC
Aanchal Sikka
Sady_Rifat
Sady_RifatAccepted solution
New Participant
Sep 5, 2023 10:14 AM UTC

Hello @aem101 ,

To manage clientlib you can follow these tips:

  • Define your component clientlib with category, exactly the definition of the component category
  • For a higher environment, build it in a minified format.
  • Load clientlib in gzip encoded format, which will reduce your file size
  • Avoid creating a large clientlib, which will be a blocker of page load.
  • Try to load the js file in defer=true attribute, this will help to load your HTML first.
  • If possible Conditional Load your clientlib [Separate it by Author/Publish]

Again for your architectural discussion, you can follow this thread:  https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/clientlibs/m-p/586477/highlight/true#M146476 

Translate