We have react based application where we use cookie to store user's sessionid specifically, we stored big list of users rights in the cookie also which are used for specific purpose for front end validation (and sure api is also validating in backend side). As the user's rights list grow up, we get to know about the limitation of cookie size (we are learning and implementing things --- noobs), so now we have stopped storing user's rights in cookie now.
But now we have one issue, the cookie size issue is coming with message of either the blank page of the system or with server message 400 Bad Request - request header or cookie too large. Though we have remove storing unnecessary info in cookies now, the previously stored cookies in browser has been giving the problem. So is there any way we can deal with this issue ? Can we remove the unnecessary cookies from previous sessions through code level or any other ideas around ? Ideas/feedback appreciated. Thanks