Question
3
Replies
27
Views
Posted: July 6, 2020
Last activity: July 10, 2020
Deffered loading of cobrowse.js in browser
Can the cobrowse.js script be loaded in a deferred fashion on the client side: So either put JS at the end of the page instead of in the head or add below defer attribute in script tag? <script defer="true" src="..." /> We have seen that cobrowse JS takes significant amount of blocking time (100 ms - 300 ms) when being loaded on client browser. Hence would like to defer the script load towards the end to not block other traffic on the website.
@SnehB469 In OOTB cobrowse snippet there is already a line "script.async = true;" which means async attribute is already being used for loading cobrowse scripts and these scripts are completely independent of the page. The page doesn’t wait for async scripts, the contents of page are processed and displayed.