Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Exclude the granite/foundation libraries from the page loading in AEM

Avatar

Community Advisor

Hi Team,

  For some of the pages, we don't want to load the foundation and granite scripts on the page.

  How we can exclude those libraries form loading on AEM pages.

Any advice, please

Thanks

Uma

1 Accepted Solution

Avatar

Correct answer by
Level 1

I am able to do it by overriding the header.htm file.

View solution in original post

7 Replies

Avatar

Level 10

I do not think this is a feature. Its not a great idea either as you can introduce instability with respect to page dependencies.

Avatar

Community Advisor

I agree but no option for a few pages. we are working on headless architecture, we did a simple test by removing the libraries from the dispatcher version. We are ok with that. Functionality looking good we just need to add the custom styles to the page and content that's all matter.

Any advice on how to exclude these libraries.

Thanks

Uma

Avatar

Level 10

Not sure - as Adobe does not document this use case. I have asked some internal ppl for their thoughts here.

Avatar

Level 10

There is no instructions on this within Adobe. This does not seem like a practical use case.

Avatar

Correct answer by
Level 1

I am able to do it by overriding the header.htm file.

Avatar

Level 10

You can control the inclusion of a script if its not required for any functionality on page.

Which scripts you are seeing getting included on page and you dont need it?