Is It Possible To Get A Unique Identification Number From A Mobile Device?
I am currently working on mobile device web applications, and I was wondering if there is some sort of unique id number per device that could be detected via the browser.
The purpose would be to store this number in order to recognize people who already visited the site.
I was working with bluetooth quite a lot, and there some sort of mac address you can store when you detect a device, and I was using this as Id number, so that's my question, is there a general ID number I can detect from the browser...?
Thanks.
Answer
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!
Related Questions
- → How do I determine if a new ReactJS session and/or Browser session has started?
- → Browser support for class syntax in Javascript
- → Inline JS callback syntax Vs Internal JS callback syntax
- → Browserify api: how to pass advanced option to script
- → requiring RX.js in node.js
- → Can Cookies be securely sent from one machine to another to access a resource
- → React - Unhandled Error Event on react.render()
- → Visual Studio 2012 Express: Browser returning 500 status trying to download jsx file
- → While debugging, can I have access to the Redux store from the browser console?
- → "Uncaught SyntaxError: Unexpected token { " using Reactify
- → How to edit the index page of wordpress theme?
- → Roles and responsibilties inherited in this browser object's hierarchy
- → Uncaught ReferenceError: Parent is not defined