Caching Content

Caching the contents of the Experience on Android and iOS

The Experience builds on top of iOS' WKWebView and Android's WebView, and therefore will cache the content in the same manner as Safari or Google Chrome would.

It is also possible to cache the ExperienceView itself and re-use further down the line of the user flow. This can come in handy in scenarios where the same Experience may be displayed multiple times in the same session.

To do so, you'll need to keep a reference to the ExperienceView after using it, and adding that same instance to your view hierarchy.

Note that if another Experience has been displayed after caching the instance, and before re-using it, the session will have expired.

To avoid displaying the "Session closed" dialog during this scenario, it is possible to leverage the Communication Bridge to notify the Experience not to display it. Please get in touch with our Solutions Architecture team to design the flow of messages required.

In general, this is solved with two messages or requests:

  • One to notify the ExperienceView that it is moved to the background

  • Another to notify that it is moved back to the foreground, also called on first launch

Last updated