[106] User-Agent:
や navigator.userAgent
は、次のような目的で用いられています。
[120] 既定User-Agent
値は、
User-Agent:
ヘッダーに使う利用者エージェント定義の値です
>>119。
この値は HTTP-network-or-cache fetch で User-Agent:
ヘッダーに設定されるほか、 navigator.userAgent
でも使われます。
[46] HTTP では User-Agent:
ヘッダーの値として利用者エージェントの識別情報を記述できます。
[51] 利用者エージェントは、 navigator互換性モードを持ちます。 Chrome、Gecko、WebKit のいずれかです。 >>29
[35] Navigator
オブジェクトには次のメンバー
(特記がない限りIDL属性) があります。
これらは仕様書上は NavigatorID
インターフェイス
(NoInterfaceObject
) と呼ばれています。 >>29
[86] navigator.appVersion
は、 Web互換性と fingerprinting 防止のため、
次の値を返すべきです。
User-Agent
値に設定します。Mozilla/
を除去します。;
とそれ以後を除去します。5.0 (Windows
から始まる場合、ua
を 5.0 (Windows
に設定します。)
を追加します。[85] navigator.platform
は、 Web互換性と fingerprinting 防止のため、
次の値を返すべきです。
[66] navigator.platform
が Windows であるかどうかは、
endings
の挙動に影響します。
[97] navigator.oscpu
は、 Web互換性と fingerprinting 防止のため、
次の値を返すべきです。
navigator.platform
の値が Win64
の場合、Windows NT 10.0; Win64; x64
を返します。navigator.platform
の値を返します。[55] スマートフォン (タブレットを含みません。) として動作する利用者エージェントは、
値に Mobile
が含まれることが期待されてます >>79。
[53] テレビとして動作する利用者エージェントは、
値に TV
が含まれることが期待されています >>122。
[103] Web互換性のため利用者エージェントは Webブラウザーであるか否かに関わらず 「Webブラウザーらしい」 利用者エージェント値を使わなければなりません。
[105] 一方で利用者エージェント値が Webブラウザーかどうかで場合分けするサーバーも存在するため、 そのすべての機能を利用するためには、 「Webブラウザーらし」くない利用者エージェント値を使うこともできなければなりません。
[64] 端末属性通知プロトコルの標準提案 ( 版) http://www.mcf.to/eia/news/0909protocol.html
User-Agent:
も参照。[36] HTTP 要求頭欄の User-Agent: では、伝統的に Mozilla を名乗る人達が多いです。
のように compatible
と名乗るのはまだ良い方で、 Mozilla と区別出来ない
UA を送りつける UA もいます。
[28] >>36 最近でも使われてるブラウザーでいうと、 BBB が Mozilla/2
を名乗るけど compatible
を含めないとか。
[38] かつて Mozilla が市場独占に近い状態だった (ほんとか?) 頃に、 UA: を見て Mozilla と非 Mozilla で処理を分けていたサーバーが少なくなかったんで、 非 Mozilla UA がこれに対抗するため Mozilla を名乗ったという伝説が ありますが、真偽は定かじゃありません。知ってたら教えて下さい。
[39] ReGet とか IRIA とか wget とかの download 専門家達は一部サーバー管理者から 迫害されているので、 UA: を見て締め出されていて、それに対抗するために 詐称機能 (というか、 UA: を自由に設定できる機能) があります。 昔は既定値が Mozilla とかだったりすることも少なくなかったみたいですが、 最近はちゃんと自分の名前を名乗ってるっぽいです。
[1] ブラウザレポートに出てくる Netscape (compatible) ってのは、NN互換の他のブラウザってことなのかな。 それとも、 NNそのものなわけ?
で結局、これはIE5-6,NN6並に CSSを認識してくれるブラウザなのかと問いたい。
[2] >>1 どんな report なのかわかりませんが、その元になっている HTTP の User-Agent:欄の情報は、みんなそろって Mozilla を名乗るという悪しき伝統がありまして、既知の情報から推定した 細かい条件をチェックして、ほんとに Mozilla/Netscape なのか、それとも IE なのか、はたまた(以下略)を推測するんです。 (IE とかは、いちおう compatible という文字を入れてるので 区別できるんですが、中には本家 Mozilla と全く区別がつかない 奴もいるとか。)
[3] というわけで、 compatible を名乗るんだから互換性が あるとみなして送りつけてやったらどうですか? としか言いようが ありませぬ。
たとえば「Mozilla/2.0 (compatible; Ask Jeeves)」 だったら自称 Mozilla (Netscape Navigator) 2.0 互換ですので、 (もし相手にするのなら) それ相応の応答 (新機能! のフレーム とか、プラグイン (たしか Windoze 版のみ実装。)とか、 Java とか JavaScript (旧称 LiveScript) とかを使ったもの。) を返すのがいいのではないでしょうか:-)
[4] >>2-3 てことは、 「おかしなブラウザ使ってるオタク野郎」と見なしていいでしょうか。 もしくは、おかしなブラウザしか使えないあほ組織のPCとか。
[43]
CaminoのUA文字列 - Torisugari の日記 (2007-06-22 02:44:08 +09:00
版) http://slashdot.jp/~Torisugari/journal/407122?from=rss
(名無しさん 2007-06-24 07:21:01 +00:00)
[44]
ウィルスバスター(トレンドマイクロ)からのアクセス - えむもじら (2007-08-05 18:01:24 +09:00
版) http://level.s69.xrea.com/mozilla/index.cgi?id=20070805_VirusBuster
(名無しさん 2007-08-06 12:07:49 +00:00)
[45] Browser Sniffing History in the Chrome UA String (Henri Sivonen 著, 版) http://hsivonen.iki.fi/chrome-ua/ (名無しさん)
[47] Webブラウザーには不具合や制約があって、 著者がスクリプトからWebブラウザーを判定して対処せざるを得ないことがあります >>29。
[48] そのような判定は、既知の現在の版を判定するものとするべきです。 将来の版や未知の版は、仕様書に適合するものと仮定するべきです。 >>29
[49] この情報は、 fingerprinting vector です。 利用者エージェントは、できるだけ少ない情報にとどめることが強く望まれています。 >>29
[50] 実際のところ、規格違反の文字列を使う例や詐称により実際の情報が注釈内に押し込まれている例が多すぎることから、仕様に基づいた parser を作って前半(名前)・後半(版)を見て処理を云々というのは現実的でなく、そうした処理をする多くの実装 (CGI script やサーバーなど。) は正規表現を使って処理しています。確かにこれが最も現実的な方法でしょう。
[57] ブラウザ判別では"Gecko"を調べてください - Web標準普及プロジェクト http://www.mozilla.gr.jp/standards/webtips1005.html
[34] 機能の有無の判定には、 UA sniffing を使うべきではありません。 近年導入されたほとんどの機能には、それぞれの機能の判定方法が用意されています。 特定の Webブラウザーであるかどうかではなく、特定の機能が利用可能かどうかを判定するべきです。
[127] 版番号検知の失敗事案: バージョニングの失敗, 年問題
[129] Opera 10は「Opera 1」に間違えられる? | スラド IT, https://it.srad.jp/story/08/12/26/0047250/
[20] HTTP で User-Agent:欄に実際に使われている名前についての 情報源:
Mozilla/1.22 (Windows; I; 32bit)
[11] HTTP じゃないですけど、最近の Mew はこんなのをつけるらしいです。
User-Agent: Mew/3.1.53 Emacs/21.2.93 (i386-mingw-nt4.0.1381) Mule/5.0 =?iso-2022-jp?B?KBskQjgtTFobKEIp?= Meadow/1.99 Alpha4 =?iso-2022-jp?B?KBskQkU0GyhCKQ==?=
設定次第, かもしれません。 Kazu さんのは従来通り X-Mailer: だし。
で、この例のように encoded-word を生で使っていると、例えば "="
は tspecials ですから、 HTTP や usefor-article
の構文に照らして不当です。
もっとも、現時点で電子メイルにおける User-Agent:
欄の定義は存在しない以上, 非構造欄だとか, そうでなくても tspecials
も使えるんだとか, そういう主張はできなくもないですが。
Server: Zope/(Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, freebsd4) ZServer/1.1b1
。面白い例でしょ? 文法違反だけど。[63]
The ELinks Manual (Petr Baudis, Jonas Fonseca Madsen, Miciah Dashiel Butler Masters 著, 2007-03-18 16:03:15 +09:00
版) http://elinks.or.cz/documentation/manual.html#useragent
[17] 利用者エージェントの識別情報は、 fingerprinting vector です。
[91] User-Agent:
の値は fingerprinting
に使われることがあり >>83、注意が必要です。
[15] Security や privacy を理由に、 UA: 欄や Serverが送られることに懸念を示す人がいます。
確かに個々の場合において問題が発生する可能性はあるでしょう。 (例えば UA: 欄に特定の文字列が入っていたら攻撃する人がいるとか。)
しかし一般論として、例えばこれらの情報を送らないことで安全性が向上するということはありません。
[16] >>15 わざわざソースから削って出力させなくするような人もいるらしいですが、安全性の向上を狙っているならはっきり言って無駄なことです。
[30] RFC 7231 はソフトウェアの情報を示すことによって既知のセキュリティーホールを攻撃される危険性があるとしつつも、 実際にはソフトウェアの版に関わらず攻撃される虞があることをも指摘しています >>33。
[27] User-Agent:
, Navigator
の歴史の項も参照。
[68] Chrome 11 におけるユーザーエージェント文字列の変更 - Google Japan Developer Relations Blog ( ( 版)) http://googledevjp.blogspot.com/2011/06/chrome-11.html
[69] Bug 690287 – Tracking bug for UA sniffers failing to handle a two-digit version ( ( 版)) https://bugzilla.mozilla.org/show_bug.cgi?id=690287
[70] Request Headers in the HTTP protocol ( ( 版)) http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#user-agent
[71] Gecko user agent string reference - MDN ( ( 版)) https://developer.mozilla.org/en/Gecko_user_agent_string_reference
[72] Chrome for Android User-Agent - Google Chrome Mobile — Google Developers ( ( 版)) https://developers.google.com/chrome/mobile/docs/user-agent
[73] IE10 のユーザー エージェント文字列が更新されました - IEBlog 日本語 - Site Home - MSDN Blogs ( ( 版)) http://blogs.msdn.com/b/ie_ja/archive/2012/07/16/ie10-user-agent-string-update.aspx
[74] OperaのUAは以後ずっとOpera/9.80になります - by edvakf in hatena ( ( 版)) http://d.hatena.ne.jp/edvakf/20090527/1243449333
[75] Changes in Opera’s user agent string format - Dev.Opera ( ( 版)) http://dev.opera.com/articles/view/opera-ua-string-changes/
[76] Google ウェブマスター向け公式ブログ: スマートフォン版 Googlebot-Mobile の導入について ( ( 版)) http://googlewebmastercentral-ja.blogspot.jp/2011/12/googlebot-mobile.html
[79] Chrome for Android User-Agent - Google Chrome Mobile — Google Developers ( ( 版)) https://developers.google.com/chrome/mobile/docs/user-agent
[81] Gecko user agent string reference - HTTP | MDN ( ( 版)) https://developer.mozilla.org/en-US/docs/Web/HTTP/Gecko_user_agent_string_reference
The User-Agent header shall include:
HbbTV/1.3.1 (<capabilities>; [<vendorName>]; [<modelName>]; [<softwareVersion>];
[<hardwareVersion>]; <reserved>)
If you are here because you want to watch BlinkBox (UK) you need to install google-chromeAUR (Requires: version 42+) and use the User-Agent Switcher for Chrome extension with a Mac UA string 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36'. Windows UA strings will result in WP209 playback errors due to HDCP.
In the expression above, any IE version that starts with “1” will be treated as outdated and served connection slowly without Keep-Alive. Internet Explorer 1.0 didn’t even support SSL at all (SSL was added in 2.0), but worse, this loosely-written regular expression will also match future MSIE 10.0, MSIE 11.0, MSIE 12.0 (etc) user-agent strings. Hence, Apache hosts will one day find that the newest browsers are forced into the “slow” lane!
FacebookアプリWebView
Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13C75 [FBAN/FBIOS;FBAV/45.0.0.45.96;FBBV/18289579;FBDV/iPhone7,2;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.2;FBSS/2; FBCR/ドコモ;FBID/phone;FBLC/ja_JP;FBOP/5]
[117] Introduce default `User-Agent` value for usage by HTML · whatwg/fetch@d9a8ac1 ( 版) https://github.com/whatwg/fetch/commit/d9a8ac12a33ab6a35826179dc3e8d88d4e06c66d
[118] Let Fetch define the default User-Agent value · whatwg/html@026aa96 ( 版) https://github.com/whatwg/html/commit/026aa966c944ce0f1180bc906646c00a3f7ebcbb
古いAndroid向けのブラウザアプリ、フィーチャーフォン向けのjig browser、さらにはNew 3DSにもUserAgent文字列を変更できる機能がついています。
Mozilla's experience is that the few websites that today target TVs require that a "TV" token is included in the UA string in order for the website to render an appropriate TV UI.
I think this is something that's worth getting into a specification as quickly as we can, in order to prevent the mess that we currently have on mobile. The problem on mobile was that originally there was no token to indicate "mobile device", which lead to websites solving the problem with perpetually out-of-date databases, harder for new players to enter the space, etc.
Senders may customize the HTTP User Agent [RFC7231] used when fetching the target URL in order to indicate to the recipient that this request is made as part of Webmention discovery. In this case, it is recommended to include the string "Webmention" in the User Agent. This provides people with a pointer to find out why the discovery request was made.
All API requests MUST include a valid User-Agent header. Requests with no User-Agent header will be rejected. We request that you use your GitHub username, or the name of your application, for the User-Agent header value.
[59] is_bot property is not implemented well · Issue #35 · selwin/python-user-agents () https://github.com/selwin/python-user-agents/issues/35
[61] Microsoft Edge for iOS and Android: What developers need to know - Microsoft Edge Dev BlogMicrosoft Edge Dev Blog () https://blogs.windows.com/msedgedev/2017/10/05/microsoft-edge-ios-android-developer/
[62] ソフトウェアの互換性と僕らの"User-Agent"文字列問題|Rui Ueyama|note () https://note.mu/ruiu/n/n577ff5814b5c
[65] Document BlobPropertyBag "endings", or keep pushing to remove? · Issue #46 · w3c/FileAPI () https://github.com/w3c/FileAPI/issues/46
[67] Release Notes for Safari Technology Preview 46 | WebKit () https://webkit.org/blog/8042/release-notes-for-safari-technology-preview-46/
[77] Browser detection using the user agent - HTTP | MDN () https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent
[78] javascript - What is the list of possible values for navigator.platform as of today? - Stack Overflow () https://stackoverflow.com/questions/19877924/what-is-the-list-of-possible-values-for-navigator-platform-as-of-today
[80] 801614 - navigator.platform returns on Gonk]] () https://bugzilla.mozilla.org/show_bug.cgi?id=801614
[82] 777710 - Remove platform and OS identifiers from B2G UA () https://bugzilla.mozilla.org/show_bug.cgi?id=777710
[84] 777633 - Cannot view a video on mobile youtube on Firefox OS - vnd.youtube is not a registered protocol () https://bugzilla.mozilla.org/show_bug.cgi?id=777633
[89] Navigator.oscpu - Web APIs | MDN () https://developer.mozilla.org/en-US/docs/Web/API/Navigator/oscpu
[101] User Agent Strings - Google Chrome () https://developer.chrome.com/multidevice/user-agent
[102] Android Developers Blog: Android Browser User-Agent Issues () https://android-developers.googleblog.com/2010/12/android-browser-user-agent-issues.html
[123] www.bestbuy.com - Firefox is an unsupported browser · Issue #115507 · webcompat/web-bugs · GitHub, https://github.com/webcompat/web-bugs/issues/115507
[124] 1805967 - Freeze `rv:` segment in the User Agent string to `rv:109.0` to avoid erroneous IE11 detection, https://bugzilla.mozilla.org/show_bug.cgi?id=1805967
Google search: navigator.appVersion
User-Agent:
参照。