deleting session cookie in speedscript

bino

Member
Hi all,

I am trying to provide a means to logout and delete a session cookie on our web site. I have read through Progress documents and knowledge base, but no matter what Ive tried, the session ccokie is not getting deleted

basically a user click a link to logout which jumps to a logout html file. here is the base of the speedscript statement.
<Script Language=Speedscript>
def var v-logout-mess as char no-undo.

/* check for cookie id and delete cookie */
if get-cookie("sessID") ne ""
then do:
PROCEDURE Output-Header:
delete-cookie("sessID", ?, ?).
end.
</script>

by the way, here is how i set the cookie
set-cookie("sessID", string(v-sess-id),?,?,?,?,?).

where v-sess-id is a variable value for the cookie.

Any suggestions are appreciated.
 
bino said:
Hi all,

I am trying to provide a means to logout and delete a session cookie on our web site. I have read through Progress documents and knowledge base, but no matter what Ive tried, the session ccokie is not getting deleted

basically a user click a link to logout which jumps to a logout html file. here is the base of the speedscript statement.
<Script Language=Speedscript>
def var v-logout-mess as char no-undo.

/* check for cookie id and delete cookie */
if get-cookie("sessID") ne ""
then do:
PROCEDURE Output-Header:
delete-cookie("sessID", ?, ?).
end.
</script>

by the way, here is how i set the cookie
set-cookie("sessID", string(v-sess-id),?,?,?,?,?).

where v-sess-id is a variable value for the cookie.

Any suggestions are appreciated.
over write the cookie with a cookie set to expire some time in the past

eg

SetCookie("sessID", string(v-sess-id), today - 1, time, ?, ?, ?).
 
as long as its set before the : output-content-type ("text/html":U).it should be fine.

use: delete-cookie(cookie-name,path,domain).

this sets the cookie expiry date to the past.. 1991 or something from memory.
 
Back
Top