Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
SpeedScript : WebSpeed API functions : Passing information between Web requests : Cookies
 
Cookies
Cookies allow you to pass information as part of the Web page HTTP header and are one of the commonly used techniques for identifying users of a Web site. In fact, WebSpeed transactions actually depend on a form of cookie passing supported by the WebSpeed agent control program (web-disp.p) and the broker.
The following table lists the API functions that support cookie passing.
Table 4. Cookie-passing API functions
Function
Return type
Description
delete-cookie
CHARACTER
Deletes the cookie specified by its name, URL path, and Internet domain.
get-cookie
CHARACTER
Given a cookie name, returns one or more matching values delimited by the value of the WebSpeed global variable, SelDelim (comma, by default). If the cookie name is the Unknown value (?), returns a list of all the cookie names.
set-cookie
CHARACTER
Outputs an HTTP Set-Cookie header with specified options, and returns the specified cookie value.
The definitions for these functions reside in install-path/src/web/method/cookies.i.
You must invoke the delete-cookie and set-cookie functions within the output-header method procedure of a Web object. In embedded SpeedScript Web objects, you must include the output-header procedure definition in a statement escape tag. For SpeedScript-generating and HTML-mapping Web objects, WebSpeed provides standard output-header procedure definitions that you can modify in the WebSpeed Editor.