How to anonymously identify a user and store that information

前端 未结 3 912
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-03 10:33

I need a simple user identification system for the purpose of allowing/prohibiting an action.

This is not a high-security requirement

3条回答
  •  一个人的身影
    2021-02-03 11:00

    MAC address would be awesome, but not possible over HTTP unfortunately (and a good thing for user privacy).

    Cookie and IP address are your only options.

    You can delete the cookie when you're done with it, only have it apply to the path that is relevant, or just have it expire in a few hours/days whatever is appropriate.

提交回复
热议问题