From 4eaca34cf2eea3b021dfe6aa7e0ccada55c7f436 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Wed, 18 Aug 2021 13:29:08 +0900 Subject: orphaned/Web/API/NavigatorID を廃止 (#2013) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * orphaned/Web/API/NavigatorID を廃止 - orphaned/Web/API/NavigatorID を削除 - orphaned/Web/API/NavigatorID のメンバーを Web/API/Navigator へ移行 - 各メンバーの文書を 2021/08/10 時点の英語版に同期 * Update _redirects.txt * Update _redirects.txt --- files/ja/web/api/navigator/appcodename/index.html | 44 +++++++++++++++ files/ja/web/api/navigator/appname/index.html | 46 ++++++++++++++++ files/ja/web/api/navigator/appversion/index.html | 50 +++++++++++++++++ files/ja/web/api/navigator/platform/index.html | 45 +++++++++++++++ files/ja/web/api/navigator/product/index.html | 45 +++++++++++++++ files/ja/web/api/navigator/useragent/index.html | 67 +++++++++++++++++++++++ 6 files changed, 297 insertions(+) create mode 100644 files/ja/web/api/navigator/appcodename/index.html create mode 100644 files/ja/web/api/navigator/appname/index.html create mode 100644 files/ja/web/api/navigator/appversion/index.html create mode 100644 files/ja/web/api/navigator/platform/index.html create mode 100644 files/ja/web/api/navigator/product/index.html create mode 100644 files/ja/web/api/navigator/useragent/index.html (limited to 'files/ja/web/api') diff --git a/files/ja/web/api/navigator/appcodename/index.html b/files/ja/web/api/navigator/appcodename/index.html new file mode 100644 index 0000000000..befb274cb5 --- /dev/null +++ b/files/ja/web/api/navigator/appcodename/index.html @@ -0,0 +1,44 @@ +--- +title: Navigator.appCodeName +slug: Web/API/Navigator/appCodeName +tags: + - API + - Deprecated + - HTML DOM + - Navigator + - Property + - Reference +browser-compat: api.Navigator.appCodeName +translation_of: Web/API/NavigatorID/appCodeName +original_slug: Web/API/NavigatorID/appCodeName +--- +
{{APIRef("HTML DOM")}} {{Deprecated_Header}}
+ +

Navigator.appCodeName プロパティの値は、どのブラウザーでも常に "Mozilla" です。このプロパティは互換性のためだけに維持されています。

+ +
メモ: このプロパティが実際の製品名を返すことを期待しないでください。どのブラウザーもこのプロパティの値として "Mozilla" を返します。 +
+ +

構文

+ +
codeName = navigator.appCodeName
+
+ +

+ +

"Mozilla" という文字列です。

+ +

仕様書

+ +{{Specifications}} + +

ブラウザーの互換性

+ +

{{Compat}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/navigator/appname/index.html b/files/ja/web/api/navigator/appname/index.html new file mode 100644 index 0000000000..0ecf702fba --- /dev/null +++ b/files/ja/web/api/navigator/appname/index.html @@ -0,0 +1,46 @@ +--- +title: Navigator.appName +slug: Web/API/Navigator/appName +tags: + - API + - Deprecated + - HTML DOM + - Navigator + - Property + - Reference +browser-compat: api.Navigator.appName +translation_of: Web/API/NavigatorID/appName +original_slug: Web/API/NavigatorID/appName +--- +
{{APIRef("HTML DOM")}} {{Deprecated_Header}}
+ +

Navigator.appName プロパティの値は、どのブラウザーでも常に "Netscape" です。このプロパティは互換性ためだけに維持されています。

+ +
+

メモ

+

このプロパティが実際のブラウザー名を返すことを期待しないでください。どのブラウザーもこのプロパティの値として "Netscape" を返します。

+
+ +

構文

+ +
appName = navigator.appName
+
+ +

+ +

文字列 "Netscape" です。

+ +

仕様書

+ +{{Specifications}} + +

ブラウザーの互換性

+ +

{{Compat}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/navigator/appversion/index.html b/files/ja/web/api/navigator/appversion/index.html new file mode 100644 index 0000000000..d3908733b7 --- /dev/null +++ b/files/ja/web/api/navigator/appversion/index.html @@ -0,0 +1,50 @@ +--- +title: Navigator.appVersion +slug: Web/API/Navigator/appVersion +tags: + - API + - Deprecated + - Navigator + - Property + - Reference + - appVersion +browser-compat: api.Navigator.appVersion +translation_of: Web/API/NavigatorID/appVersion +original_slug: Web/API/NavigatorID/appVersion +--- +

{{APIRef("HTML DOM")}} {{Deprecated_Header}}

+ +

"4.0" またはそのブラウザーのバージョン情報を表す文字列のどちらかを返します。

+ +
+

メモ

+

このプロパティがブラウザーの正しいバージョンを返すことを期待しないでください。

+
+ +

構文

+ +
window.navigator.appVersion
+
+ +

+ +

"4.0" またはそのブラウザーのバージョン情報を表す文字列のどちらかです。

+ +

+ +
alert("このブラウザーのバージョンは " + navigator.appVersion + " と報告されています。");
+
+ +

+ +

window.navigator.userAgent プロパティもバージョン番号を含んでいる場合がありますが ("Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010725 Netscape 6/6.1" など)、ユーザーエージェント文字列を変更したり、他のブラウザー、プラットフォーム、ユーザーエージェントに「偽装」したり、ブラウザーベンダー自身がこれらのプロパティに無頓着であったりすることを意識しておいてください。

+ +

window.navigator.appVersion, window.navigator.appName, window.navigator.userAgent の各プロパティは、「ブラウザー推定」 (browser sniffing) コード、すなわち使用しているブラウザーを検出し、それに従ってページを調整しようとするスクリプトで使われてきました。これにより、一部のウェブサイトから拒否されないようにするために、ブラウザーがこれらのプロパティで偽の情報を返さなければならないという現在の状況が発生したのです。

+ +

仕様書

+ +{{Specifications}} + +

ブラウザーの互換性

+ +

{{Compat}}

diff --git a/files/ja/web/api/navigator/platform/index.html b/files/ja/web/api/navigator/platform/index.html new file mode 100644 index 0000000000..c0e4620269 --- /dev/null +++ b/files/ja/web/api/navigator/platform/index.html @@ -0,0 +1,45 @@ +--- +title: Navigator.platform +slug: Web/API/Navigator/platform +tags: + - API + - Deprecated + - HTML DOM + - Navigator + - Property + - Reference + - platform +browser-compat: api.Navigator.platform +translation_of: Web/API/NavigatorID/platform +original_slug: Web/API/NavigatorID/platform +--- +

{{ APIRef("HTML DOM") }} {{Deprecated_Header}}

+ +

ブラウザーのプラットフォームを表す文字列を返します。仕様書ではブラウザーが常に空文字列を返すことを許可していますので、信頼できる答えを得るためにこのプロパティを頼らないようにしてください。

+ +

構文

+ +
platform = navigator.platform
+
+ +

+ +

ブラウザーを実行しているプラットフォームを識別する {{domxref("DOMString")}}、あるいはブラウザーがプラットフォームの識別を断わった (または識別できない) 場合は空文字列になります。platform は空文字列か、ブラウザーを実行しているプラットフォームを表す文字列でなければなりません。

+ +

例: "MacIntel", "Win32", "FreeBSD i386", "WebTV OS"

+ +

+ +
console.log(navigator.platform);
+ +

使用上のメモ

+ +

Chrome、Edge、Firefox 63 以降を含むほとんどのブラウザーは、64 ビット版の Windows で実行していても "Win32" を返します。 Internet Explorer やバージョン 63 より前の Firefox は "Win64" を返します。

+ +

仕様書

+ +{{Specifications}} + +

ブラウザーの互換性

+ +

{{Compat}}

diff --git a/files/ja/web/api/navigator/product/index.html b/files/ja/web/api/navigator/product/index.html new file mode 100644 index 0000000000..d1f5b35941 --- /dev/null +++ b/files/ja/web/api/navigator/product/index.html @@ -0,0 +1,45 @@ +--- +title: Navigator.product +slug: Web/API/Navigator/product +tags: + - API + - Deprecated + - Navigator + - Property + - Reference +browser-compat: api.Navigator.product +translation_of: Web/API/NavigatorID/product +original_slug: Web/API/NavigatorID/product +--- +
{{APIRef("HTML DOM")}} {{Deprecated_Header}}
+ +

Navigator.product プロパティの値は、どのブラウザーでも常に "Gecko" です。このプロパティは互換性のためだけに維持されています。

+ + +
+

このプロパティが実際の製品名を返すことを期待しないでください。どのブラウザーもこのプロパティの値として "Gecko" を返します。

+
+ +

構文

+ +
productName = navigator.product
+
+ +

+ +

文字列 "Gecko" です。

+ +

仕様書

+ +{{Specifications}} + +

ブラウザーの互換性

+ +

{{Compat}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/navigator/useragent/index.html b/files/ja/web/api/navigator/useragent/index.html new file mode 100644 index 0000000000..d02c88de43 --- /dev/null +++ b/files/ja/web/api/navigator/useragent/index.html @@ -0,0 +1,67 @@ +--- +title: Navigator.userAgent +slug: Web/API/Navigator/userAgent +tags: + - API + - Navigator + - Property + - Read-only + - Reference +browser-compat: api.Navigator.userAgent +translation_of: Web/API/NavigatorID/userAgent +original_slug: Web/API/NavigatorID/userAgent +--- +

{{ApiRef("HTML DOM")}}

+ +

NavigatorID.userAgent は読み取り専用のプロパティで、現在のブラウザーのユーザーエージェント文字列を返します。

+ +
+

仕様書では、ブラウザーがこのフィールドを介して提供する情報をできるだけ少なくすることを求めています。このプロパティの値は、同じブラウザーの将来のバージョンでも同じままであると仮定してはいけません。まったく使用しないようにしたり、ブラウザーの現在のバージョンと過去のバージョンのためだけに使用するようにしてください。新しいブラウザーは、古いブラウザーと同じ UA、またはその一部を使い始めるかもしれません。ブラウザーエージェントが本当にこのプロパティによって広告されたものであるという保証は本当にありません。
+
+また、ブラウザーのユーザーはこのフィールドの値を変更することができることを覚えておいてください (UA なりすまし)。

+
+ +

ユーザーエージェント文字列の検出に基づくブラウザーの識別は信頼性が低く、ユーザーエージェント文字列はユーザーが設定可能なので推奨されません。例えば、以下のようになります。

+ + + +

構文

+ +
var ua = navigator.userAgent;
+
+ +

+ +

{{domxref("DOMString")}} で、ブラウザーが {{Glossary("HTTP")}} ヘッダーで提供する完全なユーザーエージェント文字列と、 {{domxref("Navigator")}} オブジェクト上のメソッドやその他の関連メソッドへのレスポンスを指定します。

+ +

ユーザーエージェント文字列は形式的な構造に基づいて構築されており、いくつかの情報に分解することができます。これらの情報の各部分は、ユーザ-が設定可能な他の Navigator のプロパティから来ています。Gecko ベースのブラウザは以下の一般的な構造に準拠しています。

+ +
userAgent = appCodeName/appVersion number (Platform; Security; OS-or-CPU;
+Localization; rv: revision-version-number) product/productSub
+Application-Name Application-Name-version
+
+ +

+ +
alert(window.navigator.userAgent)
+// alerts "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010725 Netscape6/6.1"
+
+ +

仕様書

+ +{{Specifications}} + +

ブラウザーの互換性

+ +

{{Compat}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf