RFC2936 日本語訳
2936 HTTP MIME Type Handler Detection. D. Eastlake 3rd, C. Smith, D.Soroka. September 2000. (Format: TXT=25238 bytes) (Status: INFORMATIONAL)
プログラムでの自動翻訳です。
英語原文
Network Working Group D. Eastlake Request for Comments: 2936 Motorola Category: Informational C. Smith Royal Bank of Canada D. Soroka IBM September 2000
コメントを求めるワーキンググループD.イーストレークの要求をネットワークでつないでください: 2936年のモトローラカテゴリ: 情報のC.のスミスカナダ王立銀行D.Soroka IBM2000年9月
HTTP MIME Type Handler Detection
HTTP MIMEの種類操作者検出
Status of this Memo
このMemoの状態
This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.
このメモはインターネットコミュニティのための情報を提供します。 それはどんな種類のインターネット標準も指定しません。 このメモの分配は無制限です。
Copyright Notice
版権情報
Copyright (C) The Internet Society (2000). All Rights Reserved.
Copyright(C)インターネット協会(2000)。 All rights reserved。
Abstract
要約
Entities composing web pages to provide services over the Hypertext Transfer Protocol (HTTP) frequently have the problem of not knowing what Multipurpose Internet Mail Extensions (MIME) types have handlers installed at a user's browser. For example, whether an Internet Open Trading Protocol (IOTP) or VRML or SET or some streaming media handler is available. In some cases they would want to display different web pages or content depending on a MIME handler's availability. This document summarizes reasonable techniques to solve this problem for most of the browsers actually deployed on the Internet as of early 2000. It is intended to be of practical use to implementors during the period before the wide deployment of superior standards based techniques which may be developed.
ハイパーテキストTransferプロトコル(HTTP)の上にサービスを提供するためにウェブページを構成する実体で、(MIME)がどんなマルチパーパスインターネットメールエクステンションをタイプするかを知らないという問題で頻繁にユーザのブラウザに操作者をインストールします。 例えば、操作者はインターネットオープンTradingプロトコル(IOTP)、VRML、SETまたはいくつかのストリーミング・メディアであることにかかわらず手があいています。 いくつかの場合、彼らは異なったウェブページかMIME操作者の有用性に依存する内容を表示したがっているでしょう。 このドキュメントは、2000年前半の時点で実際にインターネットで配備されたブラウザの大部分のこの問題を解決するために合理的なテクニックをまとめます。 優れた規格の広い展開が見いだされるかもしれない技術を基礎づける前に期間、それが作成者への実用のものであることを意図します。
Acknowledegements
Acknowledegements
Helpful comments by Tony Lewis of Visa have been incorporated.
VisaのTony Lewisによる役に立つコメントは法人組織でした。
Eastlake, et al. Informational [Page 1] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [1ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
Table of Contents
目次
1. Introduction................................................. 2 2. The HTTP 'Accept' Header..................................... 2 3. JavaScript................................................... 3 4. ActiveX and the Windows Registry............................. 4 5. ECML, The Electronic Commerce Modeling Language.............. 4 6. Putting It All Together...................................... 5 7. Future Development........................................... 5 8. Security Considerations...................................... 5 9. IANA Considerations.......................................... 6 References...................................................... 6 Appendix A: Browser Version Sniffer Code........................ 8 Authors' Addresses.............................................. 12 Full Copyright Statement........................................ 13
1. 序論… 2 2. '受け入れてください'というHTTPヘッダー… 2 3. JavaScript… 3 4. ActiveXとWindows登録… 4 5. ECML、電子通商モデル言語… 4 6. 一斉にそれを置きます… 5 7. 今後の開発… 5 8. セキュリティ問題… 5 9. IANA問題… 6つの参照箇所… 6 付録A: ブラウザバージョン麻薬を吸う人コード… 8人の作者のアドレス… 12 完全な著作権宣言文… 13
1. Introduction
1. 序論
Entities composing web pages to provide services over [HTTP] frequently have the problem of not knowing what [MIME] types have handlers installed at a user's browser. For example, whether an [IOTP] or VRML or [SET] or some streaming media handler is available. In many cases they would want to display different web pages or content depending on a MIME handler's availability. Sending a response with a MIME type that is not supported frequently results in interrupting the flow of the user experience, browser queries as to what to do with the data being provided, and, of course, failure to provide the behavior that would have occurred had the correct MIME type handler been installed.
[HTTP]の上にサービスを提供するためにウェブページを構成する実体が頻繁にどんな[MIME]タイプがユーザのブラウザに操作者をインストールさせるかを知らないという問題を持っています。 例えば、操作者は[IOTP]、VRML、[SET]またはいくつかのストリーミング・メディアであることにかかわらず手があいています。 多くの場合、彼らは異なったウェブページかMIME操作者の有用性に依存する内容を表示したがっているでしょう。 支持されないMIMEの種類との応答を送ると、ユーザー・エクスペリエンスの流れを中断する、データを提供している状態でするべきことに関するブラウザ質問、および正しいMIMEの種類操作者がインストールされたなら起こった振舞いを提供しないもちろんことは頻繁にもたらされます。
This document describes reasonable techniques to solve this problem for most of the browsers actually deployed on the Internet as of early 2000. It is intended to be of practical use to implementors during the period before the wide deployment of superior standards based techniques which may be developed. It is written in terms of determining whether a handler for application/iotp or application/x- iotp exists but is equally applicable to other MIME types.
このドキュメントは、2000年前半の時点で実際にインターネットで配備されたブラウザの大部分のこの問題を解決するために合理的なテクニックについて説明します。 優れた規格の広い展開が見いだされるかもしれない技術を基礎づける前に期間、それが作成者への実用のものであることを意図します。 それは、アプリケーション/iotpかアプリケーション/x iotpのための操作者が存在するかどうか決定することに関して書かれていますが、等しく他のMIMEの種類に適切です。
2. The HTTP 'Accept' Header
2. '受け入れてください'というHTTPヘッダー
The problem should be solved by the Hyper Text Transport Protocol [HTTP] request "Accept" header which lists accepted [MIME] types. This header is present in both Version 1.0 and 1.1 of HTTP and its content is supposed to be a list of MIME types and subtypes that are accepted. The only problem is that many browsers just send "*/*" or the like.
「受け入れてください」というリストが受け入れたヘッダー[MIME]がタイプするというHyper Text Transportプロトコル[HTTP]要求で問題は解決されるべきです。 このヘッダーはバージョン1.0と1.1の両方にHTTPで出席しています、そして、内容は受け入れられるMIMEの種類と血液型亜型のリストであるべきです。 「唯一の問題は多くのブラウザがただ」 */*を送るということです」か同様のもの。
Eastlake, et al. Informational [Page 2] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [2ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
If the particular MIME type you are looking for is specifically present in the Accept header, it is generally safe to assume that a handler for it is actually installed or part of the browser.
あなたが探している特定のMIMEの種類がAcceptヘッダーに明確に存在しているなら、それは、それのための操作者が実際にインストールされると仮定する一般に金庫かブラウザの一部です。
NOTE: Although not part of the main topic of this document, if you are designing MIME type handler software and have access to a browser interface that allows you to request the insertion of the MIME type or types your software handles into the Accept header, you generally should do so. It will make it easier for servers sensitive to that MIME type to respond correctly.
以下に注意してください。 このドキュメントの主な話題の一部ではありませんが、MIMEの種類操作者ソフトウェアを設計していて、あなたがMIMEの種類の挿入を要求するのを許容するか、またはあなたのソフトウェアハンドルをAcceptヘッダーにタイプするブラウザインタフェースに近づく手段を持っているなら、一般に、あなたはそうするべきです。 それで、そのMIMEの種類に敏感なサーバが正しく反応するのが、より簡単になるでしょう。
3. JavaScript
3. JavaScript
Most recent browsers support one or more scripting languages of which the most widely deployed is "JavaScript". These scripting languages appear in web pages and permit the interpretive execution of programming language constructs that can probe the browser environment, conditionally cause different page contents to be displayed, etc. For example, Appendix A shows JavaScript available from the Netscape web site for determining what operating system, browser, and version on which a web page is appearing.
それの1つ以上のスクリプト言語が最も広く展開する最新のブラウザサポートは「JavaScript」です。 これらのスクリプト言語は、ウェブページに現れて、表示されるようにブラウザ環境を調べることができる言語構築、条件付きに原因異なったページコンテンツにプログラムする解釈実行などを可能にします。 例えば、Appendix AはNetscapeウェブサイトからウェブページが現れているどんなオペレーティングシステム、ブラウザ、およびバージョンを決定するかに利用可能なJavaScriptを示しています。
NOTE: JavaScript is a trademark of SUN Microsystems, Inc. It was originally called LiveScript. It has nothing to do with the Java language.
以下に注意してください。 JavaScriptはSUNマイクロシステムズInc.Itの商標が元々ライヴスクリプトと呼ばれたということです。 それはジャバ言語と関係ありません。
The syntax for script use appears to be a Hyper Text Markup Language (HTML) comment so that browsers that do not support scripting will ignore such items. That is, script use is preceded by "<!--" and terminated by "-->". The following is a simple example of conditional execution of parts of a web page based on JavaScript MIME type handler detection.
スクリプト使用のための構文は原稿を書くのを支持しないブラウザがそのような項目を無視するためのHyper Text Markup Language(HTML)コメントであるように見えます。すなわち、スクリプト使用で先行されている、「<!--」、終わる、「--、>、」 ↓これはJavaScript MIMEの種類操作者検出に基づく1ウェブページの部分の条件付きの実行の簡単な例です。
<SCRIPT LANGUAGE=JAVASCRIPT> <!-- hide it if (navigator.mimeTypes && navigator.mimeTypes.length > 0) { if ( navigator.mimeTypes["application/iotp"] || navigator.mimeTypes["application/x-iotp"]) { // here if IOTP handler exists } else { // here if IOTP handler does not exist } } // end and hide --> </SCRIPT>
<SCRIPT LANGUAGE=JAVASCRIPT><!--それを隠してください、(navigator.mimeTypes、navigator.mimeTypes.length>0)、ここの//が(navigator.mimeTypes[「アプリケーション/iotpな」]| | navigator.mimeTypes[「アプリケーション/x-iotp」])であるならIOTP操作者であるなら存在している、ほかに、ここの//がIOTP操作者であるなら存在していない、//終わりと獣皮--、></SCRIPT>。
Eastlake, et al. Informational [Page 3] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [3ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
4. ActiveX and the Windows Registry
4. ActiveXとWindows登録
If running on Microsoft Windows Internet Explorer version 3 or 4, it is necessary to query the Windows Registry to determine local MIME type support. Although these broswers support JavaScript, in v3 the mimeTypes array is not present and in v4 the mimeTypes array is present but always empty. For example, executing the following code will test for support of the IOTP types:
マイクロソフトWindowsインターネット・エクスプローラーバージョン3か4で動くなら、地方のMIMEの種類サポートを決定するためにWindows Registryについて質問するのが必要です。 これらのbroswersはJavaScriptを支持しますが、v3では、mimeTypesアレイは、mimeTypesが整列させるv4で存在していなくて、現在ですが、いつも空です。 例えば、以下のコードを実行するのはIOTPタイプのサポートがないかどうかテストされるでしょう:
CString iotpString, xiotpString; char* Key, Keyx;
CString iotpString、xiotpString。 *キー、Keyxを炭にしてください。
int rc, rcx; iotpString = "SOFTWARE\Classes\MIME\Database\Content Type\application/iotp"; xiotpString = "SOFTWARE\Classes\MIME\Database\Content Type\application/x-iotp"; Key = iotpString.GetBuffer(1); Keyx = xiotpString.GetBuffer(1); rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, Key, 0, KEY_READ, hDefKey); rcx = RegOpenKeyEx(HKEY_LOCAL_MACHINE, Keyx, 0, KEY_READ, hDefKey); if ( ( rc == ERROR_SUCCESS ) || ( rcx == ERROR_SUCCESS ) ) { // IOTP Handler exists } else { // No IOTP Handler }
int rc、rcx。 iotpStringは「ソフトウェア\クラス\MIME\データベース\内容タイプ\アプリケーション/iotp」と等しいです。 xiotpStringは「ソフトウェア\クラス\MIME\データベース\内容タイプ\アプリケーション/x-iotp」と等しいです。 主要な=iotpString.GetBuffer(1)。 KeyxはxiotpString.GetBuffer(1)と等しいです。 rcはRegOpenKeyEx(HKEY_LOCAL_MACHINE、Key、0、KEY_READ、hDefKey)と等しいです。 rcxはRegOpenKeyEx(HKEY_LOCAL_MACHINE、Keyx、0、KEY_READ、hDefKey)と等しいです。 //IOTP Handlerが((rc=ERROR_SUCCESS)| | (rcx=ERROR_SUCCESS))であるなら存在している、ほか//いいえ、IOTP操作者
NOTE: ActiveX is a trademark of Microsoft and was originally called Sweeper.
以下に注意してください。 ActiveXは、マイクロソフトの商標であり、元々、Sweeperと呼ばれました。
5. ECML, The Electronic Commerce Modeling Language
5. ECML、電子通商モデル言語
A industry group has recently proposed a standard for fields used in electronic commerce. This fields allow "wallet" software acting for the consumer to convey standardized information to a merchant, including information as to what payment related protocols are supported at the customer site. See [ECML].
同業種グループは最近、電子商取引に使用される分野の規格を提案しました。 消費者の代理をする「財布」ソフトウェアはこの分野で標準化された情報を商人に伝えることができます、関連するプロトコルが顧客サイトでどんな支払いに関してサポートされるかという情報を含んでいて。 [ECML]を見てください。
Eastlake, et al. Informational [Page 4] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [4ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
6. Putting It All Together
6. 一斉にそれを置きます。
The following diagram indicates how these techniques can be put together.
以下のダイヤグラムはどうこれらのテクニックをまとめることができるかを示します。
start>-----+ | +------------------+ | Was desired type | NO +-------------------------+ |found in Accept? |------------>| Is JavaScript available | +------------------+ |and does it show type? | | +-------------------------+ YES | | | | |<---------------------------+ | NO | | YES | | | +---<explorer<--+ | | | | | +----------------------+ | | | Is ActiveX available | | | |and does it show type?| | | +----------------------+ | | YES | | | NO | |<-----------+ | +----------------->| | V | remember | Indeterminate. remember | that |. Take default that type | type IS | action. is NOT | supported| supported | X done X
>を始動してください。-----+ | +------------------+ | 必要なタイプでした。| +がありません。-------------------------+ |Acceptでは、設立しますか? |、-、-、-、-、-、-、-、-、-、-、--、>| JavaScriptは利用可能ですか?| +------------------+ |そして、それはタイプを見せていますか? | | +-------------------------+ はい| | | | | <、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、-、--+ | いいえ| | はい| | | +---<探検家<--+| | | | | +----------------------+ | | | ActiveXは利用可能ですか?| | | |そして、タイプを見せているか、|| | +----------------------+ | | はい| | | いいえ| | <、-、-、-、-、-、-、-、-、-、--+ | +----------------->|、| V| 覚えていてください。| 不確定である、覚えている。| それ|. タイプするデフォルトを取ってください。| タイプはそうです。| 動作。| 支持されます。| 支持されます。| Xが行われたX
7. Future Development
7. 今後の開発
Active work is proceeding in the IETF, World Wide Web Consortium [W3C], and other standards and industry groups concerning content and capabilities negotiation. This work is likely to lead to superior methods to implement the functionality described herein. However, near universal deployment of such new standards/features will take some time. Thus you should expect the methods given herein to be obsoleted, but perhaps not for some time.
活発な仕事は内容と能力交渉に関してIETF、ワールドワイドウェブコンソーシアム[W3C]、他の規格、および同業種グループで続いています。 この仕事はここに説明された機能性を実行する優れた方法に通じそうです。 しかしながら、そのような新しい規格/特徴の近い普遍的な展開はある程度時間がかかるでしょう。 したがって、あなたは、しかし、ここに与えられた方法が恐らくしばらくない時代遅れにされると予想するべきです。
8. Security Considerations
8. セキュリティ問題
It should be noted that the variety of ActiveX control suggested above is reading the user's registry, that is, examining their computer and reporting back some information it has discovered. This may be a concern among some users.
ActiveXコントロールのバラエティーが、ユーザの登録を読むのが上にあるのを示したことに注意されるべきであり、すなわち、それらのコンピュータを調べて、報告はそれが発見した何らかの情報を支持します。 これは何人かのユーザの中の関心であるかもしれません。
Eastlake, et al. Informational [Page 5] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [5ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
In general, the use of JavaScript and, even more so, ActiveX is dangerous because they are so powerful. JavaScript or ActiveX from a web page could be invisibly damaging to the client.
一般に、それらが非常に強力であるので、JavaScriptとさらにしたがってさえ、ActiveXの使用は危険です。 JavaScriptかActiveXがウェブページからクライアントに目につかないほど破損する場合がありました。
Security of web interactions is normally provided by adopting channel encryption on the browser to server connections, such as [TLS]. In the absence of some such additional security outside of HTTP, requests and/or responses may be forged or tampered with.
通常、ブラウザの上に[TLS]などのサーバ接続にチャンネル暗号化を採用することによって、ウェブの双方向性のセキュリティを提供します。 そのような何らかの追加担保がないとき、要求、そして/または、応答は、HTTPの外では、鍛造されるか、またはいじられるかもしれません。
9. IANA Considerations
9. IANA問題
None specific to the techniques described herein. For MIME types and type registration procedures, see [MIME: RFCs 2046, 2048].
ここに説明されたテクニックに特定でないなにも。 MIMEの種類とタイプ登録手順に関しては、見てください[MIME: RFCs2046、2048]。
References
参照
[ECML] Eastlake, D. and T. Goldstein, "ECML v1: Field Names for E- Commerce", RFC 2706, October 1999.
[ECML] イーストレーク、D.、およびT.ゴールドスティーン、「ECML v1:」 「電子商業のためのフィールド名」、RFC2706、1999年10月。
[HTTP] Berners-Lee, T., Fielding, R. and H. Frystyk, "Hypertext Transfer Protocol -- HTTP/1.0", RFC 1945, May 1996.
[HTTP]バーナーズ・リー、T.、フィールディング、R.、およびH.Frystyk、「HTTP/1インチ、RFC1945、1996年ハイパーテキスト転送プロトコル--5月。」
[HTTP] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[HTTP] フィールディング、R.、Gettys、J.、ムガール人、J.、Frystyk、H.、Masinter、L.、リーチ、P.、およびT.バーナーズ・リー、「HTTP/1.1インチ、RFC2616、1999年ハイパーテキスト転送プロトコル--6月」。
[IOTP] Burdett, D., "Internet Open Trading Protocol - IOTP Version 1.0", RFC 2801, April 2000.
[IOTP]バーデット、D.、「インターネットの開いている取り引きプロトコル--、IOTP、バージョン1インチ、RFC2801、2000インチ年4月。
[MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.
解放された[MIME]、N.、およびN.Borenstein、「マルチパーパスインターネットメールエクステンション(MIME)は1つを分けます」。 「インターネットメッセージ本体の形式」、RFC2045、1996年11月。
[MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, November 1996.
解放された[MIME]、N.、およびN.Borenstein、「マルチパーパスインターネットメールエクステンション(MIME)は2を分けます」。 「メディアタイプ」、RFC2046、1996年11月。
[MIME] Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text", RFC 2047, November 1996.
ムーア、[MIME]K.、「パートThreeをまねてください(マルチパーパスインターネットメールエクステンション)」 「非ASCIIテキストのためのメッセージヘッダー拡張子」、RFC2047、1996年11月。
[MIME] Freed, N., Klensin, J. and J. Postel, "Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures", RFC 2048, November 1996.
解放された[MIME]、N.、Klensin、J.、およびJ.ポステル、「マルチパーパスインターネットメールエクステンション(MIME)は4を分けます」。 「登録手順」、RFC2048、1996年11月。
Eastlake, et al. Informational [Page 6] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [6ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
[SET] "Secure Electronic Transaction (SET) Specification, Version 1.0", May 31, 1997, available from <http://www.setco.org>. Book 1: Business Description Book 2: Programmer's Guide Book 3: Formal Protocol Definition
[SET]は「バージョン1インチと、1997年5月31日に<http://www.setco.org>から利用可能な電子取引(設定する)仕様を保証します」。 第1巻: 第2ビジネス記述巻: 第3プログラマーズガイド巻: 正式なプロトコル定義
[TLS] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC 2246, January 1999.
[TLS] Dierks、T.、およびC.アレン、「TLSは1999年1月にバージョン1インチ、RFC2246について議定書の中で述べます」。
[W3C] World Wide Web Consortium, <www.w3.org>
[W3C]ワールドワイドウェブコンソーシアム、<www.w3.org>。
Eastlake, et al. Informational [Page 7] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [7ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
Appendix A: Browser Version Sniffer Code
付録A: ブラウザバージョン麻薬を吸う人コード
<SCRIPT LANGUAGE="JavaScript"> <!-- hide JavaScript from non-JavaScript browsers // Ultimate client-side JavaScript client sniff. // (C) Netscape Communications 1999. // Permission granted to reuse and distribute. // Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
<SCRIPT LANGUAGEが等しい、「JavaScript、「><!--非JavaScript/究極クライアントブラウザ/サイドJavaScriptクライアントかいだにおいからJavaScriptを隠してください。」 //(C)ネットスケープ・コミュニケーションズ1999。 許可が再利用に与えて、分配する//。 加える//改訂された1999年5月17日は、_nav5upであり、_ie5up(以下を見る)です。
// Everything you always wanted to know about your JavaScript client // but were afraid to ask. Creates "is_" variables indicating: // (1) browser vendor: // is_nav, is_ie, is_opera // (2) browser version number: // is_major (integer indicating major version number: 2, 3, 4 ...) // is_minor (float indicating full version number: // 2.02, 3.01, 4.04 ...) // (3) browser vendor AND major version number // is_nav2, is_nav3, is_nav4, is_nav4up, is_nav5, is_nav5up, // is_ie3, is_ie4, is_ie4up // (4) JavaScript version number: // is_js (float indicating full JavaScript version number: // 1, 1.1, 1.2 ...) // (5) OS platform and version: // is_win, is_win16, is_win32, is_win31, // is_win95, is_winnt, is_win98 // is_os2 // is_mac, is_mac68k, is_macppc // is_unix // is_sun, is_sun4, is_sun5, is_suni86 // is_irix, is_irix5, is_irix6 // is_hpux, is_hpux9, is_hpux10 // is_aix, is_aix1, is_aix2, is_aix3, is_aix4 // is_linux, is_sco, is_unixware, is_mpras, is_reliant // is_dec, is_sinix, is_freebsd, is_bsd // is_vms // // See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and // http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html // for detailed lists of userAgent strings. // // Note: you don't want your Nav4 or IE4 code to "turn off" or // stop working when Nav5 and IE5 (or later) are released, so // in conditional code forks, use is_nav4up ("Nav4 or greater") // and is_ie4up ("IE4 or greater") instead of is_nav4 or is_ie4 // to check version in code which you want to work on future // versions.
しかしあなたがいつもあなたのJavaScriptクライアント//に関して知りたかったすべてが尋ねるのを恐れていた//。 作成、「」 _は以下を示す変数ですか? //(1)ブラウザ業者: (2) //は、_navであり、_ieであり、_オペラ//はブラウザバージョン番号です: //は_少佐(メジャーバージョン番号を示す整数: 2、3、4…)です。 //は_未成年者(完全版番号を示しながら、浮いてください: //2.02、3.01、4.04)です。 //(3)ブラウザ業者AND主要なバージョン数// __nav5が_nav5upである、//が_ie3であり、_ie4であるということであり、_nav4が_nav4upであるということであり、_nav2が_nav3であるということであり、ie4up//(4)JavaScriptバージョン番号です: //は_js(完全なJavaScriptバージョン番号を示しながら、浮いてください: //1、1.1、1.2)です。 //(5)OSプラットホームとバージョン: userAgentストリングの詳細なリストのためのit97.de/JavaScript/JS_のチュートリアル/bstat/navobj.htmlと// http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html //。 ////注意: の代わりにする、_あなたがNav4かIE4コードが「興味を失いたがっていない」か、//コネに依存しているコードが分岐して、Nav5とIE5(後で)がリリースされるとき、//停止の働きが_nav4upが(「Nav4か、よりすばらしい」)であるという//を使用して、ie4up(「IE4か、よりすばらしい」)である、_はnav4ですかそれとも_ie4//があなたが未来//バージョンに働かせたいコードのバージョンをチェックすることになっていますか?
Eastlake, et al. Informational [Page 8] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [8ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
// convert all characters to lowercase to simplify testing var agt=navigator.userAgent.toLowerCase();
//はテストvar agt=navigator.userAgent.toLowerCase()を簡素化するために小文字で印刷するためにすべてのキャラクタを変換します。
// *** BROWSER VERSION *** // Note: On IE5, these return 4, so use is_ie5up to detect IE5. var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion);
//***ブラウザバージョン***//注意: IE5では、これらが4を返すので、使用はie5up toが検出する_です。IE5. varは_主要な=parseInt(navigator.appVersion)です。 varは_小さい方の=parseFloat(navigator.appVersion)です。
// Note: Opera and WebTV spoof Navigator. We do strict client // detection. If you want to allow spoofing, take out the tests // for opera and webtv. var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1)); var is_nav2 = (is_nav && (is_major == 2)); var is_nav3 = (is_nav && (is_major == 3)); var is_nav4 = (is_nav && (is_major == 4)); var is_nav4up = (is_nav && (is_major >= 4)); var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) ); var is_nav5 = (is_nav && (is_major == 5)); var is_nav5up = (is_nav && (is_major >= 5));
//注意: オペラとウェブTVパロディーナビゲータ。 私たちは厳しいクライアント//検出をします。 だますのを許容したいなら、オペラとウェブTVのためのテスト//から、取ってください。varが_nav=(agt.indexOf('mozilla!')=-1)である、(agt.indexOf('spoofer')=-1)、(agt.indexOfの('コンパチブル')の=-1)、(agt.indexOf('オペラ')=-1)、(agt.indexOf('ウェブTV')=-1)。 varが_nav2=である、(_がnavである、(_主要な=2です)。 varが_nav3=である、(_がnavである、(_主要な=3です)。 varが_nav4=である、(_がnavである、(_主要な=4です)。 varが_nav4up=である、(_がnavである、(_主要な>=4です)。 varが_navonly=である、(_がnavである、(agt.indexOf(「nav」)!=-1)| | (agt.indexOf(「nav」)!=-1)。 varが_nav5=である、(_がnavである、(_主要な=5です)。 varが_nav5up=である、(_がnavである、(_主要な>=5です)。
var is_ie = (agt.indexOf("msie") != -1); var is_ie3 = (is_ie && (is_major < 4)); var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) ); var is_ie4up = (is_ie && (is_major >= 4)); var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); var is_ie5up = (is_ie && !is_ie3 && !is_ie4);
varは_ie=(agt.indexOf(「msie!」)は-1と等しい)です。 varが_ie3=である、(_がieである、(_主要な<4です)。 varが_ie4=である、(_がieである、(_主要な=4です)、(agt.indexOf、(「msie5インチ) =-1、)、」、。 varが_ie4up=である、(_がieである、(_主要な>=4です)。 varが_ie5=である、(_がieである、(_主要な=4です)、(agt.indexOf、(「msie5インチ) =-1、)、」、。 varが_ie5up=である、(_がieである、_がie3である、_ie4)、。
// KNOWN BUG: On AOL4, returns false if IE3 is embedded browser // or if this is the first browser window opened. Thus the // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable. var is_aol = (agt.indexOf("aol") != -1); var is_aol3 = (is_aol && is_ie3); var is_aol4 = (is_aol && is_ie4);
//知られているバグ: AOL4、リターン偽、IE3であるなら、埋め込まれたブラウザ/は/ですかそれとも最初のブラウザウィンドウがこれであるなら開けられますか? したがって、//変数は、_aolであり、_aol3であり、_aol4が100%信頼できないということです。varは_aol=(agt.indexOf(「aol!」)は-1と等しい)です。 varが_aol3=である、(_がaolである、_がie3である、)、。 varが_aol4=である、(_がaolである、_がie4である、)、。
var is_opera = (agt.indexOf("opera") != -1); var is_webtv = (agt.indexOf("webtv") != -1);
varは_オペラ=です(agt.indexOf(「オペラ」)!=-1)。 varは_ウェブTV=です(agt.indexOf(「ウェブTV」)!=-1)。
// *** JAVASCRIPT VERSION CHECK *** var is_js; if (is_nav2 || is_ie3) is_js = 1.0 else if (is_nav3 || is_opera) is_js = 1.1
//***JAVASCRIPT VERSION CHECK***varは_jsです。 (_nav2です|、|、_ie3)、_js=1.0がほか、(_nav3です|、|、_オペラ)、_jsは=1.1です。
Eastlake, et al. Informational [Page 9] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [9ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2 else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3 else if (is_nav5) is_js = 1.4 // NOTE: In the future, update this code when newer versions of JS // are released. For now, we try to provide some upward compatibility // so that future versions of Nav and IE will show they are at // *least* JS 1.x capable. Always check for JS version compatibility // with > or >=. else if (is_nav && (is_major > 5)) is_js = 1.4 else if (is_ie && (is_major > 5)) is_js = 1.3 // HACK: no idea for other browsers; // always check for JS version with > or >= else is_js = 0.0;
ほか、(_がnav4である、(_小さい方の<=4.05です)|、|、_ie4)、_js=1.2がほか、(_がnav4である、(_小さい方の>4.05です)|、|、_ie5)、_js=1.3がほか、(_nav5です) 1.4//_js=注意です: 将来、JS//の、より新しいバージョンがリリースされたらこのコードをアップデートしてください。 当分、私たちは、NavとIEの将来のバージョンが、それらができる//*最少*JS 1.xにあるのを示すように、いくつかの上位互換性//を提供しようとします。 JSバージョン互換性//がないかどうかいつも>か>=に問い合わせてください、ほか、(_がnavである、_ほかにjs=1.4である(_主要な>5です)、(_がieである、(_主要な>5です)) _js=1.3 // HACKです: 他のブラウザのための考えがありません。 /が= ほかにJSバージョンがないかどうかいつも>か>に問い合わせる/は_js=0.0です。
// *** PLATFORM *** var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) ); // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" // on all Win32, so you can't distinguish between Win95 and WinNT. var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
//***PLATFORM***varは_勝利=です((agt.indexOf(「勝つ」)!=-1)| | (agt.indexOf(「16ビット」)!=-1))。 //注意: Opera3.0に、userAgentがインクルードを結ぶ、「あなたがすべてのWin32の上のWindows 95/NT4" //によってWin95を見分けることができないで、WinNT. varが_win95=である、(agt.indexOf、(「win95") =-1、)、|、|、(agt.indexOf、(「窓の95インチ) =-1、)、」、。
// is this a 16 bit compiled version? var is_win16 = ((agt.indexOf("win16")!=-1) || (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("windows 16-bit")!=-1) );
//はこのa16噛み付いているコンパイルされたバージョンです--varが_win16=である、(agt.indexOf、(「win16") | | =-1) (agt.indexOf(「16ビット」)!=-1)|、|、(agt.indexOf、(「窓の3.1インチ) | | =-1) (agt.indexOf(「窓の16ビット」)!=-1)」
var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) || (agt.indexOf("windows 16-bit")!=-1));
varが_win31=である、(agt.indexOf、(「窓の3.1インチ) =-1、)、|、|、(agt.indexOf、(「win16") | | =-1) (agt.indexOf(「窓の16ビット」)!=-1)」
// NOTE: Reliable detection of Win98 may not be possible. // It appears that: // - On Nav 4.x and before you'll get plain "Windows" in userAgent. // - On Mercury client, the 32-bit version will return "Win98", but // the 16-bit version running on Win98 will still return "Win95". var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1)); var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1)); var is_win32 = (is_win95 || is_winnt || is_win98 || ((is_major >= 4) && (navigator.platform == "Win32")) || (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));
//注意: Win98の信頼できる検出は可能でないかもしれません。 //、それは、以下のことを現れさせます。 //--Nav 4.xと以前、あなたはuserAgentの明瞭な「Windows」を得るでしょう。 水星クライアントの//、32ビットのバージョンが戻る、「しかし、Win98"、それでもWin98における16ビットのバージョン走りが返す//、「Win95"varが_win98=である、(agt.indexOf、(「win98") =-1、)、|、|、(agt.indexOf、(「窓の98インチ) =-1、)、;、」 varは_winnt=(agt.indexOf(「winnt!」)=-1)です| | (agt.indexOf(「ウィンドウnt」)!=-1) varが_win32=である、(_win95| | _は|winntします| _win98であるということです|、|、(_主要な>=4です)、(navigator.platform=、「Win32")、|、|、(agt.indexOf、(「win32") | | =-1) (agt.indexOf(「32ビット」)!=-1)」
var is_os2 = ((agt.indexOf("os/2")!=-1) ||
varが_os2=である、(agt.indexOf、(「OS/2インチ) =-1、)、|、|、」
Eastlake, et al. Informational [Page 10] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [10ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
(navigator.appVersion.indexOf("OS/2")!=-1) || (agt.indexOf("ibm-webexplorer")!=-1));
(navigator.appVersion.indexOf(「OS/2!」)=-1)|| (agt.indexOf(「ibm-webexplorer!」)=-1));
var is_mac = (agt.indexOf("mac")!=-1); var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) || (agt.indexOf("68000")!=-1))); var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) || (agt.indexOf("powerpc")!=-1)));
varは_mac=(agt.indexOf(「mac!」)=-1)です。 varが_mac68k=である、(_がmacである、(agt.indexOf(「68k!」)=-1)| | (agt.indexOf(「68000!」)=-1)。 varが_macppc=である、(_がmacである、(agt.indexOf(「ppc!」)=-1)| | (agt.indexOf(「powerpc!」)=-1)。
var is_sun = (agt.indexOf("sunos")!=-1); var is_sun4 = (agt.indexOf("sunos 4")!=-1); var is_sun5 = (agt.indexOf("sunos 5")!=-1); var is_suni86= (is_sun && (agt.indexOf("i86")!=-1)); var is_irix = (agt.indexOf("irix") !=-1); // SGI var is_irix5 = (agt.indexOf("irix 5") !=-1); var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1)); var is_hpux = (agt.indexOf("hp-ux")!=-1); var is_hpux9 = (is_hpux && (agt.indexOf("09.")!=-1)); var is_hpux10= (is_hpux && (agt.indexOf("10.")!=-1)); var is_aix = (agt.indexOf("aix") !=-1); // IBM var is_aix1 = (agt.indexOf("aix 1") !=-1); var is_aix2 = (agt.indexOf("aix 2") !=-1); var is_aix3 = (agt.indexOf("aix 3") !=-1); var is_aix4 = (agt.indexOf("aix 4") !=-1); var is_linux = (agt.indexOf("inux")!=-1); var is_sco = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1); var is_unixware = (agt.indexOf("unix_system_v")!=-1); var is_mpras = (agt.indexOf("ncr")!=-1); var is_reliant = (agt.indexOf("reliantunix")!=-1); var is_dec = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) || (agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) || (agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1)); var is_sinix = (agt.indexOf("sinix")!=-1); var is_freebsd = (agt.indexOf("freebsd")!=-1); var is_bsd = (agt.indexOf("bsd")!=-1); var is_unix = ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux || is_sco ||is_unixware || is_mpras || is_reliant || is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd);
varは_太陽=です(agt.indexOf(「sunos!」)=-1)。 varが_sun4=である、(agt.indexOf、(「4インチ) =-1をsunosする、)、」、。 varが_sun5=である、(agt.indexOf、(「5インチ) =-1をsunosする、)、」、。 varが_suni86=である、(_が太陽である、(agt.indexOf、(「i86") =-1、)、」、。 varは_irix=(agt.indexOf(「irix!」)=-1)です。 //SGI varが_irix5=である、(agt.indexOf、(「irix5インチ) =-1、)、」、。 varが_irix6=である、(agt.indexOf、(「irix6インチ) =-1、)、|、|、(agt.indexOf、(「irix6") =-1、)、;、」 varは_hpux=(agt.indexOf(「hp-ux」)!=-1)です。 varが_hpux9=である、(_がhpuxである、(agt.indexOf(「09!」)=-1)。 varが_hpux10=である、(_がhpuxである、(agt.indexOf(「10!」)=-1)。 varは_aix=(agt.indexOf(「aix!」)=-1)です。 //IBM varが_aix1=である、(agt.indexOf、(「aix1インチ) =-1、)、」、。 varが_aix2=である、(agt.indexOf、(「aix2インチ) =-1、)、」、。 varが_aix3=である、(agt.indexOf、(「aix3インチ) =-1、)、」、。 varが_aix4=である、(agt.indexOf、(「aix4インチ) =-1、)、」、。 varは_linux=(agt.indexOf(「inux!」)=-1)です。 varは_sco=(agt.indexOf(「sco!」)=-1)です。|| (agt.indexOf(「unix_sv!」)=-1)。 varは_unixware=(agt.indexOf(「unix_システム!」) =-1)です。 varは_mpras=(agt.indexOf(「ncr!」)=-1)です。 varが_に頼っている、=(agt.indexOf(「reliantunix!」)=-1)。 DEC社..DEC社..DEC社..アルファ varは_sinix=(agt.indexOf(「sinix!」)=-1)です。 varは_freebsd=(agt.indexOf(「freebsd!」)=-1)です。 varは_bsd=(agt.indexOf(「bsd!」)=-1)です。 unix..日にさらす..頼る..DEC社
var is_vms = ((agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1));
varは_vms=(agt.indexOf(「vax!」)=-1)です| | (agt.indexOf(「openvms!」)=-1)
Eastlake, et al. Informational [Page 11] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [11ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
</SCRIPT>
</スクリプト>。
Authors' Addresses
作者のアドレス
Donald E. Eastlake 3rd Motorola 140 Forest Avenue Hudson, MA 01749 USA
ドナルドE.イーストレーク第3モトローラ140の森林Avenue MA01749ハドソン(米国)
Phone: +1 978-562-2827(h) +1 508-261-5434(w) Fax: +1 508-261-4447(w) EMail: Donald.Eastlake@motorola.com
以下に電話をしてください。 +1 978-562-2827(h)+1 508-261-5434(w)Fax: +1 508-261-4447 (w) メールしてください: Donald.Eastlake@motorola.com
Chris J. Smith Royal Bank of Canada 277 Front Street West Toronto, Ontario M5V 3A4 CANADA
クリスJ.スミスカナダ王立銀行277のフロント・ストリートのオンタリオの西M5V 3A4トロント(カナダ)
Phone: +1 416-348-6090 Fax: +1 416-348-2210 EMail: chris.smith@royalbank.com
以下に電話をしてください。 +1 416-348-6090Fax: +1 416-348-2210 メールしてください: chris.smith@royalbank.com
David M. Soroka IBM Raleigh, NC
デヴィッド・M.Soroka IBMのローリー(NC)
Phone: +1 919-486-2684 Fax: +1 919-543-4653 EMail: dsoroka@us.ibm.com
以下に電話をしてください。 +1 919-486-2684Fax: +1 919-543-4653 メールしてください: dsoroka@us.ibm.com
Eastlake, et al. Informational [Page 12] RFC 2936 HTTP MIME Type Handler Detection September 2000
イーストレーク、他 [12ページ]情報のRFC2936HTTP MIMEの種類操作者検出2000年9月
Full Copyright Statement
完全な著作権宣言文
Copyright (C) The Internet Society (2000). All Rights Reserved.
Copyright(C)インターネット協会(2000)。 All rights reserved。
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
それに関するこのドキュメントと翻訳は、コピーして、それが批評するか、またはそうでなければわかる他のもの、および派生している作品に提供するか、または準備されているかもしれなくて、コピーされて、発行されて、全体か一部広げられた実現を助けるかもしれません、どんな種類の制限なしでも、上の版権情報とこのパラグラフがそのようなすべてのコピーと派生している作品の上に含まれていれば。 しかしながら、このドキュメント自体は何らかの方法で変更されないかもしれません、インターネット協会か他のインターネット組織の版権情報か参照を取り除くのなどように、それを英語以外の言語に翻訳するのが著作権のための手順がインターネットStandardsの過程で定義したどのケースに従わなければならないか、必要に応じてさもなければ、インターネット標準を開発する目的に必要であるのを除いて。
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
上に承諾された限られた許容は、永久であり、インターネット協会、後継者または案配によって取り消されないでしょう。
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
このドキュメントとそして、「そのままで」という基礎とインターネットの振興発展を目的とする組織に、インターネット・エンジニアリング・タスク・フォースが速達の、または、暗示しているすべての保証を放棄するかどうかというここにことであり、他を含んでいて、含まれて、情報の使用がここに侵害しないどんな保証も少しもまっすぐになるという情報か市場性か特定目的への適合性のどんな黙示的な保証。
Acknowledgement
承認
Funding for the RFC Editor function is currently provided by the Internet Society.
RFC Editor機能のための基金は現在、インターネット協会によって提供されます。
Eastlake, et al. Informational [Page 13]
イーストレーク、他 情報[13ページ]
一覧
スポンサーリンク