Expand my Community achievements bar.

SOLVED

Defer/async -> /etc.clientlibs/clientlibs/granite/jquery.min.js?v=aemv and /etc.clientlibs/clientlibs/granite/utils.min.js?v=aemv

Avatar

Level 7

Hi Team,

 

I want to defer below two granite clientlibs paths. Paths are 

1) /etc.clientlibs/clientlibs/granite/jquery.min.js?v=aemv

2) /etc.clientlibs/clientlibs/granite/utils.min.js?v=aemv.

How These two js files are getting embedded into page source ? Apparently they are getting embedded from /libs/clientlibs/granite/jquery and /libs/clientlibs/granite/utils. Any suggestions how I can async or defer those URLs. 

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@JakeCham 

Any specific reason to defer those clientlibs?

  • Those are framework libraries and it is not at all suggested to defer those libs. If these frameworks are deferred then all the dependent libs should also defer, otherwise will break all dependent libs.
  • There are no OOTB way to add defer or async.
  • Custom implementation https://github.com/nateyolles/aem-clientlib-async
  • Suggested not to async or defer OOTB or any framework libraries

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@JakeCham 

Any specific reason to defer those clientlibs?

  • Those are framework libraries and it is not at all suggested to defer those libs. If these frameworks are deferred then all the dependent libs should also defer, otherwise will break all dependent libs.
  • There are no OOTB way to add defer or async.
  • Custom implementation https://github.com/nateyolles/aem-clientlib-async
  • Suggested not to async or defer OOTB or any framework libraries

Avatar

Level 7

/libs/clientlibs/granite/utils have dependencies for /libs/clientlibs/granite/jquery.both have been put property named allowProxy = true but still in publisher we can see those URLs even allowProxy=true.Is this because of they are in outside app ?