You can create, delete and view browser cookies within PLSQL using an Oracle Web Agent (OWA) package called "owa_cookie".
This package can be used within APEX if required.
BEGIN
owa_util.mime_header('text/html', FALSE);
-- Create a cookie
owa_cookie.send(
name=>'MyCookie1',
value=>'value1',
expires=> sysdate+1,
path=>'/');
-- This cookie specifies a domain
owa_cookie.send(
name=>'MyCookie2',
value=>'value2',
expires=> sysdate+1,
path=>'/',
domain=>'example.com');
owa_util.http_header_close;
EXCEPTION
WHEN OTHERS THEN NULL;
END;
owa_cookie.remove(
name=>'MyCookie1',
value=>NULL);
DECLARE
MyCookie OWA_COOKIE.COOKIE;
MyValue VARCHAR2(50);
BEGIN
-- Read cookie into cookie record
MyCookie := OWA_COOKIE.GET('MyCookie1');
-- Extract value from cookie record
MyValue := MyCookie.VALS(1);
END;