# HubSpot Script Loader

**URL:** <https://community.hubspot.com/t/hubspot-script-loader/20685>\
**Category:** CMS Development\
**Tags:** website-pages\
**Created:** [May 7, 2020, 8:26pm UTC](https://community.hubspot.com/t/hubspot-script-loader/20685 "2020-05-07T20:26:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcha](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/fcha/32/39384_2.png) [@fcha](https://community.hubspot.com/u/fcha)\
**Post date:** [May 7, 2020, 8:26pm UTC](https://community.hubspot.com/t/hubspot-script-loader/20685/1 "2020-05-07T20:26:03Z")

</div>

We are using the [HB Script Loader](https://knowledge.hubspot.com/reports/what-is-the-hs-scripts-embed-code-loading-on-my-website) in our templates. Our regional office in Beijing complained of slow response times from our website so when I requested a Network view of the request I noticed 2 culprits taking over a minute to load.

[js.hsleadflows.net/leadflows.js](http://js.hsleadflows.net/leadflows.js)

[js.usemessages.com/conversations-embed.js](http://js.usemessages.com/conversations-embed.js)

I was able to clone the HB script loader, remove the calls for these 2 files and the site performs normal.

My question - what functionality will I be lose due to my change?

I suspect chatbot wont’ work, but that’s a non issue as we don’t use it for that region. But leadflows are a bit more concerning and I found no documentation on the impact removing that file will have.

Your feedback is welcomed!

---

<div class="post-metadata">

**Author:** ![Willson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/willson/32/84663_2.png) [@Willson](https://community.hubspot.com/u/Willson)\
**Post date:** [May 14, 2020, 8:08am UTC](https://community.hubspot.com/t/hubspot-script-loader/20685/2 "2020-05-14T08:08:28Z")

</div>

Hey @fcha

The site itself will perform normally without the addition of these scripts but as they have been removed, you will lose the following functionality:

- [Leadflows / Pop-up Forms](https://www.hubspot.com/products/marketing/lead-flows/l047b2)
- [Conversations](https://www.hubspot.com/products/crm/conversations)

In order to restore functionality for these features, the scripts themselves will need to be restored in order for the features to correctly load on your site.

I hope this helps!

---

<div class="post-metadata">

**Author:** ![BradSmith](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bradsmith/32/76793_2.png) [@BradSmith](https://community.hubspot.com/u/BradSmith)\
**Post date:** [October 1, 2021, 7:57pm UTC](https://community.hubspot.com/t/hubspot-script-loader/20685/3 "2021-10-01T19:57:36Z")

</div>

Leadflows is being loaded on all of our sites despite the fact that we don’t use leadflows. This adds .5M to the total JS downloaded for the site. Is there a way to tell HS to \_not\_ do this other than creating our own customized version like the OP did?

---

<div class="post-metadata">

**Author:** ![Pilchard](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pilchard/32/31127_2.png) [@Pilchard](https://community.hubspot.com/u/Pilchard)\
**Post date:** [June 30, 2022, 1:28pm UTC](https://community.hubspot.com/t/hubspot-script-loader/20685/4 "2022-06-30T13:28:01Z")

</div>

⬆ I would also like to know this.

---

<div class="post-metadata">

**Author:** ![Sjardo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sjardo/32/52178_2.png) [@Sjardo](https://community.hubspot.com/u/Sjardo)\
**Post date:** [June 3, 2021, 2:11pm UTC](https://community.hubspot.com/t/hubspot-script-loader/20685/5 "2021-06-03T14:11:13Z")

</div>

Hi!

Today, I was digging into this issue and would like to give some extra information on my findings. It might help someone, someday!

- If you use any chat options once, somewhere, it will load conversations.js on any HubSpot page.
- If you use a single pop-upform / lead flow once, somewhere, it will load leadflows.js on any HubSpot page.

To clarify once more. If you use one or both of those features once, it loads the correlated script on every page on your site.

So keep that in mind 😉  
Best,  
Sjardo

---

<div class="post-metadata">

**Author:** ![nikt](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/nikt/32/102945_2.png) [@nikt](https://community.hubspot.com/u/nikt)\
**Post date:** [March 31, 2022, 3:01pm UTC](https://community.hubspot.com/t/hubspot-script-loader/20685/6 "2022-03-31T15:01:52Z")

</div>

Still a thing for us. 0.5Mb to show one popup doesnt seem legit

---

<div class="post-metadata">

**Author:** ![JSexauer](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@JSexauer](https://community.hubspot.com/u/JSexauer)\
**Post date:** [July 11, 2022, 3:00pm UTC](https://community.hubspot.com/t/hubspot-script-loader/20685/7 "2022-07-11T15:00:49Z")

</div>

As far as I understood from Sjardo’s post, the solution is to not have any Pop Up’s or comment/ Chat functions anywhere on your site. Then this won’t load. Whether that’s worth it for you is something you’ll have to decide.

---

<div class="post-metadata">

**Author:** ![WZolnowski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wzolnowski/32/192792_2.png) [@WZolnowski](https://community.hubspot.com/u/WZolnowski)\
**Post date:** [August 21, 2022, 12:51pm UTC](https://community.hubspot.com/t/hubspot-script-loader/20685/8 "2022-08-21T12:51:50Z")

</div>

That should be considered as a major bug in the HubSpot.

Because of that scripts, HubSpot websites are not usable for its users because of the slow loading time. Not even mentioning that search engines will penalize such slow pages, so SEO suffers.

Not using HubSpot CTA’s, chat and forms is an option, but why should we pay for HubSpot if we can not use its basic features?

---

<div class="post-metadata">

**Author:** ![CHorsefield](https://avatars.discourse-cdn.com/v4/letter/c/c2a13f/32.png) [@CHorsefield](https://community.hubspot.com/u/CHorsefield)\
**Post date:** [November 29, 2022, 2:11pm UTC](https://community.hubspot.com/t/hubspot-script-loader/20685/9 "2022-11-29T14:11:55Z")

</div>

Has there been any fix for this to exclude hsleadflows.js and still use the chat service? If not we’re going to cancel our Hubspot and find another provider.

---

<div class="post-metadata">

**Author:** ![simonp](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/simonp/32/60590_2.png) [@simonp](https://community.hubspot.com/u/simonp)\
**Post date:** [February 14, 2023, 11:02pm UTC](https://community.hubspot.com/t/hubspot-script-loader/20685/10 "2023-02-14T23:02:42Z")

</div>

Just discovered this topic - 500kb is really steep for a pop up
