Widget support on various types of websites
How the internet works
A normal lifecycle of a web page goes as follows
- A request starts from the browser to the server by the user when they followed a certain url
- The server responds to that request with an HTML response
- The browse renders that HTML
- The user navigates to another page, thus creating a new request to the server
- The server responds with a new HTML response
- Everything on the browser is destroyed an the new HTML response is shown
Normal web pages
As we can see, on a classic web page, when a new page is loaded everything is destoryed and created againg from the beginning. Our widget, being a part of that web page is also destroyed and created again on the next lifecycle. Fortunatelly the browser offers various ways that we can use to keep a state, so our widget knows on the next page load if it should resume from where it left off.
What about an ongoing video call?
Good question. As we saw, the widget has to obey to the laws of the internet, thus when the user navigates to another page, it is destroyed and created again. This will interrupt briefly the call, as the user will have to wait for the new page to load, then the widget to load and finally the widget to connect again to the ongoing call.
How can we avoid this?
Pop-out the video call. The customer has the ability to open the video call in a new window. They just have to click the pop-out icon on the top right of the video call so that it opens in a new window. The browser may block this new window so the customer will also have to approve this pop-up on the browser.
Wrap the web page in an iFrame. Our widget will live on the parent web page and all the navigation will happen in the child iFrame.
Single Page Applications (SPA)
Our widget in a Single Page Application behaves as the SPA web page and does NOT load again on each navigation change. The video call or co-browse session remains uninterrupted.