reduce javascript execution time shopify

reduce javascript execution time shopify

{% comment %} remove URLs from asyncLoad {% endcomment %}

{% assign urls_to_remove = ’
https:exampleUrl1.com,
https:exampleUrl2.com,
https:exampleUrl3.com,

| strip_newlines
| replace: ’ ', ‘’
| split: ‘,’
%}

{% for url in urls_to_remove %}
{% assign content_for_header = content_for_header | remove: url %}
{% endfor %}

{{ content_for_header }}

{% comment %} inject app scripts after user interaction {% endcomment %}

you can use this script and modify it.