Home

# Library goog.storage.mechanism.mechanismfactory

Function Summary

`create(string= opt_namespace) ⇒ ?goog.storage.mechanism.IterableMechanism`

Returns the best local storage mechanism, or null if unavailable. Local storage means that the database is placed on user's computer. The key-value database is normally shared between all the code paths that request it, so using an optional namespace is recommended. This provides separation and makes key collisions unlikely.

`createHTML5LocalStorage(string= opt_namespace) ⇒ ?goog.storage.mechanism.IterableMechanism`

Returns an HTML5 local storage mechanism, or null if unavailable. Since the HTML5 local storage does not support namespaces natively, and the key-value database is shared between all the code paths that request it, it is recommended that an optional namespace is used to provide key separation employing a prefix.

`createHTML5SessionStorage(string= opt_namespace) ⇒ ?goog.storage.mechanism.IterableMechanism`

Returns an HTML5 session storage mechanism, or null if unavailable. Since the HTML5 session storage does not support namespaces natively, and the key-value database is shared between all the code paths that request it, it is recommended that an optional namespace is used to provide key separation employing a prefix.

| `createIEUserData(string= opt_namespace) ⇒ ?goog.storage.mechanism.IterableMechanism` Returns an IE userData local storage mechanism, or null if unavailable. Using an optional namespace is recommended to provide separation and avoid key collisions.