Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

WSETCOOKIE

The WSETCOOKIE subroutine will set a cookie to be sent back to the browser.

COMMAND SYNTAX

CALL WSETCOOKIE(NAME,VALUE,EXP.DATE,EXP.TIME,PATH,DOMAIN,SECURE)

SYNTAX ELEMENTS

NAME Name of the cookie you want to set
VALUE Value you wish to set the cookie to
EXPDATE Date you wish the cookie to expire on.  Use pick internal dates.
EXPTIME Time you wish the cookie to expire (used with EXPDATE).  Use pick internal times.
PATH Path you wish the cookie to apply to.  Use "/" for all.
DOMAIN Domain you wish the cookie to apply to.  Use "." for domain called from.
SECURE If set to "Y" then this cookie will only save on HTTPS requests.

EXAMPLE

CALL WSETCOOKIE("mycookie","value",DATE(),TIME+300,"/",".","Y")

NOTES

The WSETCOOKIE command basically builds a Set-Cookie header.  This function properly formats the Set-Cookie for you and understands pick date and time formats.  If you wish more control you can use the WSETHEADER and build your own Set-Cookie line. 

Here is a good link on how Set-Cookie works.

Was this article helpful?