Persistent sessions (Remember Me)
WebSphere Commerce can be configured to enable persistent sessions, meaning that some session-related information of the registered or guest user will be stored as permanent cookies. If persistent sessions are enabled, a customer at a WebSphere Commerce store will be recognized on subsequent visits to the store, even after closing the browser. Sessions can be persisted for both guest and registered users. Persistent sessions are disabled by default. If enabled, sessions are by default persisted for 30 days.Persistent sessions increase the ability of the store to monitor customer activities:
- Analytic tools can correlate shopping activities that span multiple sessions, even if the user does not register.
- Marketing experimentation can contain data from multiple sessions including the sessions of guest customers.
Persistent sessions enhance the shopping experience:
- It is easier for a customer to resume his or her existing shopping experience.
- It is the only way for a guest customer to retrieve the pending shopping carts from a previous session.
When persistent sessions are enabled and the customer has elected to be remembered by clicking the Remember Me check box on the logon or registration page, then the customer can view the following information:
Customer type Can view Cannot view Guest user
- the pending shopping cart from previous sessions
- order history
- previous shipping and billing addresses
Registered user
Registered customers are prompted to log on before they can view sensitive information.
- the pending shopping cart from previous sessions
- coupons
- promotions
- eligible contracts
- addresses
The customer must be accessing the store from the same computer that he or she used to create the persistent session.
Customers can choose not to be remembered by clearing the Remember
Me check box. In this case, their information will not persist into the
next session.
By default, the Logoff command deletes the persistent session. However, if rememberMe=true is passed to the Logoff command then the registered user will be logged off but remembered. The session will persist, and the registered user will be able to view the shopping cart but not other information such as order history or addresses. To view this sensitive information the customer will need to log on to the store.
Consider the following examples:
Example 1: The site has enabled the Remember Me feature. A registered user performs the following actions:
Example 2: A site with multiple stores, S1 and S2, has enabled the Remember Me feature. A registered customer performs the following actions:
The shopping cart persists for both stores.
If on a subsequent visit, the registered user clears the Remember Me check box on the My Account page of store S1, the shopping cart for store S2 will continue to persist, but the shopping cart for store S1 will not.
For an example of persistent session implementation, see the Consumer direct starter store provided with WebSphere Commerce. Refer to the Logon and Registration JSP pages provided with the consumer direct starter store for an example of the Remember Me check box.