cq5 - Adobe AEM: How to add "defer" attribute to script tag for scripts included through cq inlcude clientlib tag -


i'm including libraries through <cq:includeclientlib ../> tag.

i wanted include defer value under script tag as:

<script defer scr="something.js"></script> 

but once code included using include client lib tag:

<cq:includeclientlib categories="something.lib"/> 

and see libraries being included normal css , js includes:

<link rel="stylesheet" src="something.css" type="text/css"> <script type="text/javascript" src="something.js"></script> 

how defer attribute added js script include shown in initial code above? have tried searching on various forums , unable find answers. appreciated.

one way create custom requestrewriter. allows change written output html client lib script tag.

this commons package has code example request rewriter used, , similar rewrite attributes script tag:

also see following:


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -