We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Nov 6, 2018 12:43 PM
Is there a way to eliminate the Hubspot render-blocking Javascript file on my Wordpress site?
I am also getting some "leverage browser caching" errors from PageSpeed Insights on what appear to be Hubspot resources. How can I fix this issue?
Nov 7, 2018 5:32 PM
i have taken the steps that you recommended and i'm still getting the "Eliminate render-blocking JavaScript and CSS in above-the-fold content" error from PageSpeed Insights for this file : https://js.hsforms.net/forms/v2.js
as a note, my website is a wordpress site and i have embedded some of my hubspot forms into the site. the site was not built in Hubspot. i don't know if that makes any difference or not.
thanks for your help!
Nov 9, 2018 11:18 AM
Never used Wordpress, but if you are embedding HS resources presume you can control where they are located. Put the JS at the bottom just above the tag.
If Wordpress does not allow this, then try adding async attribute, this will allow the page to continue loading while it fetches the js file.
Nov 7, 2018 4:46 PM
To fix the render-blocking issue go to Settings > Website > Pages. The jQuery section is at the bottom, check the select box and save.
As for the browser caching issue, they are HubSpot resources and the cache-controls max-age have set to 1, 5, and 10 minutes for the ones you are talking about. I imagine there is a reason, but eTags are also defined and they are not changing.....