# How can I add defer and asynchronous for JavaScript & CSS file

**URL:** <https://community.hubspot.com/t/how-can-i-add-defer-and-asynchronous-for-javascript-css-file/68471>\
**Category:** CMS Development\
**Tags:** enterprise\
**Created:** [November 3, 2022, 11:53am UTC](https://community.hubspot.com/t/how-can-i-add-defer-and-asynchronous-for-javascript-css-file/68471 "2022-11-03T11:53:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LTDev](https://avatars.discourse-cdn.com/v4/letter/l/8edcca/32.png) [@LTDev](https://community.hubspot.com/u/LTDev)\
**Post date:** [November 3, 2022, 11:53am UTC](https://community.hubspot.com/t/how-can-i-add-defer-and-asynchronous-for-javascript-css-file/68471/1 "2022-11-03T11:53:41Z")

</div>

I’m not able to find a way to add **defer** and **asynchronous** for JavaScript & CSS files. Also, how can I find the base template or theme name which one use on our pages?

---

<div class="post-metadata">

**Author:** ![jonchim](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jonchim/32/88818_2.png) [@jonchim](https://community.hubspot.com/u/jonchim)\
**Post date:** [November 3, 2022, 12:18pm UTC](https://community.hubspot.com/t/how-can-i-add-defer-and-asynchronous-for-javascript-css-file/68471/2 "2022-11-03T12:18:35Z")

</div>

Hey @LTDev,

I believe you should be able to define that manually in your base.html file (usually found under theme name \> templates \> layoutt) if you’re using themes or under hubspot settings in website \> pages.

---

<div class="post-metadata">

**Author:** ![BarryGrennan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/barrygrennan/32/97794_2.png) [@BarryGrennan](https://community.hubspot.com/u/BarryGrennan)\
**Post date:** [November 3, 2022, 1:16pm UTC](https://community.hubspot.com/t/how-can-i-add-defer-and-asynchronous-for-javascript-css-file/68471/3 "2022-11-03T13:16:49Z")

</div>

You’d use the [require\_js tag](https://developers.hubspot.com/docs/cms/hubl/functions#require-js) and add your defer/async settings to there.

You’ll find the template you’re using for an individual page on it’s edit screen, click Setting\>Advanced Settings\>Template (I’m 90% certain that’s right, I’m going from memory on my phone 😂 It’s definitely under settings anyway)

* * *

 ![profile2022a.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/7/7273a34ccfe3489fceebc8a36eca751481b59531.jpeg)

**Barry Grennan**

[Freelance HubSpot CMS Developer](https://www.seoanseo.ca?utm_source=HubSpotCommunity)

[Website](https://www.seoanseo.ca?utm_source=HubSpotCommunity) | [Contact](https://www.seoanseo.ca/#contact?utm_source=HubSpotCommunity) | [LinkedIn](https://www.linkedin.com/in/barrygrennan)
