suve

Declaration

NIL :http-cookie ( string $NAME , string $VALUE )

Summary

:!: Available only in CGI mode.
Outside CGI mode, cookies can be sent to the client by printing appropriate headers using
:writeln calls.

Adds a new HTTP Cookie with given name and value. Currently there is no way to alter the value of a cookie already set, or to destroy one.

Remember that, since cookies are sent via HTTP headers, and headers must be sent before page content, all calls to this function must be performed before any actual output.

Example

# Cookie example - website using cookies to count unique visitors.
!if :not :cookie-is s'visit'
    :http-cookie s'visit' s'YES'
    :visit-counter-increase
    !fi

wikipage modified on 2014/0601/2317