@aknevrnky There are a few ways to store guest user data that may be more appropriate for your use case:
-
Database storage: Instead of storing data in cookies, you can store the data in a database. This will allow you to store more data and avoid any issues with cookie size limits. You can use a unique identifier, such as a session ID, to link the data to a specific guest user.
-
Local storage: Another option is to use local storage, which is similar to cookies but can store more data. Local storage data is stored in the browser, so it's not sent with each request, which can help to improve performance.
-
Server-side session: A server-side session is another option for storing guest user data. It's similar to database storage, but the data is stored on the server, rather than in a database. This can be more secure than storing data in a cookie or local storage, as the data is not accessible from the client-side.
-
Using a third-party service: You could use a third-party service such as Firebase or AWS to store the data. This will allow you to easily scale and handle large amounts of data.
Ultimately, the best solution will depend on the specific requirements of your e-commerce project, and the trade-offs between security, scalability, and performance that you're willing to make.