is it possible to get a unique identification number from a mobile device?

♀尐吖头ヾ 提交于 2019-12-02 22:04:00

Well after further research, the answer is: No, it's not possible right now to get a mobile device id number from its browser...

A solution I found is to generate a "unique" number (in my case I worked with php, so I used the session_id() number mixed with a number generated with the rand() function, it ends up being a quite big number that will hardly occur twice...) and then store it in a cookie that never expires.

It's not a perfect solution, as it will not work if cookies are disabled or if the user clears his cookies, but actually after using it for sometimes now, it turns out that it is working quite well, mobile device mostly have cookies enabled, and the users don't seem to clear them often...

Also (depending of your application) if you store an email or a username and then associate it with this "unique" number into a database, you can even recover someone's identity and store a new cookie by asking him his username or email again...

Hope this will help some people!

chickenchilli

Sam Greenhalgh just found a way of setting a device ID via "Super Cookie":

http://www.radicalresearch.co.uk/lab/hstssupercookies (broken link)

I know this is old - but I found this and wanted to share my thoughts on the OP's next best thing using GUID type numbers.

Unless you need the security of a HUGE non-guessable identifier - it makes more sense for the server to create a simple counter instead - e.g start at ~100 and for every visitor that doesn't already have your cookie use max(counter) + 1 to create their new cookie.

Now you have a very short and 100% unique identifier that you can store for both client and server.

Also, as you mention storing an email address is also useful, in theory the email address should be unique - not only that - it is cross browser compatible. i.e their cookie exists on one browser - but when going to a new browser, if they enter the same email address you can map to their original connection profile.

Although you mention this and its true, it is also important to note that anyone putting in dodgy data e.g. anon@anon.com will likely be loaded up with another users history. i.e in your case - a brand new user putting in anon@anon.com will not get to see the intro pages.

In some countries carriers include some id in http headers when consumer is browsing through WAP gateways. There is some aggregators with APIs for consumer identification, normaly it works only when consumer is browsing through WAP gateways too.

I'm doing something similar but for a HTML local page for stocking ids in localstorage and eventually update to server: - taking the date in epoch ms - and then replace the leading number with a random number (foolish hope to limit the size of the number) Somehow I think mobile are more likely to be on time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!