How to stop chatbots from killing your page speed
Joseph Farruggio
Posted on July 10, 2020
When we’re considering JS dependent functionality, we need to weight its benefits against its costs. Chat bots are powerful support and lead gen tools, but like any JavaScript resource it adds weight to your web page, slows TTI, and delays other resources from loading.
And another thing to consider is that fact that folks don't need a chatbot the second they hit your webpage. They need a second or two to take it all in and figure out what they are going to read or click on next. So why are we forcing folks to download chatbots in a way that's not performant and doesn't serve their needs?
That's why I both wrote a tutorial on how to optimize chatbot's for page speed via JavaScript and built a WordPress plugin called Chatbot Lazy Loader to do that work for you.
My very first #WordPress plugin was just #1 on @ProductHunt!
Consider taking a look and giving it an upvote.
producthunt.com/posts/chatbot-…22:53 PM - 09 Jul 2020
What's happening in the JavaScript is delightfully simple. Our JavaScript is delaying the download of the chatbot's JavaScript. And there's more than one way we can implement this.
- We could set a timer and make the chatbot JavaScript wait 5 seconds.
- We could create an event listener to detect when the user begins to scroll.
- We could also prevent the chatbot's JavaScript from loading entirely and wait for the visitor to hover or click on a "Chat with us" button.
The end result is the same though. You get to protect your page speed score and improve your visitor's experience.
Cheers!
Posted on July 10, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.