Chrome for iOS user agent on iPad

后端 未结 1 599
轻奢々
轻奢々 2020-12-10 03:17

I have a web page that when viewed from an iOS device displays slightly different content. To detect the device in question the site looks for iPad;, iPo

相关标签:
1条回答
  • 2020-12-10 03:36

    The browser will switch between using the two User Agent strings based on whether you are acting as a mobile browser of masquerading as the desktop browser.

    User Agent:

    Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en-gb)
    AppleWebKit/534.46.0 (KHTML, like Gecko)
    CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3
    

    User Agent after "Request desktop version":

    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3)
    AppleWebKit/534.53.11 (KHTML, like Gecko)
    Version/5.1.3 Safari/534.53.10
    

    This is only a hint to the web server about who the client is. The browser should render the received web content independently of the User Agent.

    0 讨论(0)
提交回复
热议问题