如何通过 HTTP 请求区分一台移动设备

发布于 2024-10-02 17:36:17 字数 162 浏览 1 评论 0原文

我有一个可以从移动设备访问的 Web 应用程序。我需要检测某些请求是从一台设备发出的,而另一些请求是从另一台设备发出的。我不一定需要知道唯一的设备 ID 或类似的信息,我只需要区分一个设备与另一个设备。我考虑过使用IP地址,但我担心某些运营商可能对某些地区的所有设备使用相似的IP。有这样做的通用方法吗?谢谢!

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 device 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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

半衾梦 2024-10-09 17:36:17

这通常是通过具有唯一标识符(例如会话 ID)的 cookie 来完成的

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

手心的海 2024-10-09 17:36:17

是的,通常wap网关在每个地区都有很少的IP。您可以使用 cookie,但它可能会导致一些问题,因为许多 wap 网关不支持。所以你可以使用 URL 会话 ID。

某些运营商在 HTTP 标头中包含唯一 ID(一些信息)。您也应该研究这个选项。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文