Q. related to cq:ClientLibraryFolder node | Community
Skip to main content
JakeCham
Level 6
January 5, 2024
Solved

Q. related to cq:ClientLibraryFolder node

  • January 5, 2024
  • 2 replies
  • 716 views

In a non-optimized website, the final HTML generated for a typical page by publish instance includes a relatively large number of <script> elements that refer to other script files loaded from AEM environment. The developer wants to minimize these network calls by combining all required client library code into a single file to reduce the number of back-and-forth requests on page load.
Which step should a developer take to solve this issue?

 

A. Embed the required libraries into an app-specific client library using the allowProxy property of the cq:ClientLibraryFolder node

B. Add the categories property of the cq:ClientLibraryFoider node into an app-specific client library folder

C. Embed the required libraries into an app-specific client library using the dependencies property of the cq:ClientLibraryFolder node

D. Embed the required libraries into an app-specific client library using the embed property of the cq:ClientLibraryFolder node

 

Ans should be D ?

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 JagarlamudiVe

Hello @jakecham 

 

Yes the correct Ans is,

 D. Embed the required libraries into an app-specific client library using the embed property of the cq:ClientLibraryFolder node

2 replies

JagarlamudiVeAccepted solution
Level 4
January 5, 2024

Hello @jakecham 

 

Yes the correct Ans is,

 D. Embed the required libraries into an app-specific client library using the embed property of the cq:ClientLibraryFolder node

Raja_Reddy
Community Advisor
Community Advisor
January 5, 2024

Hi @jakecham 
The correct answer is : C
c.Embed the required libraries into an app-specific client library using the dependencies property of the cq:ClientLibraryFolder node

The dependencies property in the cq:ClientLibraryFolder node allows you to specify dependencies on other client libraries. By using this property, you can ensure that the required libraries are included in the final client library, combining them into a single file. This helps in reducing the number of network calls and improving the performance of the website.


Thanks.