Stores items in the form of key-value pairs.
string
): string|null
string
- Key to identify the itemstring|null
- The item (if any) retrieved by the keystring
): boolean
key
?string
- Key identifying item to checkboolean
- True if key retrieves an item, false otherwisestring
)string
- Key to identify the itemstring
, data: string
)string
- Key to identify the itemstring
- Data to storeThe service will check to see if web storage is available on the browser. If it is available then the service will use it to store the key-value items persistently. Web storage can be used in a similar way to cookies but with a much higher size limit (several MB for web storage compared to a few KB for cookies). However, cookies are more widely supported by browsers and can be set to expire after a certain date.
If local storage is not available then non-persistent memory storage within the app is used instead.
If you are using multiple ADF apps, you might want to set the following configuration so that the apps have specific storages and are independent of others when setting and getting data from the local storage.
In order to achieve this, you will only need to set your app identifier under the storagePrefix
property of the app in your app.config.json
file.
"application": {
"storagePrefix": "ADF_Identifier",
"name": "Your app name",
"copyright": "Your copyright message"
}
Important note This identifier must be unique to the app to guarantee that it has its own storage.
The storagePrefix can allow you to login with multiple user in the same browser only if: - Or You don't use the implicit flow - Or You use implicit flow you use different AIMS instances for any app
© 2023 Alfresco Software, Inc. All Rights Reserved.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.