Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
Unable to move scripts under standard_header_includes to footer in HubSpot

I'm newbie in HubSpot and I need to improve a site's page speed insight score. In this I came across the issue of render blocking elements as all scripts inside the site are loaded in header. I need to move them to the site footer, but seeing no way or option to do so. It seems that all CSS and script files seen in header is included from {{ standard_header_includes }} but I don't see where that code is getting added to move script files to footer. Any help is really appreciated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You actually control the loading of the scripts where YOU are actually calling them.

So for example anywhere you use require_js or require_css you actually in that function choose if you want to load in the header, footer, load it async, deferred, etc.

By default module.js is loaded in the footer, module.css is loaded in the header. Each are minified.

The order of your require statements in the actual page determines the ordering of the HTML script and link tags.

I highly recommend checking out the optimizing your CMS Hub site for performance page as it is very thorough on the things you can do to make your site blazingly fast. The JavaScript section in particular is relevant to what you're talking about. https://developers.hubspot.com/docs/cms/guides/speed#javascript

Also I want to add, If you're inheriting your site from another developer, it's a good idea to look under website settings > pages and see if the developer set domain wide head html. If they did you'll want to review that code and make adjustments to move it to the footer appropriately.

Welcome to the HubSpot developer community @karthika.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!