We are constantly looking for ways to optimize the performance of the Web Widget (Classic), so that you can offer the best possible embedded customer support experience. Our goal is to do this with the smallest possible impact to your website.
What is the current package size of the Web Widget (Classic)?
The figures below represent the package size on first-time load of the Web Widget (Classic), subsequent loads will benefit from CDN caching, resulting in faster load-time (see “Are the Web Widget (Classic) assets cached?” below).
Package |
Size (Brotli compressed) |
Notes |
Web Widget (Classic) Core |
~475 KB |
The web_widget.js and common_vendor.js assets required for the Web Widget (Classic) regardless of which Channels are available. |
With Talk Channel |
+~65 KB |
The assets required by the Web Widget (Classic) when the Talk Channel is enabled in an account. 55 KB represents the first-time load of the Talk Channel. |
With Chat Channel |
+~59 KB |
The assets required by the Web Widget (Classic) when the Chat Channel is enabled in an account. |
Per language support |
+~5 KB (avg.) per language |
The Web Widget (Classic) will only load languages based on the visitor's locale setting. |
Why does the Web Widget (Classic) require this much JavaScript to function?
The Web Widget (Classic) is a powerful tool for embedding customer support into your website, packed with capabilities. You can enable many features and channels for your visitors to Chat with an agent, request a callback through Talk, leave a message and access your Help Center content to self-serve. In addition, the Web Widget (Classic) supports many languages across the globe, and you can customize your Web Widget (Classic) in Admin or via our suite of JavaScript APIs. That said, we acknowledge that we have plenty of room to improve and will continue to prioritize initiatives to optimize package size for any Web Widget (Classic) configuration.
When I embedded the Web Widget (Classic) in my web page I noticed a slower load time. Could the Web Widget (Classic) be slowing my page down?
You will notice that the Web Widget (Classic) loads asynchronously, which means it won’t block the rest of the page from loading, so your visitors can do what they came for as quickly as possible. That said, we acknowledge that the amount of JavaScript required for the Web Widget (Classic) will take time and resources for browsers to download, parse and execute. To help ensure we have as little impact as possible on your website load time we will continue to prioritize performance initiatives.
The Web Widget (Classic) architecture is optimized for caching, so once it has loaded on your website once for a visitor, on subsequent page loads, the Web Widget (Classic) will load much more quickly.
What is the best tool to monitor page load speed for my website?
We recommend using Google’s Lighthouse tool that is available by default in the audit tab of developer tools. Lighthouse has very good coverage of new features available in modern web browsers like Google Chrome. We rely on features like HTTP/2 multiplexing to optimize the Web Widget (Classic) and Lighthouse will take multiplexing into account when calculating the performance of a web page with the widget embedded.
Does it matter whether I put the Web Widget (Classic) script tag in the <HEAD> or <BODY> of my web page?
For customers concerned about page load performance, we recommend placing the snippet at the end of the <body> rather than the <head>. Even though the snippet script is very lightweight, it’s best to avoid inserting scripts that will block the browser from continuing to render a web page until that script has loaded. Just keep in mind that any scripts that use the Web Widget (Classic) zE JavaScript API must be placed after the snippet script.
Do the Web Widget (Classic) assets get served from a CDN?
Yes, the Web Widget (Classic) assets are served from a Content Delivery Network (CDN) using HTTP/2 to reduce latency. All the assets are accessed via a single origin which means that browsers will only need to open a single TCP connection in order to download the Web Widget (Classic). Visit this page to learn more about the benefits of HTTP/2.
Are the Web Widget (Classic) assets compressed using Gzip?
Yes, the Web Widget (Classic) assets are compressed using Gzip.
Are the Web Widget (Classic) assets cached?
Yes, the Web Widget (Classic) assets are individually versioned and long-term cached for up to a year. They’re cached both privately on end-user browsers, and publicly on CDN edge servers. Some assets required for the widget are unlikely to change between widget versions, and will be cached independently. This means those assets will be retrieved faster from cache the next time the browser needs them. For example, the country code flag icons utilized in Talk, or the notification sounds associated with Chat.
What if I use a CSP?
If you use a Content Security Policy (CSP), you must use the latest snippet. For more information, see the developer documentation about CSP support.