Normally, you (or the language/framework you use) will set a cookie with a unique session id, then store the value in memory on the web server or in a database referencing this session id.
Then when the new request comes, the user agent (browser) will send the session id back to the server. You can then use it to look up the original value.