What is the difference between Session.Abandon() and Session.Clear()

前端 未结 10 952
陌清茗
陌清茗 2020-11-28 03:36

What is the difference between destroying a session and removing its values? Can you please provide an example demonstrating this?

I searched for this question, but

10条回答
  •  粉色の甜心
    2020-11-28 03:57

    When you Abandon() a Session, you (or rather the user) will get a new SessionId (on the next request). When you Clear() a Session, all stored values are removed, but the SessionId stays intact.

提交回复
热议问题