JivoChat and website loading speed
When testing your site with services like Google PageSpeed, you may encounter tips and recommendations that relate to JivoChat. Reports are correct, but still: our script does not affect the performance and speed of your site for visitors. Why? Let's look at the points.
How and when does JivoChat chat load?
What test services recommend and what does it mean?
Does JivoChat affect the performance of my site?
How and when does JivoChat chat load? #
The current JivoChat insertion code looks like a script with the async attribute.
<script src="//code.jivosite.com/widget/_WIDGET_ID_" async></script>
This means that the chat is loaded asynchronously and does not interfere with the loading of your site and the display of content on it. In a nutshell, the sequence is as follows: first, all the resources of your site are loaded, and only then, when the page can be fully used, JivoChat starts loading.
The main chat script (bundle_*.js) starts initializing only after the load(window) event.onload is executed on the site page. This means the event occurs only when the browser has fully loaded HTML, images, styles, and other resources.
The screenshot below shows an example of the correct loading of chat scripts after loading the site. First, all the resources of your site are loaded, and only after the site is loaded and ready to work, Jivochat script starts executing:
What test services recommend and what does it mean? #
Many of the recommendations are just FYI or may not be related to your site directly, but to third-party scripts, which you link (Google Analytics, Yandex.Metric, Facebook, etc.). So, you can't affect these parameters (except to disable scripts).
1. Serve static assets with an efficient cache policy:
If you increase the cache time for your files, they will be stored locally for longer, and this will reduce the site loading time for repeated visits.
This is a good tip for caching images, resources, and scripts that rarely change. But this will not work for other services that need to be updated frequently or provide up-to-date information.
For example, JivoChat loads the current chat settings, operator statuses, checks the availability of callbacks, and other information necessary for the proper chat work. This needs to be done regularly, so we just can't increase the cache time, this will make the chat unusable.
2. Reduce the impact of third-party code:
It does take time to load our widget. Two things are important here: first, the test results in Google PageSpeed and similar services are emulated for weak systems, and on modern devices, everything happens much faster. Second, the service recommends that third-party resources should be downloaded last — this is exactly what happens with JivoChat, and this key recommendation has been implemented.
Does JivoChat affect the performance of my site? #
Short answer: according to testing services, yes, but your visitors don't notice it.
Google PageSpeed (or similar services) estimates the total page load time, including all resources and scripts, and summarizes this time. Therefore, from the point of view of a heartless machine, a site with JivoChat takes longer to load than without It. However, from the point of view of the visitor, there is no difference: the chat is loaded asynchronously and only when the rest of your site is completely functional. The user can start searching for the information they need, and at this time JivoChat script is loaded. And by the time a visitor has questions, JivoChat chat is also ready.
So, from the point of view of testing services, JivoChat slows down your site, from the point of view of the visitor — absolutely not.
Other services to analyze the site load speed:
https://www.dareboost.com/
https://gtmetrix.com/
Our recommendations:
-
Check that you have the current chat insertion code, you can do this in the operator's program: Channels → Settings → Installation.
-
Don't connect too many different scripts or libraries from different resources.
If you still have questions, contact us in the chat: start chat.