标识请求的响应的装置 [英] Identifying the device requesting a response
问题描述
是否有可能为一个Web服务器知道哪些类型的设备请求的已经从收到?
Is it possible for a web server to know which type of device request has been received from?
例如,可以在创建一个网站,显示不同的内容,如果要求从一台计算机(火狐)和不同的东西出来,如果它从iPhone来了?
For example, can a create a website which shows different contents if request came from a computer (Firefox) and something different if it came from iPhone?
推荐答案
的方式是用户代理头,我们已说过。你最好使用像这个来找出哪些手机是它。
The way is the User Agent header, as has been said. You best use a list like this one to find out which mobile is it.
当我不得不做类似的东西我存储在接收到的未知用户代理在表后约我没有已存储的那些找出,因此无法确切知道该怎么发球。
When I had to do something like it I stored the unknown received User Agents in a table to find out later about the ones I didn't have stored and thus wasn't able to know for sure what to serve.
这篇关于标识请求的响应的装置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!