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:

Persistent sessions enhance the shopping experience:

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


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.

 

Remembered users

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:

  1. Logs on to a store and checks the Remember Me check box.

  2. Adds items to the shopping cart.

  3. Logs off from the store.

  4. The rememberMe=true parameter is passed to the Logoff command, and the user will be logged off but the session will be persisted.

Example 2: A site with multiple stores, S1 and S2, has enabled the Remember Me feature. A registered customer performs the following actions:

  1. Logs on to store S1 and checks the Remember Me check box.

  2. Adds items to the shopping cart in the S1 store.

  3. Adds items to the shopping cart in the S2 store.

  4. Closes the browser.

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.

 

Related Concepts


Personalization ID
Web activities
Users
Consumer direct starter store
Dynamic caching considerations for persistent session

 

Related tasks


Enabling persistent sessions globally
Enabling persistent sessions in a single store
Enabling personalization ID
Disable personalization ID