Utilizing angular's cookie library, I have successfully set a cookie to store the id and passcode of a shopping cart on the backend. However, despite setting the expiration date to a past time in order to expire the cookie once the cart is purchased, I am facing an issue where the cart is still being loaded with the same passcode and id when revisiting the original buy page. I have double-checked that the cookie is indeed gone. Does anyone have any insights into how this might be happening? I have included the code snippet below.
Code in buy page:
$cookies.put('scId', injectedScId);
Code in order receipt page:
$cookies.put("scId", "expired", [{ expires:"Thu, 01 Jan 1970 00:00:01 GMT" }] );
$cookies.put("scPc", "expired", [{ expires:"Thu, 01 Jan 1970 00:00:01 GMT" }] );