Jump to content
View in the app

A better way to browse. Learn more.

Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ips.utils.db

Description

Modern browsers provide a mechanism for storing persistent data directly on a user's computer, called localStorage. This utility exposes some methods for working with localStorage in IPS4. 

 

Example

ips.utils.db.set( 'myCategory', 'myKey', 'Hello world' );
ips.utils.db.get( 'myCategory', 'myKey' );
// -> Hello world
ips.utils.db.isEnabled();
// -> true
ips.utils.db.removeByType( 'myCategory' );
// -> 1

 

Methods

void set( string type, string key, mixed value )

Sets a new value, or overwrites an existing balue with the same type and key.

  • type
    Name of category in which to store this value. Categories are used for later retrieving sets of related values.
  • key
    The unique key for this value
  • value
    The value to be stored.

 

void get( string type [, string key ] )

Retrieves a previously set value. If no key is provided, all values in the type are returned.

  • type
    The category containing the key to fetch.
  • key
    The key of the value to fetch.

 

void remove( string type [, string key] )

Removes a previously set value. If no key is provided, all values in the type are removed.

  • type
    The category containing the key to remove.
  • key
    The key of the value to remove.

 

object getByType( string type )

Returns an object of all values in the category with the provided name.

  • type
    The category name

 

number removeByType( string type )

Removes all values from the category with the provided name, returning a count of the number of removed items.

  • type
    The category name

 

boolean isEnabled()

Returns a boolean indicating whether the localStorage utility is enabled in this user's browser.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.