Hello everyone, my name is Gilberto Cocchi from Google Chrome.
I wanted to highlight an opportunity to improve the User Experience of all sites using Intercom Widget.
Because of the way the Intercom Widget uses the WebSocket API the Chrome Browser is forced to entirely reload the page every time the widget loads.
That’s because the WebSocket is used in way that prevents to make the Page BFCache eligible.
If the Intercom Widget would implement the following best practices all sites using this widget may benefit of the additional page load speed benefits (presuming it was the only BFCache blocking reason).
In order to make the WebSocket implementation compatble the following two things should happen:
- The WebSocket connection should be opened within the pageshow event handler.
- The WebSocket connection should be closed by using the pagehide event handler.
Can anyone help me escalate this suggestion to the Intercom Widget Engineering team?
More info about BFCache here: https://web.dev/articles/bfcache
Regards
Gilberto
