user selected and inserted some items into the cart I want my cart values to remain as it is if the page gets refreshed.
I'm using localStorage api for this. But I don't know if it's secure or not 'cause everyone can easily change what's in the cart and modify it by using developers tools.
Is there any other ways to do it?
fuck js, use django
You should only store references to your product. For example: User A has added 2 of item B and two of item C So you only save the id of the item and the quantity, then use the ids on the backend
Обсуждают сегодня