Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

How many times do css and js load in a page?

Avatar

Former Community Member

I have css and js files in clientLibs folder, and also I have created a component. My question is if I drag the same component three time on my website, how many times will the css and js be applied.

1 Accepted Solution

Avatar

Correct answer by
Level 9

With client lib feature we can categorize every JS and CSS file as a library and can include/import them in individual component or template .  If on a page there are multiple component that needs the same library then CQ will make sure that the library is loaded only once.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 9

With client lib feature we can categorize every JS and CSS file as a library and can include/import them in individual component or template .  If on a page there are multiple component that needs the same library then CQ will make sure that the library is loaded only once.