PubNub has a ‘catch-up’ mechanism that allows subscribing clients to retrieve messages still remaining on the message queue cache, in the case of abrupt exits or restarts. For instance, when navigating across different pages of a website, switching between browser tabs, or briefly losing an internet connection (e.g. driving through a tunnel, switching from WiFi to cellular, from one cell tower to another, etc.). If catch-up is enabled, as soon as internet is restored, or as soon as the client returns to the original page or tab, they will receive all messages published during the disconnect period that are still remaining on the message queue cache.
For further learning, please see: