Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: owa_cookie.remove doesn't work !

Re: owa_cookie.remove doesn't work !

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 9 Oct 2001 13:02:23 -0700
Message-ID: <9pvl4f024eb@drn.newsguy.com>


In article <e4ed71f5.0110090856.50b3a1a2_at_posting.google.com>, nutron2000_at_yahoo.com says...
>
>hi!
>how can i remove the cookie and reset its value?
>this is what i did but it does not work. any suggestions?
>
>i set cookie like this
>
>owa_util.mime_header('text/html',FALSE);
>owa_cookie.send('mycookie',to_char(5));
>owa_util.http_header_close;
>
>to retrive the cookie value,
>
>l_mycookie owa_cookie.cookie;
>l_mycookie := owa_cookie.get('mycookie');
>if l_mycookie.num_vals > 0 then
> value_of_cookie := l_mycookie.vals(1);
>end if;
>
>later to remove the cookie,
>owa_util.mime_header('text/html',FALSE);
>owa_cookie.remove('mycookie',to_char(5));
>owa_util.http_header_close;
>
>now, after this point i expect that mycookie's value array is zero.
>but, if i retirve mycookie again and read the value,i see that
>its array size is still 1 and its holding the value 5 !
>
>what am i doing wrong?
>
>thanks.
>nutron.

It removes it from the client -- it won't be sent back to the client.

It just just like when you "create" the cookie by sending it - your session doesn't "see" that cookie. You have to go back to the browser and get another page to "see" the cookie.

When you remove it -- it tells the client to remove it. That cookie is still there in that procedure that initiated the remove. the next procedure won't get it.

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Tue Oct 09 2001 - 15:02:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US