DiviArea.Utils.setLocalData()

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Functions
  6. DiviArea.Utils.setLocalData()
DiviArea.Utils.setLocalData(key, value, expiration)

Save the given information for a specified number of minutes in the current browser.

This method stores data either in the localStorage of the browser, or when the browser does not support localStorage, set a cookie with the given name.

Data saved with this method can be retrieved via `DiviArea.Utils.getLocalData(key)“

Params

key
(string, required) ID/Key of the data entry/cookie.
value
(string, required) The value to save.
expiration
(int, optional) Number of minutes to retain the data for.
Default: 525600 (1 year)

Returns

The function does not return anything.

Notes

No notes

Was this article helpful?

Related Articles