Recover from unexpected reload of iframe

Detailed description of issue
We’re using a tab component that dynamically removes and adds tab contents to the DOM as the user navigates between tabs. One of the tabs contains an instance of the web viewer. Navigating away from the tab with the web viewer instance and coming back causes the web viewer iframe to reload. When it reloads, there is no document loaded in the web viewer.

We could lazy load the tab contents or do some workaround to keep the viewer in the dom as the user navigates between tabs but I wanted to avoid having to do that if possible.

Is there a way to re-cover from an unexpected re-load of the iframe?

Hi there,

For the iFrame reloading, this is an expected behaviour. If you are removing the DOM element, the iFrame will be unmounted and upon being re-mounted will cause a reload. However, between iFrame loads, there is a way to save and load the document state. Check out these two guides to see how this is done: