Performance | blocked js files on page load | Community
Skip to main content
Level 2
November 28, 2024
Solved

Performance | blocked js files on page load

  • November 28, 2024
  • 5 replies
  • 812 views

We observed while loading the page below JS file is blocking and not loading. 

/etc/cloudsettings.kernel.js/libs/settings/cloudsettings/legacy/contexthub

 we checked in our code we are not using it anywhere hence please suggest how we can exclude it on page load.

 

Also, pls suggest how to exclude the JS files which are not required from the page

 

/etc.clientlibs/clientlibs/granite/typekit.lc-99e485b469edcc1ceee7279944129230-lc.min.js
/etc.clientlibs/clientlibs/granite/jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js
/etc.clientlibs/clientlibs/granite/jquery/granite.lc-011c0fc0d0cf131bdff879743a353002-lc.min.js
/etc.clientlibs/clientlibs/granite/moment.lc-3d5308df772b5389ba56d101818be1b9-lc.min.js
/etc.clientlibs/clientlibs/granite/coralui3.lc-c4cd39f7fcd599057827d5ecc5a83ab1-lc.min.js

 

We need for the performance.

Thanks in advance.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by konstantyn_diachenko

Hi @shikhasharma-1 ,

 

Additionally, The following files are clientlibs from coralui3 category:

  • /etc.clientlibs/clientlibs/granite/typekit.lc-99e485b469edcc1ceee7279944129230-lc.min.js
  • /etc.clientlibs/clientlibs/granite/jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js
  • /etc.clientlibs/clientlibs/granite/jquery/granite.lc-011c0fc0d0cf131bdff879743a353002-lc.min.js
  • /etc.clientlibs/clientlibs/granite/moment.lc-3d5308df772b5389ba56d101818be1b9-lc.min.js
  • /etc.clientlibs/clientlibs/granite/coralui3.lc-c4cd39f7fcd599057827d5ecc5a83ab1-lc.min.js

You don't need this category on publisher, so you can exclude it from loading on publisher. I assume that you include this category either through page policy (implicitly; see headlibs.html) or explicitly in the Sightly scripts.

 

Best regards,

Kostiantyn Diachenko.

5 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 28, 2024

Hi, 

Most likely, you have the tag below in your page component or in an .HTML file. Please check and remove it

<sly data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}"/>

 

Hope this helps

Esteban Bustamante
konstantyn_diachenko
Community Advisor
konstantyn_diachenkoCommunity AdvisorAccepted solution
Community Advisor
November 28, 2024

Hi @shikhasharma-1 ,

 

Additionally, The following files are clientlibs from coralui3 category:

  • /etc.clientlibs/clientlibs/granite/typekit.lc-99e485b469edcc1ceee7279944129230-lc.min.js
  • /etc.clientlibs/clientlibs/granite/jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js
  • /etc.clientlibs/clientlibs/granite/jquery/granite.lc-011c0fc0d0cf131bdff879743a353002-lc.min.js
  • /etc.clientlibs/clientlibs/granite/moment.lc-3d5308df772b5389ba56d101818be1b9-lc.min.js
  • /etc.clientlibs/clientlibs/granite/coralui3.lc-c4cd39f7fcd599057827d5ecc5a83ab1-lc.min.js

You don't need this category on publisher, so you can exclude it from loading on publisher. I assume that you include this category either through page policy (implicitly; see headlibs.html) or explicitly in the Sightly scripts.

 

Best regards,

Kostiantyn Diachenko.

Kostiantyn Diachenko, Community Advisor, Certified Senior AEM Developer, creator of free AEM VLT Tool, maintainer of AEM Tools plugin.
PRATHYUSHA_VP
Community Advisor
Community Advisor
November 29, 2024

Hi @shikhasharma-1 

 

Check the clientlib categories that are loading at page and template level and exclude whatever is unnecessary in publish environment using below sly condition

 

<sly data-sly-test.editor="${wcmmode.edit}"> //Here goes the code </sly>

 

Nikhil-Kumar
Community Advisor
Community Advisor
November 29, 2024

@shikhasharma-1  - I think the extra clientlibs are being loaded from your template or having some dependency due to which it is pulling the depenedent clientlibs. Try checking your dependencies and the defined clientlibs at template level.

kautuk_sahni
Community Manager
Community Manager
December 16, 2024

@shikhasharma-1 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni