Persist an object even after session gets expire

Viewed 60

I'm currently working on a POC in which I need to persist a unique object for each request. My application post a form on some other site and wait for the response from that site on my response handler. So I want to get that unique object on my response handler too.

I have tried of Session but what if session gets expired.

1 Answers

Store the object in DB and store the DB identifier in the cookie. Then you will have the DB identifier on every request. Also send this identifier to the other site and when you get it back you know what to process.

Instead of cookie you can also store the data in the browser storage if cookie is disabled.

Related