开发者

How to distinguish one mobile device from another by HTTP request

开发者 https://www.devze.com 2023-01-25 06:32 出处:网络
I have a web application that is accessed from mobile devices. I need to detect that some requests are made from one device while others from another. I don\'t necessarily need to know the unique devi

I have a web application that is accessed from mobile devices. I need to detect that some requests are made from one device while others from another. I don't necessarily need to know the unique devic开发者_Python百科e id or something like that, I just need to distinguish one device from another. I thought about using IP address, but I'm afraid that some carriers might have similar IPs for all devices in some region. Is there a common way of doing this? Thanks!


That's usually done with cookies with unique identifiers (session ID for example)


Yes, normaly wap gateways has few IP in each region. You can use cookies although it could cause some problems because many wap gateways doesn´t support. So you can use URL session ID.

Some carriers include in HTTP headers unique ID (some info). You should investigate this option too.

0

精彩评论

暂无评论...
验证码 换一张
取 消