How to detect the stock Android browser

前端 未结 14 1917
不思量自难忘°
不思量自难忘° 2020-12-08 01:52

Navigating to http://whatsmyuseragent.com/ shows me my stock Android browser on my Galaxy Nexus running 4.2.1 has the user agent

Mozilla/5.0 (X11; Linux x86_         


        
14条回答
  •  再見小時候
    2020-12-08 02:39

    As of right now there is no true method to detect this. I am currently on Android 4.2.2 stock Galaxy S4 AT&T and the default browser now has Chrome in the user-agent (but still has the TouchWiz issues of position fixed)

    Until Samsung can either a) fix touchwiz or b) remove chrome from the ua string, we have no true method of detecting the android default browser. I cannot say if this is the case for all 4.2x + phones but this is a big issue for developing teams requiring manufacture/browser specific queries.

    I am apart of an active developing team for mobile-end web-apps and it seems TouchWiz causes a lot of issues for different aspects being developed.

    Another issue is there are companies like Dolphin (great browser, terrible UA) which in all these cases would pop back as the default browser since it doesn't provide a "dolphin" string and uses AppleWebKit534x


    Also regarding the U in the user-agent string it had nothing to do with what browser. Infact this has to do with the encryption method being used for each browser (usually standard based on location)

    "Web browsers created in the United States, such as Netscape Navigator and Internet Explorer, use the letters U, I, and N to specify the encryption strength in the user agent string. Until 1996, when the United States government disallowed encryption with keys longer than 40 bits to be exported, vendors shipped various browser versions with different encryption strengths. "U" stands for "USA" (for the version with 128-bit encryption), "I" stands for "International" — the browser has 40-bit encryption and can be used anywhere in the world — and "N" stands (de facto) for "None" (no encryption).[10] Following the lifting of export restrictions, most vendors supported 256-bit encryption."

    Source: http://en.wikipedia.org/wiki/User_agent#Encryption_strength_notations

提交回复
热议问题