Socialid.connectionStorage
(Difference between revisions)
Ivan.filho (Talk | contribs) (→Parameters) |
Ivan.filho (Talk | contribs) (→Parameters) |
||
Line 34: | Line 34: | ||
| width="200px" | optional | | width="200px" | optional | ||
| If the cookie will be delivered for TLS requests only. Default value based on current page protocol. | | If the cookie will be delivered for TLS requests only. Default value based on current page protocol. | ||
+ | |+ | ||
+ | ! align="left" width="200px" | expires | ||
+ | | width="200px" | optional | ||
+ | | The expiration time (in days) of the cookie. Default: null (session expiration). | ||
|} | |} | ||
Revision as of 17:32, 12 November 2020
Description
Module to manage the Connection Storage behaviour.
There are 4 types you can set the Connection Storage:
- none: the Connection ID value will not be storaged, all the management will be directly did from the server-side.
- cookie: the Connection ID value will be storaged at the browser as a Cookie.
- localStorage: the Connection ID value will be saved as a Local Storage item.
- sessionStorage: the Connection ID value will be saved as a Session Storage item.
To configure this module, use init function passing the desired parameters as listed below.
Parameters
type | optional | Define how the Connection ID value will be stored at the browser. (see the description above). Can be "none", "cookie", "localStorage" or "sessionStorage". Default for Safari browser: "cookie". Default for other browsers: "none". | name | optional | Name of the cookie or the storage item. Default: "sidConnectionId". | path | optional | Path where the cookie will be saved. Default: "/". | sameSite | optional | SameSite behaviour for the cookie. Default: "Lax". | secure | optional | If the cookie will be delivered for TLS requests only. Default value based on current page protocol. | expires | optional | The expiration time (in days) of the cookie. Default: null (session expiration). |
---|
Example
socialid.connectionStorage.init({ type: "cookie", sameSite: "None", secure: true });