Arkatme
Arkatme2y ago

Set a cookie in GET and retrieve in POST

been tryinig to do this for a couple hours now. Basically I want a way to return the user to the previous page upon successful login. Currently I'm trying to set a cookie of "last_page" in GET and then reading it in POST when the user clicks Login.
3 Replies
ioB
ioB2y ago
This sounds like a good approach, what seems to be the problem?
porridgewithraisins
Typically this is done with query parameters. But cookies should work too
Arkatme
ArkatmeOP2y ago
Ended up using sessionStorage. That worked in the end.

Did you find this page helpful?