From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../index.html | 66 +++++++++++ files/ja/mozilla/firefox/releases/1.5/index.html | 122 +++++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 files/ja/mozilla/firefox/releases/1.5/changing_the_priority_of_http_requests/index.html create mode 100644 files/ja/mozilla/firefox/releases/1.5/index.html (limited to 'files/ja/mozilla/firefox/releases/1.5') diff --git a/files/ja/mozilla/firefox/releases/1.5/changing_the_priority_of_http_requests/index.html b/files/ja/mozilla/firefox/releases/1.5/changing_the_priority_of_http_requests/index.html new file mode 100644 index 0000000000..6064899206 --- /dev/null +++ b/files/ja/mozilla/firefox/releases/1.5/changing_the_priority_of_http_requests/index.html @@ -0,0 +1,66 @@ +--- +title: HTTPリクエストの優先順位の変更 +slug: Mozilla/Firefox/Releases/1.5/Changing_the_priority_of_HTTP_requests +tags: + - HTTP +translation_of: Mozilla/Firefox/Releases/1.5/Changing_the_priority_of_HTTP_requests +--- +
{{FirefoxSidebar}}
+ +

イントロダクション

+ +

In Firefox 1.5 (Gecko 1.8), an API was added to support changing the priority of HTTP requests. Prior to this, there was no way to directly indicate that a request was of a different priority. The API is defined in nsISupportsPriority, but is defined in very generic terms so that any object can implement this interface to enable the concept of priority. This article deals specifically with using that interface to change the priority of HTTP requests.

+ +

At the time of this writing, changing the priority of an HTTP request only affects the order in which connection attempts are made. This means that the priority only has an effect when there are more connections (to a server) than are allowed.

+ +

The examples in this document are all written in JavaScript using XPCOM.

+ +

APIの使用

+ +

It should be noted that the value of the priority attribute follows UNIX conventions, with smaller numbers (including negative numbers) having higher priority.

+ +

Accessing priority from an nsIChannel

+ +

To change the priority of an HTTP request, you need access to the nsIChannel that the request is being made on. If you do not have an existing channel, then you can create one as follows:

+ +
var ios = Components.classes["@mozilla.org/network/io-service;1"]
+                    .getService(Components.interfaces.nsIIOService);
+var ch = ios.newChannel("http://www.example.com/", null, null);
+
+ +


+ Once you have an nsIChannel, you can access the priority as follows:

+ +
if (ch instanceof Components.interfaces.nsISupportsPriority) {
+  ch.priority = Components.interfaces.nsISupportsPriority.PRIORITY_LOWEST;
+}
+
+ +

For convenience, the interface defines several standard priority values that you can use, ranging from PRIORITY_HIGHEST to PRIORITY_LOWEST.

+ +

Getting an nsIChannel from XMLHttpRequest

+ +

If you are programming in JavaScript, you will probably want to use XMLHttpRequest, a much higher level abstraction of an HTTP request. You can access the channel member of an XMLHttpRequest once you have called the open method on it, as follows:

+ +
var req = new XMLHttpRequest();
+req.open("GET", "http://www.example.com", false);
+if (req.channel instanceof Components.interfaces.nsISupportsPriority) {
+  req.channel.priority = Components.interfaces.nsISupportsPriority.PRIORITY_LOWEST;
+}
+req.send(null);
+
+ +


+ Note that this example uses a synchronous XMLHttpRequest, which you should not use in practice.

+ +

優先順位の調整

+ +

nsISupportsPriority includes a convenience method named adjustPriority. You should use this if you want to alter the priority of a request by a certain amount. For example, if you would like to make a request have slightly higher priority than it currently has, you could do the following:

+ +
// assuming we already have a nsIChannel from above
+if (ch instanceof Components.interfaces.nsISupportsPriority) {
+  ch.adjustPriority(-1);
+}
+
+ +

Remember that lower numbers mean higher priority, so adjusting by a negative number will serve to increase the request's priority.

diff --git a/files/ja/mozilla/firefox/releases/1.5/index.html b/files/ja/mozilla/firefox/releases/1.5/index.html new file mode 100644 index 0000000000..9b21bb503c --- /dev/null +++ b/files/ja/mozilla/firefox/releases/1.5/index.html @@ -0,0 +1,122 @@ +--- +title: Firefox 1.5 for developers +slug: Mozilla/Firefox/Releases/1.5 +tags: + - Add-ons + - CSS + - DOM + - Extensions + - HTML + - JavaScript + - RDF + - SVG + - Web Development + - Web Standards + - XML + - XML Web Services + - XSLT + - XUL +translation_of: Mozilla/Firefox/Releases/1.5 +--- +

{{FirefoxSidebar}}

+ +

Gecko 1.8 エンジンに基づいて、Firefox 1.5 はクラス最高の標準サポートを改善し、次世代の Web アプリケーションを可能にする新しい機能を提供しました。Firefox 1.5 では、CSS2 と CSS3、SVG 1.1 と <canvas>、XForms と XML イベント、さらに多くの DHTML、JavaScript、DOM 拡張を介したスクリプト可能でプログラム可能な 2D グラフィックスの API のサポートが強化されています。

+ +

開発ツール

+ +

Firefox 1.5 をサポートする開発者を助ける、さまざまなツールやブラウザ拡張機能が利用可能です。

+ + + +

注: いくつかの拡張機能はいまのところ Firefox 1.5 をサポートしていません。これらは自動的に無効になります。

+ +

概説

+ +

Firefox 1.5 での新機能のいくつかを紹介します。

+ +

ウェブサイト、ウェブアプリケーション開発者向け

+ +
+
XHTML の中での SVG についての導入
+
SVG を XHTML ページの中でどのように利用し、JavaScript と CSS を通常の XHTML でのスクリプトと同様な方法で画像を操作する方法について学習します。SVG in Firefox も読み、 Firefox における SVG 実装の問題点と現状について学習してください。
+
Canvas での画像の描き方
+
新しい <canvas> タグについて、Firefox においてどのようにグラフやその他のオブジェクトを描くかについて学習します。
+
CSS3 Columns
+
CSS3 に提案されている自動マルチカラムテキストレイアウトの新規サポートについて学習します。
+
Firefox 1.5 のキャッシュを利用する
+
bfcache と、進む・戻る機能をどのように高速化したかについて学習します。
+
+ +

XUL と拡張機能開発者向け

+ +
+
拡張機能の作成方法
+
このチュートリアルでは、Firefox の最も基礎的な拡張機能を作成するために必要な段階を通して説明します。新しい拡張機能の作成をより簡単にする、Firefox 1.5 での拡張機能マネージャーの新機能のデモを行う MozillaZine ナレッジベースのほかのチュートリアル も参考にしてください。
+
XPCNativeWrapper
+
XPCNativeWrapper は、特権コードから安全にアクセスする ためにオブジェクトを包む方法です。すべての Firefox バージョンで利用可能ですが、Firefox 1.5 (Gecko 1.8) から動作が変更されました。
+
設定機能
+
より少ない JavaScript コードでより簡単にオプションウィンドウを作成可能な新しいウィジェットについて学習します。
+
XUL JavaScript 内部文字コード
+
XUL JavaScript ファイルに、ASCII でない文字を含むことができるようになりました。
+
Tree API の変更
+
XUL <tree> エレメントへのアクセスのインターフェースが変更されました。
+
Firefox 1.5 での XUL の変更
+
XUL についての変更のまとめです。XUL アプリケーションを Firefox 1.5 に対応させる も参考にしてください。
+
ネットワーク関係の変更
+
+ + + +

新しいエンドユーザ向け機能

+ +

ユーザ体験

+ + + +

セキュリティーとプライバシー

+ + + +

オープンなウェブ標準のサポート

+ +

Firefox のウェブ標準のサポートは、一貫性のあるクロスプラットフォームな実装とともに、業界をリードし続けます。

+ + + +

Firefox 1.5 は、データ転送プロトコル (HTTP/FTP/SSL/TLS/その他)、他言語文字データ (Unicode)、画像 (GIF/JPEG/PNG/SVG/その他) や、世界でもっとも普及したスクリプト言語の最新版である JavaScript 1.6 をサポートしています。

+ +

Firefox 1.0 以降の変更

+ +

2004 年 11 月 9 日の最初のリリース以降、さまざまな変更が Firefox へ導入されています。Firefox は多くの新機能とバグ修正により前進してきました。変更点の詳しい一覧は squarefree.com にあります。

-- cgit v1.2.3-54-g00ecf