[DESCRIPTION]
KK版本上UA Agent有所变化,总结了两个常见问题。
[SOLUTION]
4.4.2的自动匹配的UA格式中较4.4.2的少了 U - 加密标志, zh-cn - 语言标志,我们想知道这两个在UA中的作用是什
么,为什么新版本没有这两个标志?
請參考WebKit的公布:
网址:https://www.webkit.org/blog/1580 ... es-on-webkit-trunk/
1. The “U” SSL encryption strength token has been removed. This token dates fROM more than a decade
ago, when U.S. export laws limited the encryption strength that could be built into software shipped to
various other countries; the valid values are “U” (for “USA” 128-bit encryption support), “I” (for
“International” 40-bit encryption support), and “N” (for “None”, no encryption support). These
days, it’s unusual to ship without 128-bit SSL support everywhere; ports can add “I” or “N” if
necessary.
2. The locale has been removed. Web authors who want to know what languages a browser supports should
use the HTTP Accept-Language header instead, which can supply multiple locales.
系统代码拼接的文件时哪一个?我们可以手动添加修改吗?
文件是external/chromium_org/webkit/common/user_agent/user_agent_util.cc,建議使用custom.conf來定義瀏覽器的UA 就好。
若真的需要自行修改WebView的UA,請注意修改後是否會違反CTS與CDD的規範。
来源:一牛网论坛
网友评论