removePref

Preferences

Removes the specified preference. The preferences are not persisted until you explicitly call $m.savePref(). By default, preferences are committed during onPause event is fired on the page.

$m.removePref("user_id");

Syntax

        $m.removePref(key, [global])

Parameters

name

string (required)

Key of the preference to be remove.

global

boolean (optional)

True, if the preference is to be removed from global preferences. Default value is false.

Remarks

Preferences can be used to store app data that needs to persist across app restarts. By default, the preferences stored in a page are accessible in other pages provided if the pages belong to the same pack. In order to share preferences across packs, use the global parameter.