Typically "Remember me on this computer" stores a hashed value of user identifier in browser cookie. I want to be able to remember the device even if cookies are cleared. We try to store in cache, window.event and even in local storage and DB (if HTML5 compliant). All of these are prone to getting cleared by the user. Is there a better technique to identifying a device without relying on these storages? Or better storages than the ones listed above?

有帮助吗?

解决方案

No, because a user's computer is totally their own and nothing you store there is safe. As a final resort, they can re-install the entire operating system.

Even IP addresses are insufficient due to all the network address translations that happen on the net.

Rather than trying for a technological solution, I simply rely on the cookie and place a subtle message somewhere that cookies are required if they want the "remember me" functionality.

A user knowledgable enough to get rid of cookies in the first case will probably know how to be selective.

其他提示

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top