Answer the question
In order to leave comments, you need to log in
How can I work with cookies in the form of a list?
Tell me, who knows how to operate on a field in cookies, as if it were a list.
The first thing that comes to mind is to split the cookie value string by commas, for example, translate it into a list, do the necessary operations, then join it as a string and write it back to cookies.
Maybe someone knows the built-in, ready-made solutions?
Task: add id of recently viewed products to the cookie line, etc.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question