{"id":266160,"date":"2024-12-07T13:36:22","date_gmt":"2024-12-07T13:36:22","guid":{"rendered":"https:\/\/michigandigitalnews.com\/index.php\/2024\/12\/07\/user-agent-reduction-on-android-webview\/"},"modified":"2025-06-25T17:10:13","modified_gmt":"2025-06-25T17:10:13","slug":"user-agent-reduction-on-android-webview","status":"publish","type":"post","link":"https:\/\/michigandigitalnews.com\/index.php\/2024\/12\/07\/user-agent-reduction-on-android-webview\/","title":{"rendered":"User-Agent Reduction on Android WebView"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div>\n<div>\n<meta content=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg0MVh_bJgcw0FmQxOxWhDXa9HtSap2_XhOtgl3lW2aMN75fxs1Eg4j5UxZTx4TjbvHaOUkpkO80ClKladrbF-Os9Zg-_fv71RkHacBblIALAuAiHINQuiZEXOet471dNMqPHy7FgZcHcOG8uGgFP66w_CJ28eZbe4uLuvOB9ivGJHOSfAVJF0BFbKXPL8\/s1600\/Embedded-Media-and-Privacy%20%281%29.png\" name=\"twitter:image\"\/><br \/>\n<img decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg0MVh_bJgcw0FmQxOxWhDXa9HtSap2_XhOtgl3lW2aMN75fxs1Eg4j5UxZTx4TjbvHaOUkpkO80ClKladrbF-Os9Zg-_fv71RkHacBblIALAuAiHINQuiZEXOet471dNMqPHy7FgZcHcOG8uGgFP66w_CJ28eZbe4uLuvOB9ivGJHOSfAVJF0BFbKXPL8\/s1600\/Embedded-Media-and-Privacy%20%281%29.png\" style=\"display: none;\"\/><\/p>\n<p><em>Posted by Mike Taylor (Privacy Sandbox), and Mihai C\u00eerl\u0103naru (Web on Android)<\/em><\/p>\n<p><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgM8Q-ylwgpNWRJtnoOukb5OuXda374tCfol2i6mOZ8TcaupEdFxvOQ3HQJcjnarbMKRwMAyK4GXiwYWZ-lad_ZvMpHLqQ9fDuUcqm75tVZ2qLNqWcxcH_KxtGXho2A10nlqqMGo6Nu0G_6owR8RUIxoEohkukA6slv7kH6-QSDJg-YQnTWmZJLU1Iprj4\/s1600\/Embedded-Media-and-privacy.png\"><img decoding=\"async\" border=\"0\" data-original-height=\"800\" data-original-width=\"100%\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgM8Q-ylwgpNWRJtnoOukb5OuXda374tCfol2i6mOZ8TcaupEdFxvOQ3HQJcjnarbMKRwMAyK4GXiwYWZ-lad_ZvMpHLqQ9fDuUcqm75tVZ2qLNqWcxcH_KxtGXho2A10nlqqMGo6Nu0G_6owR8RUIxoEohkukA6slv7kH6-QSDJg-YQnTWmZJLU1Iprj4\/s1600\/Embedded-Media-and-privacy.png\"\/><\/a><\/p>\n<p>The User-Agent string has been <a href=\"https:\/\/developers.google.com\/privacy-sandbox\/protections\/user-agent\" target=\"_blank\" rel=\"noopener\">reduced<\/a> in Chrome on Desktop and Chrome on Android platforms since Chrome 107. Beginning in Android 16, the <i>default<\/i> User-Agent string in Android WebView will be similarly reduced.<\/p>\n<h3>Updated User-Agent string<\/h3>\n<p>The <i>default<\/i>, reduced WebView User-Agent string is as follows:<\/p>\n<div style=\"background: rgb(248, 248, 248); border: 0px; overflow: auto; width: auto;\">\n<pre style=\"line-height: 125%; margin: 0px;\">Mozilla\/<span style=\"color: #666666;\">5.0<\/span> (Linux; Android <span style=\"color: #666666;\">10<\/span>; K; wv) AppleWebKit\/<span style=\"color: #666666;\">537.36<\/span> (KHTML, like Gecko) Version\/<span style=\"color: #666666;\">4.0<\/span> Chrome\/<span style=\"color: #666666;\">125.000<\/span> Mobile Safari\/<span style=\"color: #666666;\">537.36<\/span>\n<\/pre>\n<\/div>\n<p><image><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" alt=\"A diagram illustrating how different parts of a user agent string are updated.\" border=\"0\" id=\"imgCaption\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiRhWFSwEBSSq4G_W1wFto-C-UObiJQ2WCCQLiEx4FuEn_Y5xXPjHtZtyhtEvKJQRFGphhVqfSXA8T-q2N-HkOicQHZxbOn0TzeedTUR4BH8JV6HUd_lwrb5wmsvudY_2FO9C7vCxzK3KySh4aballiotDZVeN_FViFPqtFiGVbZXS7VAGVWImN7JDcubs\/s1600\/image1.png\" width=\"80%\"\/><\/div>\n<p><\/image><\/p>\n<p>As seen in the diagram, the OS, CPU, and Build information will be reduced to the static &#8220;Linux; Android 10; K&#8221; string. Minor\/build\/patch version information is also reduced to &#8220;0.0.0&#8221; The rest of the default User-Agent remains unchanged (and is unchanging).<\/p>\n<h4 style=\"text-align: left;\"><span style=\"font-size: large;\">How can I detect WebView via the User-Agent string?<\/span><\/h4>\n<p>Sites can continue to look for the <span style=\"color: #0d904f; font-family: Courier;\">wv<\/span> token in the User-Agent string, unless an application has decided to override the User-Agent string.<\/p>\n<h4 style=\"text-align: left;\"><span style=\"font-size: large;\">Does WebView support User-Agent Client Hints?<\/span><\/h4>\n<p>Android WebView has supported User-Agent Client Hints since version 116, but only for applications that send the default User-Agent string.<\/p>\n<h4 style=\"text-align: left;\"><span style=\"font-size: large;\">Will a custom WebView User-Agent string be affected?<\/span><\/h4>\n<p>The ability to set a custom User-Agent via <span style=\"font-family: Courier;\"><a href=\"https:\/\/developer.android.com\/reference\/android\/webkit\/WebSettings#setUserAgentString%28java.lang.String%29\" target=\"_blank\" rel=\"noopener\">setUserAgentString()<\/a><\/span> won\u2019t be affected &#8211; and applications that choose to do so won\u2019t send the reduced User-Agent string.<\/p>\n<\/div>\n<hr\/>\n<\/div>\n<p>[ad_2]<br \/>\n<br \/><a href=\"http:\/\/android-developers.googleblog.com\/2024\/12\/user-agent-reduction-on-android-webview.html\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Posted by Mike Taylor (Privacy Sandbox), and Mihai C\u00eerl\u0103naru (Web on Android) The User-Agent string has been reduced in Chrome on Desktop and Chrome<\/p>\n","protected":false},"author":1,"featured_media":266161,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[146],"tags":[],"_links":{"self":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/266160"}],"collection":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/comments?post=266160"}],"version-history":[{"count":0,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/266160\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media\/266161"}],"wp:attachment":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media?parent=266160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/categories?post=266160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/tags?post=266160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}