Flask client-side sessions

前端 未结 1 2004
情深已故
情深已故 2021-01-24 06:44

Starting to learn Python\'s Flask web app framework, still on the learning curve, so please bear with me.

I am wondering how appropriate are the client-side sessions for

1条回答
  •  执念已碎
    2021-01-24 07:18

    • I don't think you have to worry about the size as a cookie can't store more than 4KB of data anyway. I highly doubt you'll get anywhere close to that easily.

    • It's just as secure as other sessions, as in you can probably take the PHPSESSID cookie to some other browser and have it work just as you can do it with this. Nothing prevents it. However there are workarounds this issue, you can have it expire after a time limit. See this question for example. It has useful answers regarding this issue.

    You can always use a database session if you so desire. I'm sure there are other implementations you can find too.

    Edit: Here are some others.

    0 讨论(0)
提交回复
热议问题