The Olark chat box is designed to load asynchronously - this means that it loads "in the background", and should not block the loading of the rest of your site’s content.

However, there are cases where it may seem like Olark is slowing your site down. For your reference, we’ve collected for you below the most common questions we get about Olark and page speed like:

  • Why does Olark load so many resources, even after the chat box has finished loading?
  • Why is my site noticeably faster when I remove the Olark code snippet?
  • Why is Google PageSpeed Insights telling me that Olark resources need fixing?

Why does Olark load so many resources, even after the chat box has finished loading?

If you’ve ever looked at the Network panel of your browser’s Developer Tools on your site, you may notice many of these row items (from the domain nrpc.olark.com) continue to appear long after your site and the Olark chat box have finished loading.

Olark poll requests

Those are Olark’s poll requests, and they are what put the "live" in Olark live chat. Olark’s poll requests are NOT resources (aka files) that your site is trying to download. They are requests sent from the chat box to Olark’s servers, and they should have zero impact on how your site loads.

These requests send information back and forth between the chat box and Olark’s servers about the visitor’s and agent’s online/offline status, new messages, etc.

Why is my site noticeably faster when I remove the Olark code snippet?

The most frequent cause of this issue is when your website is trying to download too many (non-Olark) image or script resources at once from the same domain.

All modern browsers have a limit on the number of resources (e.g. images or scripts) that can be downloaded at the same time. The "HTTP connection limit" for popular browsers like Chrome and Firefox is 6, so for example if your site needs to download 10 images in a row, the first 6 will start downloading in parallel, but the remaining 4 images (and any other resources thereafter, including Olark) would not be able to download until the first 6 images finish loading.

When that happens, Olark’s script can end up getting caught up in the bottleneck and (incorrectly) appear to be the cause of your website’s slowness, according to your browser.

This is why your site may appear to be faster when you remove Olark’s code snippet. Your site is loading a lot of heavy images and/or scripts and could be optimized further even without Olark, but adding Olark on top of that ends up being the straw that broke the camel’s back.

Here’s how you can check this for your own site:

If you are not familiar with Developer Tools, we suggest sharing this help article with your team’s developer(s) instead.

  1. Open your website in a new tab, and then open the Network panel of Developer Tools.
  2. Enter in "olark" in the search field to see when Olark’s resources are loading in the timeline. Filtered for Olark resources only
  3. Remove "olark" from the search field to see all of your site’s resources unfiltered again, and then click the Time column to sort your site’s resources in order of longest to shortest download time. Resources sorted by download time
  4. Take note of which of your site’s resources are taking the longest time to download, and also make mental note of where in the timeline they are loading. If they are loading around the same time that Olark’s resources are trying to load (from Step 2 above), that’s a good sign that there are inefficiencies in how your site load images and/or scripts. Those inefficiencies can create bottlenecks in your site speed that Olark can get caught in.

Here are two Google-approved best practices that will speed up your site in general and minimize the possibility of Olark-involving bottlenecks:

  • Images: You might want to consider loading your images from different subdomains, or creating an image sprite for your smaller images so that only a single HTTP request is needed instead of many. Check out Google’s guide to image optimization for more info.
  • Scripts: If it’s a large (non-Olark) script that seems to be causing issues, you can try (1) moving the script to the bottom of your page before the </body> tag if you haven’t already, or (2) making the script asynchronous. Check out Google’s guide to fixing render-blocking javascript for more info.

Why is Google PageSpeed Insights telling me that Olark resources need fixing?

Browser caching can boost page speed because retrieving a resource locally from the browser cache is faster and more consistent than having to retrieve it over the internet each time.

For that reason, 3rd party speed test tools will flag resources that have short cache times. Google recommends "a minimum cache time of one week and preferably up to one year for static assets, or assets that change infrequently." (Source)

PageSpeed Insights browser caching

However, the Olark chat box is not static - it is regularly being updated and improved. It has short cache times because when customers make changes to their settings or when we roll out important new changes to the chat box, we want your website’s visitors to see those changes as quickly as possible.

That’s why we don’t plan on increasing those cache times. If anything, we are trying to make those numbers (i.e. 45 minutes and 3 hours) even smaller in the future.

That’s why you can ignore when 3rd party speed tests flag Olark for short cache times. These are some of the most popular 3rd party diagnostic tools for testing page speed, and they all test for caching headers and cache times: