How to save users sessions with VueJS?

后端 未结 2 1702
广开言路
广开言路 2020-12-14 19:16

I am trying to figure out how to save users session when they log out. e.g. multiple shopping carts, transactions, and even previous searches. I am pretty new to the whole b

2条回答
  •  借酒劲吻你
    2020-12-14 20:22

    You need to either store the session in a cookie or on the server.

    vue-cookie would be a good component to use for browser storage.

    if you're storing on the server you need to create an endpoint for the data and store it in some fashion; a database, cache file, redis, etc.

提交回复
热议问题