Issue with Excessive Cookies Leading to "Cookie Too Large" Error on Shopify Storefront API

We have noticed that for each purchase made through our store, Shopify appends a “checkout_session_token__cn__*” cookie. The accumulation of these cookies eventually leads to a “Cookie Too Large” error. We can clear the cookies, but it just starts again until the error happens again.

It looks like the “checkout_session_token__cn__” cookies contain the history of purchases by that user. Even purchases that have been fully checked out.

We are using the Storefront API with the checkout url provided by the API.

I am hoping someone can point in the right direction on how to resolve this.

2 Likes

Hello @jneusteter ,

This can be simply a Shopify bug - https://community.shopify.com/c/hydrogen-headless-and-storefront/issue-with-excessive-cookies-leading-to-quot-cookie-too-large/m-p/2417765 There is already a topic for that.

Please, let me know if you need any assistance.

Regards,
Anastasia