May 4, 2017 2:18 PM
Hubspot has posted that it does not support "server-side languages/modifications such as an htaccess file." Post found here: https://knowledge.hubspot.com/articles/kcs_article/cos-general/does-hubspot-support-dynamic-content-...
Can anyone offer support on how to address the common site speed issue of "leverage browser-caching?"
May 5, 2017 12:38 PM
@tinypulse Unfortunately not. I have been told that Hubspot does provide some form of caching but it is not enough to make google page speed test happy, and there really isn't a way to make this happen.
All you can really do is make sure that all of your files are making use of Hubspots built in CDN, All of you images are first cropped and size to fit their use space, then optimized for size (http://compressor.io), and understand that 1. google can't even pass it's own page speed test, and 2. SEO is important but Hubspot is about content marketing not search engine placement so punch out some useful content and don't sweat this to much.
Aug 29, 2017 6:40 PM
If people can't access your website due to optimization problems then you have bigger problems than caching. Share one of your pages with me and I bet I can find several things other than caching that you could fix.
Aug 30, 2017 4:47 PM
I'm sure you could. And I, like many other people work hard to make sure that EVERY aspect works as fluidly and efficiently as possible. But, as has been widely documented, in this " I want it NOW " society, a lag of even 1 second can have drop off rates exceeding 7%. I for one, don't use AMP pages, since our site and destination is very visual, graphics are a very large part of our experience. So, just looking to tweek out every ounce of speed I can.
May 14, 2019 2:42 PM
May 10, 2019 4:11 PM
HubSpot automatically sets a cache time on served assets; removing the need to manually set cache times.
While most assets, such as images from the file manager, are served with a longer cache time (such as 14 days) other assets are purposefully set to have shorter cache times. This includes assets such as the tracking code, for which having a short cache time is important and would be detrimental to increase.
There are some good takeaways to gather from bots and grading tools in general; however, HubSpot focuses more on things which enable the best possible experience for visitors, as opposed to the various optimizations grading tools provide.
If page speed is actually negatively affecting a visitors journey/experience (as opposed to being flagged via a page speed test, though a page loads at a fine speed) there are almost assuredly other aspects which are affecting the page more than setting a longer cache time on served assets.
May 10, 2019 4:41 PM
@jennysowyrda Appreciate the update.
But a question. Does Hubspot have a relationship with Google and its bots, that when Google grades Hubspot sites, it says " oh this is a Hubspot site, I'll take their word for it that the site is optimized " If not, then when Google grades a site and sees deficiencies, it will still penanlize (to whatever extent Google decides) that site.
My reasoning is that while Hubspot may do a good job of optimizing, "Google" is still the final word..??
Or am I completely off?
May 13, 2019 2:40 PM
You do raise a good point in that even if HubSpot is doing great at optimizing for page speed, for certain factors if it’s not perfectly to Google’s standards they will still penalize the site in their search results. In some cases this would be unavoidable if we want to provide the type of visitor experience that HubSpot strives to provide.
As mentioned there are certain HubSpot assets that need to have short cache times in order to properly execute their functions, so enabling a cache time of upwards of a year as Google suggests would be far more detrimental to the overall site experience compared to the benefits of the few points of page speed gained from heeding the suggestion.
Even with assets which can and are cached for longer, such as file manager images, we want to consider the counter point in which sometimes you don’t want things cached for too long, such when you replace a file manager image; if you set a cache time of a year, none of your customers would see the new file for that period of time.
Overall, in terms of caching (as well as other factors) HubSpot works to optimize for page speed to aid in SEO but will always weigh the overall visitor experience more heavily.
May 14, 2019 4:30 AM
"still penalize the site in their search results"
With all due respect, this is the only thing you said which matters.
I cannot implement Googles suggestions to improve my site speed and thus search performance, as a direct consequence of me not being able to access that functionality in Hubspot.
It's not just caching, its GZIP Compression too
May 14, 2019 5:01 PM
I agree: I can address image optimization. I can move Google Fonts onto our own server. I can even make selective pages static to deliver content faster than possible from a CMS. The biggest issue is the bad expiries on the Hubspot scripts.
Ways Hubspot could address this:
May 22, 2019 6:24 PM
It seems that we are talking about the short cache times of HubSpot scripts, specifically ones like
and others. Google recommends that sites set cache times of over 1 year on served assets, however as mentioned above there are certain HubSpot assets that need to have short cache times in order to properly execute their functions.
@dewolfe001 to address your points:
1.) As mentioned above, this would cause more harm than good.
2.) The problem google has with these assets is the setting of a short cache time, where the files are pulled from would not affect this Google recommendation.
3.) Each file is fundamental to HubSpot functionality, and managed separately for various reasons. Combining these files could lead to serious issues, and again wouldn’t resolve Google’s qualm with these files not having a longer cache time.
4.) When hosting on HubSpot, users use HubSpot’s servers, not normally using their own servers in any context. Additionally, as mentioned above, setting a long cache time on the assets would be detrimental.
5.) Most HS scripts are not flagged by Google as render blocking, since they are not rendered in the head HTML and load asynchronously. (you can choose to load Jquery in the footer, via your settings as outlined in https://designers.hubspot.com/blog/site-speed-and-performance-what-we-do-and-what-you-can-do) Additionally, this does not affect the flagging of caching, which is what is discussed in this thread.
While recommendations from page speeds are definitely valuable, they aren’t always appropriate to implement and in the case of caching of these scripts, would not be a beneficial action.
Jun 15, 2019 2:52 AM
@jennysowyrda great points on the analytics scripts department, I think it's fair to say that if we compare analytics script caching policies across tools like Facebook, Google, Vimeo and Hubspot we will see similar tactics, so it's difficult to say that Hubspot is not doing its utmost in this department.
In the majority of cases, I educate clients that 3rd party scripts are beyond our reach when it comes to caching policies and to expect these to appear as breaking the "efficient cache policy rules" according to speed test. These scripts are loaded via 3rd party servers and it's up to them to determine how they would like the browser to cache the scripts. Hubspot should fall into this category.
Often it is the case that clients can become **bleep**-bent on page speed scores improvements from tools like Lighthouse and GT Metrix. This is not always wrong, but also not always the best investment of time.
But, and there's always a but, there exists little reason for Hubspot to not expose browser cache configuration to clients. Hubspot offloads to Cloudflare for a majority of CDN requirements, and rightfully so, Cloudflare is incredible! Cloudflare also offers direct clients to adjust browser cache policies and purge cache via APIs or the admin panel (ref: screenshot). And all of this goes without the mention of file revisioning tactics that can allow you to set a high browser cache and flush through updating file names thus naturally flushing browser cache.
So what are some solutions that can help ease everyone's pain :
Oct 31, 2019 6:41 AM
Great suggestions, as long as the added HubSpot functionality comes with the clearest of warnings -- e.g.,
"Modifying these settings can break HubSpot functionality!" 🙂
Nov 15, 2019 4:18 PM
Hi there, this is the biggest thing holding me back, I'd like to stay updated. HubSpot Support responded to my optimization efforts saying they already provide AMP for mobile, http/2 and page caching. But every time I test landing pages they come up uncached and it's killing the speed. So It seems the BLOG pages are optimized, but the LANDING PAGES are not. Unfortunately, we have no need for a blog, but urgently need OPTIMIZED LANDING PAGES.
I'm looking into manually coding each asset to lazy load to offset the issue, and even that is cumbersome, I can't believe I'm not given a choice to have lazy loading with the cache issues I'm running into.
Feb 5, 2020 5:32 PM
I'm challenged with the same issues. GTMetrix gives top grades down the line but fails for "Leverage Browser Caching".
I'm not a developer, but focused on site rankings, running audits via semrush, etc. The page load and speed affects other objectives downstream. If anyone notices an opportunity for me to improve this on my own, please lmk.