I have a add button which adds product id to the cart, which is handled by adding product id to the cookie separated by a pipe. Now on the cart page i have a remove button which should delete that particular product id from the cart which means the product id should be deleted from the cookie.
Ex: cookie value '22343|66562|88767'
when i cilck remove button on id 22343, the updated cookie value should be '66562|88767'
How can i achieve this using javascript.