cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete client cookie in a stateless page

former_member186472
Participant
0 Kudos

Hi gurus, I am building a stateless page with log off action. I am using page with flow logic.

I have a logoff page to which application must navigate when user clicks on log off button. After log off, if user clicks back button, browser must prompt for login. Please suggest me

1. Which event to use for deleting browser cookie

2. And how to use response->delete_client_cookie to delete browser cookie

Best regards,

Siva

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Sivadurga Prasad Madhuranthakam,

The Internet Communication Framework (ICF) provides methods using the IF_HTTP_ENTITY interface for sending and receiving client-side cookies. This interface is implement in the classes CL_HTTP_REQUEST and CL_HTTP_RESPONSE (among others) from which the global objects
REQUEST and RESPONSE are derived. You use these methods to define client-side cookies and to read cookies sent with the HTTP request. You can control the lifetime of a client-side cookie. If you do not specify a valid expiration date, the client-side cookie is retained in memory and deleted when the browser is closed (temporary client-side cookie). If you wish to store the cookie on the client beyond a browser session, you must provide the cookie with a corresponding expiration date in the SET_COOKIE method. The cookie is then stored on the client hard drive (persistent client-side cookie). A cookie whose expiration date has passed will not be sent to the server. From the SAP Web Application Server, you can delete a client-side cookie. To do so, you use the method DELETE_COOKIE_AT_CLIENT belonging to the global object RESPONSE

For clarity, the cookies sent from the HTTP server to the HTTP client are referred to as client-side cookies.

Regards,

Adrian, Forro

SAP BC-BSP

former_member186472
Participant
0 Kudos

Adrian, thanks for your response......

Can you guide me with the steps to delete client cookie for achieving logout functionality. I mean when navigated to logout page, the browser back click must prompt for authentication...

Best regards,

Siva

Former Member
0 Kudos

Dear Siva,

For logoff functionality and exit URL example please check SBSPEXT_HTMLB / logoff.htm page.

Best regards,

Adrian

former_member186472
Participant
0 Kudos

Hi Adrian, thanks for the help.....

suggested logoff option is good for IE, but failing for Chrome browser....any suggestion for logoff option on Chrome browser...

Thanks in Advance

Best regards,

Siva

Former Member
0 Kudos

Dear Siva,

With SAP NetWeaver 7.02, 7.30 and 7.31, using Google Chrome is generally

supported. However, certain components are excepted from this release (see the

restrictions).

Google Chrome supported only by BSP Design2008 (Design Classic and Design 2003 does not support Chrome).

Best regards,

Adrian, Forro

SAP AG, BC-BSP

former_member186472
Participant
0 Kudos

Hi Adrian, as we are using a mobile device, this logoff page pop-up ( Yes or No dialog box) window is not showing up.

As soon as I have complete test details I will update.

Best regards,

Siva