Changing session management settings in the WebSphere Commerce configuration file (wc-server.xml)
You can change various session management settings in the WebSphere Commerce configuration file. For example, if you set the expiration time you can change the tracking behavior of the referral cookie. The referral cookie is used for marketing activities, to track the URL that referred the customer to the WebSphere Commerce site. That is, it tracks the URL that was displayed in the customer's browser immediately before navigating to the WebSphere Commerce site.
Procedure
- Open the WebSphere Commerce configuration file.
-
Search for the
<SessionManagement>
block. For example,<SessionManagement> <url-rewriting display="false" enabled="false"/> <cookie acceptance="false" age="-1" display="false" domain="" enabled="true" path="/" persistence="wcs"/> <referrerCookie age="-1"/> <PersistentSession cookieExpiry="30" delayNewPersistentGuestSession="true" display="false" enable="true"/> <PersonalizationId display="false" enable="true"/> </SessionManagement>
Where:- url-rewriting
- For more information, see Using URL rewriting for session management.
- cookie
- See Using cookies for session management
- referrerCookie
-
- age
- (Integer) The age value is in seconds. If the value specified is invalid, the default value is used. The default value is -1.
- The possible values are:
- A positive value, indicating that the cookie expires
after the specified number of seconds have passed. The
value represents the maximum age for the cookie to expire,
not the cookie's current age.Note: Setting the value to 1209600 indicates that the cookie expires after two weeks, maintaining its previous default behavior in WebSphere Commerce.
- A negative value, indicating that the cookie is not stored persistently and will be deleted when the Web browser exits.
- A value of 0, indicating that the cookie will be deleted.
- A positive value, indicating that the cookie expires
after the specified number of seconds have passed. The
value represents the maximum age for the cookie to expire,
not the cookie's current age.
- PersistentSession
- cookieExpiry
- The number of days until the cookie expires.
- cookieExpiryGuest
- The number of days until a cookie for a guest user expires. By default, the guest cookie is not defined, and cookieExpiry is used for both registered and guest users. By defining cookieExpiryGuest, the parameter is restricted to guest users, and the guest user receives a different expiry date than a registered user.
- delayNewPersistentGuestSession
- Used to delay creating a guest session for a "remember me" user. By default, this parameter is enabled (true) and a new guest session is not created until an action cannot be performed as a partially authenticated user.
- enable
- Whether persistent sessions are enabled.
- PersonalizationId
- For more information, see Enabling personalization ID.
- Edit the values as appropriate.
- Propagate the changes to the WebSphere Commerce configuration file.