Repeated cookie query or Storing in viewstate? Which is the better practice?

前端 未结 4 541
旧时难觅i
旧时难觅i 2021-01-23 18:37

I have a internal website that users log into. This data is saved as a cookie. From there the users go on their merry way. Every so often the application(s) will query the au

4条回答
  •  北恋
    北恋 (楼主)
    2021-01-23 19:26

    Personally, I prefer using a session to store things, although the other developers here seem to think that's a no-no.

    There is one caveat: You may want to store the user's IP in the session and compare it to the user's current IP to help avoid session hijacking. Possibly someone else here has a better idea on how to prevent session hijacking.

提交回复
热议问题