Skip to Content
0
Former Member
Oct 08, 2014 at 01:11 PM

Problem with get and set brower cookies.

79 Views

Hi

I need put (save) some temporary data to client site. And then I need read this dada.

I decide use Cookies.

I set data using:

WDR_TASK=>REQUEST->SET_COOKIE(
exporting
NAME = 'MYDATA'
VALUE = 'test value'
).


I read data using this ways:

CALL METHOD LO_REQUEST->IF_HTTP_ENTITY~GET_COOKIE
EXPORTING
NAME = 'MYDATA'
IMPORTING
VALUE = zCookies
.


wdr_task=>REQUEST->GET_COOKIE(
exporting
NAME = 'MYDATA'
importing
VALUE = zCookies
).


WDR_TASK=>REQUEST->GET_COOKIES(
changing
COOKIES = myCookies
).

When I use read and set in same method, I got data. But when I read data in different methods (or I use F5 - refresh browser) I don't get data from cookies.

How can I set/get data on client site?


Minor but important question:

Is possible read from client browser (computer) unique text/value (something with I can identify client)?


Thank you