browserContactCacheMin

The default behaviour of the widget is to keep the most recently accessed address book in the browser’s memory until the page reloads. We made this choice because we’ve observed that a single person sometimes goes through the contact importing process multiple times and we wanted to make their contacts available the second time for efficiency.

This behaviour can be changed to either:
1) never cache the address book and always make the user reconnect to their address book or
2) extend the cache to persist for a predefined number of minutes.

The browserContactCacheMin option is responsible for this behaviour. Set it to 0 to never cache or set it to a number of minutes to cache the address book. E.g.

cloudsponge.init({
  // never cache the contacts, even in memory
  browserContactCacheMin: 0
});

Type: float

The number of minutes that any successful address book data will persist in the browser’s localStorage cache.

This option is useful if your users will be accessing the widget multiple times over multiple sessions.

When a user successfully imports their contacts, the widget keeps the address book in memory and will display the contacts again for the same source. This is useful when a user closes the widget and opens it again. Their contacts will already be populated. Once a new page loads or reloads in the browser, their address book is cleared from memory and must be loaded again from the address book source.

If you want to extend the storage behaviour beyond the lifetime of the current page, you can enable it with this option. When enabled with a value greater than 0, the widget will persist the address book in the browser’s localStorage object, if available. Once this locally cached object expires based on the number of minutes specified, the address book will need to be loaded from the source again.

The cached copy of the user’s contacts will be displayed without prompting the user to provide consent again if the contacts are available. When not set or set to 0, the user will always be prompted to provide consent to import their contacts. Fractional minutes are supported. Users have the ability to turn off this feature on their browser.