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

jneusteter
Shopify Partner
4 0 4

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.

Reply 1 (1)

Stacy_Zhuk
Shopify Partner
386 20 55

Hello @jneusteter,

 

This can be simply a Shopify bug - https://community.shopify.com/c/hydrogen-headless-and-storefront/issue-with-excessive-cookies-leadin... There is already a topic for that. 

 

Please, let me know if you need any assistance.

 

Regards,
Anastasia

Co-founder at Whidegroup, e-commerce development company from Ukraine
- 10+ years of experience with SMBs
- Deep expertise in custom development & optimization
E-mail: anastasia@whidegroup.com