如何知道用户使用的浏览器?

发布于 2024-09-28 19:46:53 字数 252 浏览 1 评论 0原文

我们已经开始开发位置感知紧急服务的应用程序。用户可以通过电脑、智能手机甚至WAP连接。我们想要使用云服务器(GAE 或 AWS)。我们希望针对用户的设备优化网站。

我无法确切地知道如何知道用户正在使用的设备或浏览器。从apache中,通过分析浏览器请求,我们可以知道浏览器类型。但如何在 GAE 或 AWS 等云服务器中学习这一点呢?有没有其他方法可以了解用户正在使用哪种浏览器或设备?另外是否可以知道 GAE 或 AWS 中用户的 IP 地址?

提前致谢。

We have started developing an application for location aware emergency service. The users can connect through computer,smart phone or even through WAP. We want to use cloud servers (GAE or AWS). We want to optimize the site for the user's device.

I can not find out exactly how to know the device or the browser the user is using. From apache, by analyzing browser request, we could know the browser type. But how to learn that in Cloud servers like GAE or AWS? Is there any other way to learn which browser or device the user is using? Also is it possible to know the ip address of the user in GAE or AWS?

Thanks in advance.

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

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

发布评论

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

评论(1

黑色毁心梦 2024-10-05 19:46:53

我没有在云中编程的经验,但请求标头(其中 USER_AGENT)来自客户端,并且应该照常出现。

对于 GAE / Python,答案就在这个问题中:User-Agent in Google App引擎 python

对于 GAE / Java, 中有提示GAE 文档。 必须有一个包含所有标头的请求对象。

I have no experience with programming in the cloud, but the request headers (among them USER_AGENT) come from the client and should be present as usual.

For GAE / Python, the answer is in this question: User-Agent in Google App Engine python

For GAE / Java, a hint is in the GAE docs. There must be a request object containing all the headers.

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