Expand my Community achievements bar.

Performance | blocked js files on page load

Avatar

Level 1

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.

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

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

Avatar

Level 6

Hi @ShikhaSharma ,

 

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.

Avatar

Level 5

Hi @ShikhaSharma 

 

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>

 

Avatar

Community Advisor

@ShikhaSharma  - 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.