6 Replies Latest reply: May 4, 2012 7:35 AM by VC RSS

    Cookie not being saved when I exit browser

    HarryF
      I am using the following code to store/retrieve a cookie in APEX. I am experimenting with this on APEX.ORACLE.COM. This code works fine until I close the browser. Apparently the cookie does not get saved.

      Login page
      begin
      owa_util.mime_header('text/html', FALSE);
      owa_cookie.send(
      name => 'LOGIN_USERNAME_COOKIE'
      ,value => lower(:P101_USERNAME)
      ,expires => sysdate + 356
      );
      exception when others then null;
      end;

      front page
      declare
      c owa_cookie.cookie;
      v varchar2(255) := null;
      begin
      c := owa_cookie.get( 'LOGIN_USERNAME_COOKIE' );
      :G_COOKIE := lower( c.vals(1) );
      ---logon code
      end;