내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Can we customizing AEM cq:includeClientLib to generate script tag without type="text/javascript"

Avatar

Level 1

The W3C Markup Validation Service  recomandate not to use type="text/javascript"   for script tag. But in AEM when we do it using cq:includeClientLib it adds it by default, is there a way not to include this additional settings for a script tag generated from aem by cq:includeClientLib ?

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi Partha,

Currently, com.adobe.granite.ui.clientlibs.impl.HtmlLibraryWriter writes "text/javascript" by default as it's been build in the era pre HTML5.

There are no config parameters to not add "text/javascript". It would be nice to have an option to not add the type when customer is generating HTML5 or latest html code. smacdonald2008​​ possible improvement to granite.ui.clientlibs?

@Partha, simply create a PostProcessing Filter to change the output and remove text/javascript from final html output.

Regards,

Peter

원본 게시물의 솔루션 보기

1 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi Partha,

Currently, com.adobe.granite.ui.clientlibs.impl.HtmlLibraryWriter writes "text/javascript" by default as it's been build in the era pre HTML5.

There are no config parameters to not add "text/javascript". It would be nice to have an option to not add the type when customer is generating HTML5 or latest html code. smacdonald2008​​ possible improvement to granite.ui.clientlibs?

@Partha, simply create a PostProcessing Filter to change the output and remove text/javascript from final html output.

Regards,

Peter