Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Validate 1
Level 1
partha_pratim_p
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
partha_pratim_p
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
partha_pratim_p
Level 1

04-03-2019

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 ?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
MVP
PuzanovsP
MVP

Likes

132 likes

Total Posts

540 posts

Correct Reply

164 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 10
View profile

Avatar
Validate 25
MVP
PuzanovsP
MVP

Likes

132 likes

Total Posts

540 posts

Correct Reply

164 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 10
View profile
PuzanovsP
MVP

04-03-2019

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

Answers (0)