Is it advisable to use cookies for an online cart?

0

Is it advisable to use cookies for an online cart? So far I am using session variables, but when I close the browser, both the session and the items I added to the cart are destroyed.

    
asked by Armando Bolaños 25.09.2017 в 17:42
source

1 answer

3

The problem with the use of cookies is that you can save up to 4kB of data, besides that I find that the information of what your customers want to buy should be stored persistently (even if they do not confirm the purchase at the end), since this can be useful for a later analysis.

I imagine that for a web application like yours there is a log in , in that case in my opinion a good solution would be:

  • Use session variables to manage the shopping cart of an anonymous user (who has not logged in and is simply visiting your website)

  • Once the sign in is done, save this data in a database.

answered by 25.09.2017 / 18:04
source