开发者

How to know the browser the user is using?

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开发者_Python百科 is using? Also is it possible to know the ip address of the user in GAE or AWS?

Thanks in advance.


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜