How does IsMobileDevice work?

前端 未结 7 1345
情话喂你
情话喂你 2020-11-28 11:01

MSDN makes it sound so easy to detect a mobile browser:

if (Request.Browser[\"IsMobileDevice\"] == \"true\" ) 
{
    Response.Redirect(\"MobileDefault.aspx\"         


        
7条回答
  •  清歌不尽
    2020-11-28 11:23

    I wouldn't rely on the MSDN link, there is no common standard unfortunately for mobile browsers and many try to mimic their non-mobile counterparts. Also it will return true if it doesn't recognize. See this link.

提交回复
热议问题