# Adding async/defer attribute on module scripts

**URL:** <https://community.hubspot.com/t/adding-async-defer-attribute-on-module-scripts/45056>\
**Category:** CMS Development\
**Tags:** javascript, starter\
**Created:** [October 8, 2021, 1:53am UTC](https://community.hubspot.com/t/adding-async-defer-attribute-on-module-scripts/45056 "2021-10-08T01:53:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marth](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/marth/32/7115_2.png) [@marth](https://community.hubspot.com/u/marth)\
**Post date:** [October 8, 2021, 1:53am UTC](https://community.hubspot.com/t/adding-async-defer-attribute-on-module-scripts/45056/1 "2021-10-08T01:53:42Z")

</div>

Is it possible to add async/defer tag on scripts being added by a module? I checked the [module documentation](https://developers.hubspot.com/docs/cms/building-blocks/modules/configuration) and it seems there’s no option for it. I tried using **js\_render\_options** but it doesn’t seem to work.

Here’s my module meta.json code:

```lia-code-sample
{
 "global" : false,
 "icon" : "fontawesome-5.14.0:Images:SOLID",
 "host_template_types" : ["PAGE"],
 "module_id" : 54869248124,
 "css_assets" : [ {
 "path" : "../../css/glide.core.min.css",
 "name" : "glide.core.min.css"
 }, {
 "path" : "../../css/glide.theme.min.css",
 "name" : "glide.theme.min.css"
 } ],
 "js_assets" : [ {
 "path" : "../../js/glide.min.js",
 "name" : "glide.min.js"
 }, {
 "path" : "../../js/fslightbox.js",
 "name" : "fslightbox.js"
 } ],
 "js_render_options" : {
 "position": "footer",
 "async": true
 },
 "label" : "Gallery",
 "is_available_for_new_content" : true
}

```

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [October 8, 2021, 8:25pm UTC](https://community.hubspot.com/t/adding-async-defer-attribute-on-module-scripts/45056/2 "2021-10-08T20:25:42Z")

</div>

@marth

I _don’t think so_, but I am not 100% sure

@miljkovicmisa , do you know?

---

<div class="post-metadata">

**Author:** ![JMoats](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jmoats/32/74968_2.png) [@JMoats](https://community.hubspot.com/u/JMoats)\
**Post date:** [June 30, 2022, 2:09pm UTC](https://community.hubspot.com/t/adding-async-defer-attribute-on-module-scripts/45056/3 "2022-06-30T14:09:41Z")

</div>

Yes, this is possible! Here’s how your require\_js function call should look:

`{{ require_js(get_asset_url("https://example.com/cdn/"), { position: "footer", defer: true }) }}`
