This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Hi,
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:
<!-- in typical AEM setup, is jquery-ui required on Author and/or website? --> <link rel="stylesheet" href="/etc/clientlibs/granite/jquery-ui.css" type="text/css"><link rel="stylesheet" href="/etc/clientlibs/foundation/jquery-ui/themes/default.css" type="text/css"><!-- /granite/jquery.js is fine to include on website --> <script type="text/javascript" src="/etc/clientlibs/granite/jquery.js"></script><!-- in typical AEM setup, are any of the below files required in Author and/or website? --><script type="text/javascript" src="/etc/clientlibs/granite/utils.js"></script><script type="text/javascript" src="/etc/clientlibs/granite/jquery/granite.js"></script><script type="text/javascript" src="/etc/clientlibs/foundation/jquery.js"></script><script type="text/javascript" src="/etc/clientlibs/granite/jquery-ui.js"></script><script type="text/javascript" src="/etc/clientlibs/foundation/jquery-ui.js"></script>
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
Theo
Solved! Go to Solution.
Yes Theo - All JS and CSS files in cq.jquery are required only on Author side.
~ Ratna.
If you only want a specific version of JQuery - you can create your own client lib:
https://helpx.adobe.com/experience-manager/using/integrating-jquery-framework-cq.html
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?
Thanks
Theo
Views
Replies
Total Likes
Yes Theo - All JS and CSS files in cq.jquery are required only on Author side.
~ Ratna.
Hi,
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?
Thanks
Theo
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies