In this series of articles on website optimization, we’ve established how important it is to keep your website running smoothly. Search engines care about your website performance, so do your users, and so should you.So far, we have discussed the key performance indicators for website performance and how to measure and optimize them. We’ve also covered some of the most common problems with website performance and how to fix them. In this article, we will explore how the HubSpot CRM gives websites built on its platform a significant advantage when it comes to speed and performance.
HubSpot boasts a number of built-in features that set your website up for success right out of the box including:
WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP, webmasters and web developers can create smaller, richer images that make the web faster.
One way that HubSpot makes optimizing images much easier than other platforms is the ability to replace an image file without having to update the image tags across all pages. Once you’ve cropped and compressed images that need to be optimized, you can simply replace them in the File Manager following the instruction below.
To replace a file with an updated version:
Keep in mind that the old file may be cached for up to two hours after it is replaced, so you may not see the file update immediately. Allow some time before retesting the performance.
HubSpot has several built-in options for lazy loading, which are outlined in this article from the HubSpot blog. Lazy loading is a technique used by web pages to optimize load time. This type of loading lets the web page render only required content at first and waits to load any remaining content when the user needs it. This reduces the time it takes for a web page to open because the browser only loads a fraction of the content on the page at a time.
jQuery is a fast, small, and feature-rich JavaScript library that is used by many developers to create websites. HubSpot allows you to include jQuery across your website through your settings, but many developers include it in their theme or module code. Make sure that you only require jQuery once throughout your entire site.
One thing you won’t have to worry about is minifying your code because HubSpot does that for you. While other platforms require developers to use extra plugins or advanced development workflows to minify CSS and JavaScript, HubSpot does this automatically with all the assets it renders on a page.
Code can be included in a HubSpot website in a variety of ways, and it’s important to keep track of where and when that code executes. For example, each page, module, and template in HubSpot can have its own unique code, including HTML, CSS, and Javascript.
When optimizing module code, you’ll need to make sure that it follows these best practices:
Font families that appear in Advanced CSS areas, such as those located in HubSpot CTAs, will automatically require that font’s stylesheet in the header. This can cause duplicate copies of this font to be loaded if this font is used in the regular stylesheets or if the CTA is used more than once on a page. Instead, add font-family CSS declarations to your main CSS files.
To put it simply: slow websites turn visitors away.
A high-performing website that loads fast and looks great is essential to a positive user experience on the web. In 2019, the average amount of time a web page takes to display visible elements, or the Average Speed Index, trended around six seconds. And even this span of time tests our patience. Get the detailed checklist that we use to optimize our HubSpot sites and get an A every time.