Skip to main content
Oct 16, 2015 2:27 AM UTC
Solved

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

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
MshajiAccepted solution
Community Advisor
Oct 16, 2015 2:27 AM UTC

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.

1 reply

MshajiCommunity AdvisorAccepted solution
Community Advisor
Oct 16, 2015 2:27 AM UTC

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.

Translate