You need to improve yoru web page performance for better user experience and SEO. Let's breakdown the rendering process to see what's going on.
Consider using Cypress when you create a new frontend project or your project doesn't have any test code before. It's simple and powerful.
If the user has opened multiple tabs when visiting your site, you can consider using WebSocket + SharedWorker + BroadcastChannel to broadcast your message to all opened tabs.
Callbacks are disgusting flies in the delicious ES6 soup. Refactor them to use promises only.
I wrote a decorator to solve the concurrency problem of promises and published to npm. Waiting for you to take a look and try!