Document Tree
Document Properties
Last Modified
Added to KB
Public Access
Doc Type
  • ICM 7.10
  • ICM 11
  • ICM 12



Short Description

sets a cookie

Table of Contents

Product Version


Product To Version


StatusNew Labels


<ISCOOKIE> is used to set a cookie in your system. A cookie is a message given to the web browser by the Intershop 7 system. A cookie allows you to store user-related information on the buyer's system, such as storefront preferences for a single buyer. Cookies can also be used to simplify the login procedure, so buyers don't have to type in their names and passwords each time they access the storefront. To accomplish this, the cookie would store a unique user ID on the buyer's system. After the cookie is stored, the browser returns it every time the buyer requests the URL of the issuing server.


name = "( {String} | {ISML expression} )"
value = "( {String} | {ISML expression} )"
[ comment = "( {String} | {ISML expression} )" ]
[ domain = "( {String} | {ISML expression} )" ]
[ path = "( {String} | {ISML expression} )" ]
[ maxAge = "( {String} | {ISML expression} )" ]
[ version = "( {String} | {ISML expression} )" ]
[ secure = "( on | off )" ]

You can use the following functions to retrieve additional data:

  • Use the getCookie() function to read the cookie sent back by the client.
  • Use the getCookie() function to return the value of a request header field of the current request.


The following example shows how to set a cookie that can be used later to identify a customer:

name = "UserID"
value = "#Buyer:UUID#"
comment = "your international customer ID"
domain = ""
path = "/acme"
maxAge = "10000"
version = "0"
secure = "on"

The following example shows how to use a cookie that has been sent with the current request.

<ISIF condition = "#isdefined(getCookie("UserID"))#">
  <ISREDIRECT location="#URL(Action('LoginPanel'))#">



This attribute is required.

name = string | ISML expression

Specifies a name for the cookie. Names starting with "$" are not allowed.


This attribute is required.

value = string | ISML expression

Specifies the value that should be stored by the cookie, e.g., a user ID.


This attribute is optional.

comment = string | ISML Expression

Allows you to document the intended use of the cookie. For example, if a cookie contains private information about a user, use the comment attribute to mark the cookie accordingly. The user can then inspect the information to decide whether to accept the cookie or not.


This attribute is optional.

domain = String | ISML Expression

Specifies the domain for which the cookie is valid. An explicitly specified domain must always start with a dot. If not specified, the browser will set the attribute domain to the domain that issues the cookie.


This attribute is optional.

path = String | ISML expression

Specifies the subset of URLs to which this cookie applies. Pages outside of that path cannot use the cookie.


This attribute is optional.

maxAge = String | ISML expression

Defines the lifetime of the cookie in seconds. After the specified time elapses, the buyer's browser can discard the cookie. A value of zero means the cookie can be discarded immediately.


This attribute is optional.

version = String | ISML expression

Identifies the version of the specification which the cookie conforms to. The default value is 0.


This attribute is optional.

secure = on | off

The secure attribute is a flag indicating that a cookie should only be used with a secure server, such as SSL. Default value is off.

Reference - ISML Tags

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to if you experience login issues,
or if you want to register as customer.