Combing(embed) Client Libs During run time(On Page Load) using Html Library Manager? | Community
Skip to main content
Level 2
Jul 21, 2020 3:54 PM UTC

Combing(embed) Client Libs During run time(On Page Load) using Html Library Manager?

Hi Every one,

One challenging problem to solve :  

I have a page that loads the component categories and the related dependencies on page load. Is it possible to embed all the related dependencies & Categories into a single request for defined components (defined via page properties)

Ex:

Component A -> Category A.css, Dependency = [C.css, E.css]
Component B-> Category  B.css, Dependency = [D.css, C.css]
 
Is there any way if we pass A and B to htmllibraryManger to merge(categories and dependencies) all and return a single request(A+B+C+D+E ) on page load. How the merge can be done without adding embed node property in AEM? (no duplicates files/code after the merge)
 
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Vaibhavi_J
Level 7
Jul 22, 2020 4:10 AM UTC

Hi @vasudevaraogu , 

It is good to implement  on web server. You can use mod_deflate module on apache to achieve the same. 

Please check the  below thread which explains in detail and also you can find documentation links in it. 

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/compress-minify-the-html-page-not-the-js-and-css-which-can-do-by/qaq-p/369343

Translate
Level 2
Jul 22, 2020 6:12 AM UTC

Thanks for reply,

I am looking something only specific to a page-level that combines all the CSS requests at that page-level not globally... Looked something in ACS commons-based parameters as categories-- https://adobe-consulting-services.github.io/acs-aem-tools/features/clientlibs-optimizer/index.html but it returning as embed but how this request will use at the page level for combine

Translate
Varun_Shakya
New Participant
Jul 21, 2020 6:13 PM UTC

This blog explains the HTML library manager in best way 

http://www.sgaemsolutions.com/2017/07/adobe-granite-html-library-manager.html

 

And as u mentioned you want to load all your libs in one request please check this

 

 

https://docs.adobe.com/content/help/en/experience-manager-65/deploying/configuring/osgi-configuration-settings.html#aemhtmllibrarymanager

 

 

 

Translate
Level 2
Jul 22, 2020 11:47 AM UTC
I am looking something only specific to a page-level that combines all the CSS requests at that page-level not globally... Looked something in ACS commons-based parameters as categories-- https://adobe-consulting-services.github.io/acs-aem-tools/features/clientlibs-optimizer/index.html but it returning as embed but how this request will use at the page level for combine
Translate