I just wonder that some websites such as banking website and insurance website, have histories of my device.
When I try to sign-in, they ask me "Do you want to save this device as 'mine' or 'temp using'".
I am guessing that javascript has that functions or cookies.
Please share some information that you know about it.
Thank you.
答案 0 :(得分:0)
To get all informations just print Navigator object:
console.log(window.navigator)
答案 1 :(得分:0)
There are multiple ways that you can save device/client specific information. One of those ways is cookies, as you mentioned. There are a couple different options that are frequently used as well:
There are other libraries out there such as PouchDb that leverages the above technologies and takes it further to give more of a 'database-like' experience on the front end (client side).
Systems that are saving device specific information are typically capturing your user agent (or something similar) and storing it with some type of authentication token (https://jwt.io/) that might live in one of the above storage locations. When you revisit that site, they may check one of those storage locations to see if you have an auth token of some sort and match that token up with your saved info on the server. Essentially, it's really just a little bit of info saved on your side and a little bit of info saved on their side.
If you're using Chrome, you can open the develop tools and navigate to the 'Application' Tab. There, you can see all the storage locations and all the different stuff websites store in your browser. You can also manually remove those things from storage and revisit the site to get a 'reset experience'