We are including the <cq:includeClientLib js="cq.jquery" /> ClientLibrary in the <head> of our website and (it appears) to be rendering as below in the HTML source:
I'm trying to work out if any/all of the above files are really necessary for a user-facing website, or if in fact most are just required for the Author side of AEM. I am hoping somebody can advise, even based on a typical AEM setup, whether the cq.jquery ClientLibrary is usually needed on a user-facing site.
Based on my investigations so far it appears that the vast majority of the files are not needed for our website (apart from /granite/jquery.js). I have noticed that for example, there is a /granite/jquery-ui.js file and a /foundation/jquery-ui.js file - I am wondering if both or any are needed or if they are supposed to only be used in the Author environment.
Hope the above makes sense - I know every website is different but any help/advice would be appreciated.
Thanks very much in advance
Solved! Go to Solution.
If you only want a specific version of JQuery - you can create your own client lib:
You are correct in that most of the Granite APIs are used for touch ui on author side - not part of your site that is rendered on Publish.
Thanks for your quick reply! So, just to confirm, all JS and CSS files in cq.jquery (apart from /granite/jquery.js) are only required for Author?
I have one more question regarding this - do I need to explicitly call the cq.jquery files to be used on Author or are they just built into AEM anyway? For example I could use an if statement to detect Edit or Design mode. Is this necessary?