Browser Refresh

One issue that may affect plugins is the browser refresh. If the user causes a page to refresh, then the Open Client recreates the plugin, but this will only be with its current state and may not include previous state settings. For example, if a property was set up in a previous page, then the property setup is not repeated in the refresh for the current page. This means that plugins must manage their own state information and setup settings in a refresh situation.

To help with this, the object definition has a property called isRefresh. This is set to TRUE if the page is being rebuilt due to a refresh. The Open Client also provides browser session-based storage (see get and put functions). This allows a plugin to save data in the browser that will be available when the object is rebuilt due to a refresh.

It is important to note that the names used in the storage are globally shared, so they must be unique. This can be done by prefixing the names by the ‘objectId’, which is unique to a plugin instance and is preserved for a refreshed plugin.

Comment on this topic

Topic ID: 800052