jacob-ebey / remix-ecommerce

ABANDONED
503 stars 87 forks source link

Cookie length will exceed browser maximum #9

Open binajmen opened 2 years ago

binajmen commented 2 years ago

Hello :)

Sooo, I was inspired by your way of dealing with the cart in a cookie. I implemented something quite similar in my project. But I recently hit a cookie limit:

Error: Cookie length will exceed browser maximum. Length: 4262 bytes

There's a reason why the cookie is so "big": I'm storing an array of { id, quantity }. It seems cookies are not the right place when handling requests from a shop-addict.. 😅

What would be the right alternative ?

FYI, I wanted to test your project to test the same scenario, but I hit a different issue:

Screenshot 2022-06-21 at 09 01 02
jacob-ebey commented 11 months ago

Please check out the Hydrogen project for Remix ecomm best practices. I am not maintaining this and will probably never look at this repo again.