diff options
Diffstat (limited to 'files/ja/web/http')
242 files changed, 24210 insertions, 0 deletions
diff --git a/files/ja/web/http/authentication/index.html b/files/ja/web/http/authentication/index.html new file mode 100644 index 0000000000..bc7bb26fee --- /dev/null +++ b/files/ja/web/http/authentication/index.html @@ -0,0 +1,144 @@ +--- +title: HTTP èªèšŒ +slug: Web/HTTP/Authentication +tags: + - Access Control + - Authentication + - Guide + - HTTP + - Security + - ã¢ã¯ã»ã¹å¶é + - ã»ãã¥ãªã㣠+ - èªèšŒ +translation_of: Web/HTTP/Authentication +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><span class="seoSummary">HTTP ã¯ã¢ã¯ã»ã¹å¶åŸ¡ãšèªèšŒã®åºæ¬çãªæ çµã¿ãæäŸããŠããŸãããã®ããŒãžã§ã¯ãHTTP ã®èªèšŒã®æ çµã¿ã玹ä»ãããµãŒããŒã§ HTTP ã® "Basic" èªèšŒã䜿çšããŠã¢ã¯ã»ã¹ãå¶éããæ¹æ³ã玹ä»ããŸãã</span></p> + +<h2 id="The_general_HTTP_authentication_framework" name="The_general_HTTP_authentication_framework">äžè¬ç㪠HTTP èªèšŒã®æ çµã¿</h2> + +<p>{{RFC("7235")}} ã¯ããµãŒããŒãã¯ã©ã€ã¢ã³ãèŠæ±ã {{glossary("challenge")}} ããã¯ã©ã€ã¢ã³ããèªèšŒæ
å ±ãæäŸããããã«äœ¿çšã§ãã HTTP èªèšŒãã¬ãŒã ã¯ãŒã¯ãå®çŸ©ããŠããŸãã</p> + +<p>ãã£ã¬ã³ãžãšã¬ã¹ãã³ã¹ã®æµãã¯ä»¥äžã®ããã«ãªããŸãã</p> + +<ol> + <li>ãµãŒããŒã¯å°ãªããšãïŒåã®ãã£ã¬ã³ãžã§ãã¯ã©ã€ã¢ã³ãã« {{HTTPStatus("401")}} (Unauthorized) ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ãè¿ãã {{HTTPHeader("WWW-Authenticate")}} ã¬ã¹ãã³ã¹ããããŒãå«ããŠèªèšŒæ¹æ³ã«é¢ããæ
å ±ãæäŸããŸãã</li> + <li>ãµãŒããŒã§èªèº«ãèªèšŒãããã¯ã©ã€ã¢ã³ã㯠{{HTTPHeader("Authorization")}} ãªã¯ãšã¹ãããããã£ãŒã«ãã«è³æ Œæ
å ±ãå«ããããšã§ãããè¡ãããšãã§ããŸãã</li> + <li>éåžžãã¯ã©ã€ã¢ã³ãã¯ãŠãŒã¶ãŒã«ãã¹ã¯ãŒãã®ããã³ããã衚瀺ããæ£ãã <code>Authorization</code> ããããŒãå«ããªã¯ãšã¹ããçºè¡ããŸãã</li> +</ol> + +<p><img alt="ã¯ã©ã€ã¢ã³ããšãµãŒããŒã®ã©ã€ãã©ã€ã³éã® HTTP ã¡ãã»ãŒãžã説æããã·ãŒã±ã³ã¹å³ã" src="https://mdn.mozillademos.org/files/14689/HTTPAuth.png" style="height: 335px; width: 710px;" title="Sequence Diagram of Client-server HTTP Authentication"></p> + +<p>ãã®å³ã«ç€ºãããã㪠"Basic" èªèšŒã®å Žåãããåãã¯å®å
šã®ããã« HTTPS (TLS) æ¥ç¶ãä»ããŠ<strong>è¡ãããªããã°ãªããŸãã</strong>ã</p> + +<h3 id="Proxy_authentication" name="Proxy_authentication">ãããã·èªèšŒ</h3> + +<p><em>ãããã·èªèšŒ</em>ã«ãåããã£ã¬ã³ãžãšã¬ã¹ãã³ã¹ã®ã¡ã«ããºã ã䜿çšã§ããŸãããªãœãŒã¹èªèšŒãšãããã·èªèšŒã®äž¡æ¹ãå
±åã§ãããããç°ãªãããããŒãšã¹ããŒã¿ã¹ã³ãŒãã®ã»ãããå¿
èŠã§ãããããã·ã®å Žåããã£ã¬ã³ãžã®ã¹ããŒã¿ã¹ã³ãŒã㯠{{HTTPStatus("407")}} (Proxy Authentication Required) ã§ã {{HTTPHeader("Proxy-Authenticate")}} ã¬ã¹ãã³ã¹ããããŒã¯ãããã·ãµãŒããŒã«è³æ Œæ
å ±ãæäŸããããã«ã {{HTTPHeader("Proxy-Authorization")}} ãªã¯ãšã¹ãããããŒã䜿çšãããŸãã</p> + +<h3 id="Access_forbidden" name="Access_forbidden">ã¢ã¯ã»ã¹ã®äžèš±å¯</h3> + +<p>ç¹å®ã®ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããã®ã«ååã§ã¯ãªããæå¹ãªè³æ Œæ
å ±ã (ãããã·) ãµãŒããŒãåãåã£ãå ŽåããµãŒããŒã¯ {{HTTPStatus("403")}} <code>Forbidden</code> ã¹ããŒã¿ã¹ã³ãŒããè¿ãå¿
èŠããããŸãã {{HTTPStatus("401")}} <code>Unauthorized</code> ãŸã㯠{{HTTPStatus("407")}} <code>Proxy Authentication Required</code> ãšã¯ç°ãªãããã®ãŠãŒã¶ãŒã¯èªèšŒã§ããŸããã</p> + +<h3 id="Authentication_of_cross-origin_images" name="Authentication_of_cross-origin_images">ãªãªãžã³éã®ç»åã®èªèšŒ</h3> + +<p>ãã©ãŠã¶ãŒã«ãã£ãŠæè¿ä¿®æ£ãããæœåšçãªã»ãã¥ãªãã£ããŒã«ãšããŠããµã€ãéã§ã®ç»åã®èªèšŒããããŸãã <a href="/ja/docs/Mozilla/Firefox/Releases/59">Firefox 59</a> 以éãç°ãªããªãªãžã³ããçŸåšã®ææžã«èªã¿èŸŒãŸããç»åãªãœãŒã¹ã¯ã HTTP èªèšŒãã€ã¢ãã°ãèµ·åããããšãã§ããªããªã ({{bug(1423146)}})ãæ»æè
ãä»»æã®ç»åããµãŒãããŒãã£è£œã®ããŒãžã«åã蟌ãã§ãŠãŒã¶ãŒã®èªèšŒæ
å ±ãçãããšãé²ããŸãã</p> + +<h3 id="Character_encoding_of_HTTP_authentication" name="Character_encoding_of_HTTP_authentication">HTTP èªèšŒã®æåãšã³ã³ãŒãã£ã³ã°</h3> + +<p>ãã©ãŠã¶ãŒã¯ãŠãŒã¶ãŒåãšãã¹ã¯ãŒãã« <code>utf-8</code> ãšã³ã³ãŒãã£ã³ã°ã䜿çšããŸãã</p> + +<p>Firefox 㯠<code>ISO-8859-1</code> ã䜿çšããŠããŸããããä»ã®ãã©ãŠã¶ãŒãšã®äºææ§ã®ããã« <code>utf-8</code> ã«å€æŽããã {{bug(1419658)}} ã§èª¬æãããŠãããããªæœåšçãªåé¡ãåé¿ããŸãã</p> + +<h3 id="WWW-Authenticate_and_Proxy-Authenticate_headers" name="WWW-Authenticate_and_Proxy-Authenticate_headers">WWW-Authenticate ããã³ Proxy-Authenticate ããããŒ</h3> + +<p>{{HTTPHeader("WWW-Authenticate")}} ããã³ {{HTTPHeader("Proxy-Authenticate")}} ã¬ã¹ãã³ã¹ããããŒã¯ããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ã«äœ¿çšããèªèšŒã¡ãœãããå®çŸ©ããŸããã©ã®èªèšŒæ¹åŒã䜿çšããããæå®ãããããèªèšŒãåžæããã¯ã©ã€ã¢ã³ãã¯è³æ Œæ
å ±ã®æäŸæ¹æ³ãç¥ãããšãã§ããŸãããããã®ããããŒã®æ§æã¯æ¬¡ã®ãšããã§ãã</p> + +<p>ãããã®ããããŒã®æ§æã¯ä»¥äžã®éãã§ãã</p> + +<pre class="syntaxbox notranslate">WWW-Authenticate: <type> realm=<realm> +Proxy-Authenticate: <type> realm=<realm> +</pre> + +<p>ããã§ã <code><type></code> ã¯èªèšŒã¹ããŒã ã§ã ("Basic" ã¯æãäžè¬çãªã¹ããŒã ã§ããã<a href="/ja/docs/Web/HTTP/Authentication#Basic_authentication_scheme">以äžã§çŽ¹ä»</a>ããŸã)ã <em>realm</em> ã¯ä¿è·ãããé åã説æããããããŸãã¯ä¿è·ã®ç¯å²ã瀺ãããã«äœ¿çšãããŸããããã¯ããã¹ããŒãžã³ã°ãµã€ããžã®ã¢ã¯ã»ã¹ããªã©ã®ãããªã¡ãã»ãŒãžã«ããããšãã§ããããã«ãã£ãŠãŠãŒã¶ãŒããã©ã®é åã«ã¢ã¯ã»ã¹ããããšããŠããããç¥ãããšãã§ããŸãã</p> + +<h3 id="Authorization_and_Proxy-Authorization_headers" name="Authorization_and_Proxy-Authorization_headers">Authorization ããã³ Proxy-Authorization ããããŒ</h3> + +<p>{{HTTPHeader("Authorization")}} ããã³ {{HTTPHeader("Proxy-Authorization")}} ãªã¯ãšã¹ãããããŒã«ã¯ã(ãããã·) ãµãŒããŒããŠãŒã¶ãŒãšãŒãžã§ã³ããèªèšŒããè³æ Œæ
å ±ãå
¥ããŸããããã§ã¯ã <code><type></code> ãåã³å¿
èŠãšãªãããã®åŸã«äœ¿çšãããèªèšŒæ¹åŒã«ãã£ãŠç¬Šå·åãŸãã¯æå·åãããè³æ Œæ
å ±ãç¶ããŸãã</p> + +<pre class="syntaxbox notranslate">Authorization: <type> <credentials> +Proxy-Authorization: <type> <credentials> +</pre> + +<h3 id="Authentication_schemes" name="Authentication_schemes">èªèšŒæ¹åŒ</h3> + +<p>äžè¬ç㪠HTTP èªèšŒãã¬ãŒã ã¯ãŒã¯ã¯ãããã€ãã®èªèšŒæ¹åŒã«ãã£ãŠäœ¿çšãããŸããã¹ããŒã ã¯ã»ãã¥ãªãã£åŒ·åºŠãšã¯ã©ã€ã¢ã³ãããŸãã¯ãµãŒããŒãœãããŠã§ã¢ã§ã®å¯çšæ§ãç°ãªãå ŽåããããŸãã</p> + +<p>æãäžè¬çãªèªèšŒæ¹åŒã¯ "Basic" èªèšŒæ¹åŒã§ãããããã«ã€ããŠã¯ä»¥äžã§è©³ãã説æããŸãã IANA ã¯<a class="external external-icon" href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">èªèšŒã¹ããŒã ã®äžèŠ§</a>ã管çããŠããŸããã Amazon AWS ãªã©ã®ãã¹ããµãŒãã¹ãæäŸããä»ã®ã¹ããŒã ããããŸããäžè¬çãªèªèšŒæ¹åŒã«ã¯æ¬¡ã®ãã®ããããŸãã</p> + +<dl> + <dt><strong>Basic</strong></dt> + <dd>{{rfc(7617)}} ãåç
§ã base64 ã§ãšã³ã³ãŒããããè³æ Œæ
å ±ã§ãã詳ããã¯åŸè¿°ããŸãã</dd> + <dt><strong>Bearer</strong></dt> + <dd>{{rfc(6750)}} ãåç
§ã OAuth 2.0 ã§ä¿è·ããããªãœãŒã¹ã«ã¢ã¯ã»ã¹ãããã¢ã©ããŒã¯ã³ã§ãã</dd> + <dt><strong>Digest</strong></dt> + <dd>{{rfc(7616)}} ãåç
§ã Firefox ã§ã¯ md5 ããã·ã¥ã ãã«å¯Ÿå¿ããŠããŸãã SHA æå·åã®å¯Ÿå¿ã«ã€ããŠã¯ {{bug(472823)}} ãåç
§ã</dd> + <dt><strong>HOBA</strong></dt> + <dd>{{rfc(7486)}} 3ç« ãåç
§ãHTTP ãªãªãžã³èªèšŒ (<strong>H</strong>TTP <strong>O</strong>rigin-<strong>B</strong>ound <strong>A</strong>uthentication)ãé»å眲åããŒã¹</dd> + <dt><strong>Mutual</strong></dt> + <dd>{{rfc(8120)}} ãåç
§</dd> + <dt><strong>AWS4-HMAC-SHA256</strong></dt> + <dd><a href="http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html">AWS docs</a> ãåç
§</dd> +</dl> + +<h2 id="Basic_authentication_scheme" name="Basic_authentication_scheme">Basic èªèšŒæ¹åŒ</h2> + +<p>"Basic" HTTP èªèšŒæ¹åŒã¯ {{rfc(7617)}} ã§å®çŸ©ãããŠãããBase64 ã䜿çšããŠãšã³ã³ãŒãããããŠãŒã¶ãŒ ID ãšãã¹ã¯ãŒãã®ãã¢ãšããŠã¯ã¬ãã³ã·ã£ã«ãéä¿¡ããŸãã</p> + +<h3 id="Security_of_basic_authentication" name="Security_of_basic_authentication">Basic èªèšŒã®å®å
šæ§</h3> + +<p>ãŠãŒã¶ãŒ ID ãšãã¹ã¯ãŒãã¯ãããã¯ãŒã¯ãä»ããŠã¯ãªã¢ããã¹ã (base64 ã§ãšã³ã³ãŒããããŠããŸããã base64 ã¯å¯éãšã³ã³ãŒãã§ã) ãšããŠæž¡ãããããã Basic èªèšŒæ¹åŒã¯<strong>å®å
šã§ã¯ãããŸãã</strong>ã Basic èªèšŒãšçµã¿åãã㊠HTTPS/TLS ã䜿çšããå¿
èŠããããŸãããããã®è¿œå ã®ã»ãã¥ãªãã£åŒ·åæ©èœããªãå Žåã¯ãæ©å¯æ
å ±ãéèŠãªæ
å ±ãä¿è·ããããã« Basic èªèšŒã䜿çšããªãã§ãã ããã</p> + +<h3 id="Restricting_access_with_Apache_and_basic_authentication" name="Restricting_access_with_Apache_and_basic_authentication">Apache ãš Basic èªèšŒã«ããã¢ã¯ã»ã¹å¶é</h3> + +<p>Apache ãµãŒããŒäžã®ãã£ã¬ã¯ããªããã¹ã¯ãŒãã§ä¿è·ããã«ã¯ã <code>.htaccess</code> ãã¡ã€ã«ãš <code>.htpasswd</code> ãã¡ã€ã«ãå¿
èŠã§ãã</p> + +<p><code>.htaccess</code> ãã¡ã€ã«ã¯éåžžã次ã®ããã«ãªããŸãã</p> + +<pre class="notranslate">AuthType Basic +AuthName "Access to the staging site" +AuthUserFile /path/to/.htpasswd +Require valid-user</pre> + +<p><code>.htaccess</code> ãã¡ã€ã«ã¯ <code>.htpasswd</code> ãã¡ã€ã«ãåç
§ããåè¡ã«ã¯ãŠãŒã¶ãŒåãšãã¹ã¯ãŒããã³ãã³ (":") ã§åºåã£ãŠèšè¿°ããŸããå®éã®ãã¹ã¯ãŒãã¯<a href="https://httpd.apache.org/docs/2.4/misc/password_encryptions.html">æå·åãããŠãã</a> (ãã®å Žå㯠md5) ã®ã§è¡šç€ºã§ããŸãããå¿
èŠã«å¿ã㊠<code>.htpasswd</code> ãã¡ã€ã«ã®ååãå€æŽããããšãã§ããŸããããã®ãã¡ã€ã«ã«ã¯èª°ã«ãã¢ã¯ã»ã¹ã§ããªãããã«æ³šæããŠãã ããã(Apache ã¯éåžž <code>.ht*</code> ãã¡ã€ã«ãžã®ã¢ã¯ã»ã¹ãçŠæ¢ããããã«èšå®ãããŠããŸã)ã</p> + +<pre class="notranslate">aladdin:$apr1$ZjTqBB3f$IF9gdYAGlMrs2fuINjHsz. +user2:$apr1$O04r.y2H$/vEkesPhVInBByJUkXitA/ +</pre> + +<h3 id="Restricting_access_with_nginx_and_basic_authentication" name="Restricting_access_with_nginx_and_basic_authentication">nginx ãš Basic èªèšŒã«ããã¢ã¯ã»ã¹å¶é</h3> + +<p>nginx ã®å Žåã¯ãä¿è·ããå Žæãšãã¹ã¯ãŒãã§ä¿è·ãããé åã«ååãæå®ãã <code>auth_basic</code> ãã£ã¬ã¯ãã£ããæå®ããå¿
èŠããããŸãã<code>auth_basic_user_file</code> ãã£ã¬ã¯ãã£ãã¯äžã® Apache ã®äŸã®ããã«ãæå·åããããŠãŒã¶ãŒè³æ Œæ
å ±ãå«ã <code>.htpasswd</code> ãã¡ã€ã«ãæããŸãã</p> + +<pre class="notranslate">location /status { + auth_basic "Access to the staging site"; + auth_basic_user_file /etc/apache2/.htpasswd; +}</pre> + +<h3 id="Access_using_credentials_in_the_URL" name="Access_using_credentials_in_the_URL">URL å
ã®èªèšŒæ
å ±ã䜿çšããã¢ã¯ã»ã¹</h3> + +<p>å€ãã®ã¯ã©ã€ã¢ã³ãã§ã¯æ¬¡ã®ããã«ããŠãŒã¶ãŒåãšãã¹ã¯ãŒããå«ããšã³ã³ãŒãããã URL ã䜿çšããŠãã°ã€ã³ããã³ãããåé¿ã§ããŸãã</p> + +<pre class="example-bad notranslate">https://username:password@www.example.com/</pre> + +<p><strong>ãããã® URL ã®äœ¿çšã¯æšå¥šãããŠããŸããã</strong>Chrome ã§ã¯ã»ãã¥ãªãã£äžã®çç±ãããURL ã® <code>username:password@</code> éšåã<a href="https://bugs.chromium.org/p/chromium/issues/detail?id=82250#c7">åé€ãããŸã</a>ã Firefox ã§ã¯ãµã€ããå®éã«èªèšŒãèŠæ±ãããã©ããããã§ãã¯ããããã§ãªãå Žå Firefox ã¯ãŠãŒã¶ãŒã«ã"username" ãšãããŠãŒã¶ãŒå㧠"www.example.com" ãšãããµã€ãã«ãã°ã€ã³ããããšããŠããŸããããŠã§ããµã€ãã¯èªèšŒãå¿
èŠãšããŸãããããã¯ããªããéšãããšããŠããå¯èœæ§ããããŸããããšèŠåããŸãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("WWW-Authenticate")}}</li> + <li>{{HTTPHeader("Authorization")}}</li> + <li>{{HTTPHeader("Proxy-Authorization")}}</li> + <li>{{HTTPHeader("Proxy-Authenticate")}}</li> + <li>{{HTTPStatus("401")}}, {{HTTPStatus("403")}}, {{HTTPStatus("407")}}</li> +</ul> diff --git a/files/ja/web/http/basics_of_http/choosing_between_www_and_non-www_urls/index.html b/files/ja/web/http/basics_of_http/choosing_between_www_and_non-www_urls/index.html new file mode 100644 index 0000000000..02bd3975a5 --- /dev/null +++ b/files/ja/web/http/basics_of_http/choosing_between_www_and_non-www_urls/index.html @@ -0,0 +1,69 @@ +--- +title: www ä»ããš www ãªãã® URL ã®éžæ +slug: Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs +tags: + - Guide + - HTTP + - URL +translation_of: Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary">ãŠã§ããµã€ãã®ç®¡çè
ã®éã§ç¹°ãè¿ããã質åããwww URL ãšé www URL ã®ã©ã¡ããéžæãããã§ãããã®ããŒãžã§ã¯ãäœãæè¯ãã«ã€ããŠã¢ããã€ã¹ãæäŸããŸãã</p> + +<h2 id="What_are_domain_names" name="What_are_domain_names">ãã¡ã€ã³åãšã¯äœã</h2> + +<p>HTTP ã® URL ã§ã¯ãå
é ã® <code>http://</code> ãŸã㯠<code>https://</code> ã«ç¶ãéšåæååããã¡ã€ã³ãšåŒã³ãŸãããã¡ã€ã³åã¯ãææžãååšãããµãŒããŒã«ãã¹ãã£ã³ã°ãããŠããŸãã</p> + +<p>ãµãŒããŒã¯ç©ççãªè£
眮ã§ããå¿
èŠã¯ãããŸãããåãç©ççãªè£
眮äžã«è€æ°ã®ãµãŒããŒãé
眮ã§ããŸãããããã¯è€æ°ã®è£
眮ãã²ãšã€ã®ãµãŒããŒãšããŠæ±ãããããšããããååããŠåçãçæãããããµãŒããŒéã§ãªã¯ãšã¹ãã®è² è·ãåæ£ãããããŸããéèŠãªããšã¯ãæå³çã«<em>ã²ãšã€ã®ãã¡ã€ã³åãã²ãšã€ã®ãµãŒããŒãè¡šã</em>ããšã§ãã</p> + +<h2 id="So_do_I_have_to_choose_one_or_the_other_for_my_web_site" name="So_do_I_have_to_choose_one_or_the_other_for_my_web_site">ã§ã¯ãèªèº«ã®ãŠã§ããµã€ãã§ã©ã¡ãããéžæããªããã°ãªããªãã®ã</h2> + +<ul> + <li><u>ã¯ã</u>ãã²ãšã€ãéžæããŠç¶æããªããã°ãªããŸãããåºæºãšãªãå Žæã«å¿ããŠã©ã¡ããéžæãããã¯ããªã次第ã§ãããã©ã¡ãããéžæãããããããç¶æããŠãã ãããããã«ããããŠãŒã¶ãŒãæ€çŽ¢ãšã³ãžã³ããèŠãŠãŠã§ããµã€ããéŠå°Ÿäžè²«ãããã®ã«ãªããŸããããã¯ãåžžã«éžæãããã¡ã€ã³ã«ãªã³ã¯ãã (ãŠã§ããµã€ãå
ã§çžå¯Ÿ URL ã䜿çšããã°ãé£ããã¯ãªãã§ããã)ãããã³åžžã«åããã¡ã€ã³ãžã®ãªã³ã¯ã (é»åã¡ãŒã«ããœãŒã·ã£ã«ãããã¯ãŒã¯ãªã©ã§) å
±æããããšãå«ã¿ãŸãã</li> + <li><u>ããã</u>ãäºã€æã€ããšãã§ããŸããã©ã¡ããå
¬åŒãªãã¡ã€ã³ã§ãããã«ã€ããŠãäžè²«æ§ãæã£ãŠççŸããªãããšãéèŠã§ãã<strong>ãã®å
¬åŒãªãã¡ã€ã³ã¯<em>æ£èŠå</em>ãšåŒã°ããŸãã</strong>ãã¹ãŠã®çµ¶å¯Ÿãã¹ãªã³ã¯ã§æ£èŠåã䜿çšããã¹ãã§ããããããããã§ãä»ã®ãã¡ã€ã³ãæ©èœãããããšãã§ããŸããHTTP ã§ã¯ã©ã¡ãã®ãã¡ã€ã³ãæ£èŠã®ãã®ã§ãããããŠãŒã¶ãŒãæ€çŽ¢ãšã³ãžã³ã«å¯ŸããŠæããã«ãããšãšãã«ãéæ£èŠã®ãã¡ã€ã³ãæ©èœããŠæ³å®ããããŒãžãæäŸã§ããããã«ããããã®æè¡ã 2 ã€ãããŸãã</li> +</ul> + +<p>åŸã£ãŠãæ£èŠãªãã¡ã€ã³ãšããŠã²ãšã€éžæããŠãã ãã! 以äžã® 2 ã€ã®æè¡ã«ãã£ãŠãéæ£èŠã®ãã¡ã€ã³ãæ©èœãããããšãã§ããŸãã</p> + +<h2 id="Techniques_for_canonical_URLs" name="Techniques_for_canonical_URLs">éæ£èŠã® URL ã®ããã®æè¡</h2> + +<p>ã©ã®ãŠã§ããµã€ãã<em>æ£èŠ</em>ã§ããããéžæããããã®ãããŸããŸãªæ¹æ³ããããŸãã</p> + +<h3 id="Using_HTTP_301_redirects" name="Using_HTTP_301_redirects">HTTP 301 ãªãã€ã¬ã¯ãã䜿çšãã</h3> + +<p>ãã®å Žåã¯éæ£èŠãã¡ã€ã³ãžã®ãªã¯ãšã¹ãã«å¯ŸããŠé©å㪠HTTP {{HTTPStatus(301)}} ã¬ã¹ãã³ã¹ãè¿ãããã«ãHTTP ãªã¯ãšã¹ããåãããµãŒã㌠(ãããããwww URL åããšé www URL åãã¯åãã§ããã) ã®èšå®ãå¿
èŠã§ããããã¯ãéæ£èŠ URL ãžã¢ã¯ã»ã¹ããããšãããã©ãŠã¶ãŒãæ£èŠãªåç URL ãžãªãã€ã¬ã¯ãããŸããäŸãã°é www URL ãæ£èŠãªãã®ãšããŠäœ¿çšããããšãéžæããå Žåã¯ããã¹ãŠã® www URL ããwww ãã€ããªãåçã® URL ã«ãªãã€ã¬ã¯ãããŸãã</p> + +<p>äŸ:</p> + +<ol> + <li>ãµãŒããŒã <code>http://www.example.org/whaddup</code> ãžã®ãªã¯ãšã¹ããåããŸã (æ£èŠã®ãã¡ã€ã³ã example.org ã§ãããšã)ã</li> + <li>ãµãŒããŒã¯ <code>{{HTTPHeader("Location")}}: http://example.org/whaddup</code> ããããŒã䌎ã {{HTTPStatus(301)}} ã³ãŒãã®ã¬ã¹ãã³ã¹ãè¿ããŸãã</li> + <li>ã¯ã©ã€ã¢ã³ãã¯æ£èŠãã¡ã€ã³ <code>http://example.org/whatddup</code> ãžã®ãªã¯ãšã¹ããçºè¡ããŸãã</li> +</ol> + +<p><a href="https://github.com/h5bp/html5-boilerplate">HTML5 boilerplate project</a> ã«ã<a href="https://github.com/h5bp/html5-boilerplate/blob/7a22a33d4041c479d0962499e853501073811887/.htaccess#L219-L258">ãããã¡ã€ã³ããå¥ã®ãã¡ã€ã³ãžãªãã€ã¬ã¯ãããããã« Apache ãèšå®ããæ¹æ³</a> ã®äŸããããŸãã</p> + +<h3 id="Using_<link_relcanonical>" name="Using_<link_relcanonical>"><em><code><link rel="canonical"></code></em> ã䜿çšãã</h3> + +<p>ããŒãžã®æ£èŠã®ã¢ãã¬ã¹ã¯äœãã瀺ããå°çšã® HTML {{HTMLElement("link")}} èŠçŽ ãããŒãžã«è¿œå ã§ããŸããããã¯äººéåãã®ããŒãžãªãŒããŒã«ã¯åœ±é¿ããããŸããããæ€çŽ¢ãšã³ãžã³ã®ã¯ããŒã©ãŒã«å¯ŸããŠããŒãžãå®éã¯ã©ãã«ãããã瀺ããŸãããã®æ¹æ³ã§ã¯æ€çŽ¢ãšã³ãžã³ãåãããŒãžã§äœåºŠãã€ã³ããã¯ã¹ãäœæããããéè€ããã³ã³ãã³ããã¹ãã ã§ãããšå€æãããããæ€çŽ¢ãšã³ãžã³ã®çµæããŒãžã§ããŒãžãæé€ããããã©ã³ã¯ãäžãã£ããããããšããªããªããŸãã</p> + +<p>ãã®ãããªã¿ã°ãè¿œå ãããšãã¯äž¡æ¹ã®ãã¡ã€ã³ã§åãã³ã³ãã³ããæäŸããŠãã©ã® URL ãæ£èŠã§ããããæ€çŽ¢ãšã³ãžã³ã«ç€ºããŸããå
ã»ã©ã®äŸã§ã¯ <code>http://www.example.org/whaddup</code> ã <code>http://example.org/whaddup</code> ãšåãã³ã³ãã³ããæäŸããŠããŸãããhead ã« {{htmlelement("link")}} èŠçŽ ãè¿œå ããŸã:</p> + +<p><code><link href="http://example.org/whaddup" rel="canonical"></code></p> + +<p>ãªãã€ã¬ã¯ãã®å Žåãšç°ãªãããã©ãŠã¶ãŒã®å±¥æŽã§ã¯é www URL ãš www URL ãç¬ç«ããé
ç®ã§ãããšã¿ãªããŸãã</p> + +<h2 id="Make_your_page_work_for_both" name="Make_your_page_work_for_both">ã©ã¡ãã§ãããŒãžãåäœããã</h2> + +<p>ãããã®æè¡ãšäœµããŠã www ã€ããã¡ã€ã³ãš www ãªããã¡ã€ã³ã®äž¡æ¹ã§æ£ããå¿çããããã«ãµãŒããŒãèšå®ããŸãããããŠãŒã¶ãŒããã©ãŠã¶ãŒã® URL ããŒã«ã©ã¡ãã® URL ãå
¥åãããã¯äºæž¬ã§ããŸããã®ã§ããããè¡ãããšã¯ããå©èšã«ãªããŸããããã¯æ£åŒãªå ŽæãšããŠã©ã¡ãã䜿çšãããããéžæãããšããåé¡ã§ããããã®çµæã«å¿ããŠä»ã® URL ããªãã€ã¬ã¯ãããŸãã</p> + +<h2 id="Deciding_the_case" name="Deciding_the_case">ç¶æ³ãå€æãã</h2> + +<p class="entry-title">ããã¯<a href="http://bikeshed.com/">èªè»¢è»çœ®ãå Ž</a>åé¡ãšèããããããšãŠã䞻芳çãªè©±é¡ã§ãããã£ãšæ·±ãèªãã§ã¿ãããšæã£ããããã®ä»¶ã«é¢ãã<a href="https://www.netlify.com/blog/2017/02/28/to-www-or-not-www/">å€ãã®</a><a href="https://www.wpbeginner.com/beginners-guide/www-vs-non-www-which-is-better-for-wordpress-seo/">èšäº</a>ãã芧ãã ããã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="https://www.chrisfinke.com/2011/07/25/what-do-people-type-in-the-address-bar/">Stats on what people type in the URL bar</a> (2011)</li> +</ul> diff --git a/files/ja/web/http/basics_of_http/data_uris/index.html b/files/ja/web/http/basics_of_http/data_uris/index.html new file mode 100644 index 0000000000..62afc21371 --- /dev/null +++ b/files/ja/web/http/basics_of_http/data_uris/index.html @@ -0,0 +1,138 @@ +--- +title: ããŒã¿ URL +slug: Web/HTTP/Basics_of_HTTP/Data_URIs +tags: + - Base64 + - Guide + - HTTP + - Intermediate + - URL +translation_of: Web/HTTP/Basics_of_HTTP/Data_URIs +--- +<div>{{HTTPSidebar}}</div> + +<p><strong>ããŒã¿ URL</strong> 㯠<code>data:</code> ã¹ããŒã ãå
é ã«ã€ãã URL ã§ãå°ããªãã¡ã€ã«ãã€ã³ã©ã€ã³ã§ææžã«åã蟌ãããšãã§ããŸãã以åã WHATWG ã§åãäžãããããŸã§ã¯ "data URIs" ãšåŒã°ããŠããŸããã</p> + +<div class="note"> +<p><strong>泚</strong>: æè¿ã®ãã©ãŠã¶ãŒã§ã¯ãããŒã¿ URL ã¯ããã²ãŒã·ã§ã³ãæ
åœããèšå®ãªããžã§ã¯ãã®èµ·æºãç¶æ¿ããã®ã§ã¯ãªããäžæã®äžéæãªèµ·ç¹ãšããŠæ±ãããŸãã</p> +</div> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p>ããŒã¿ URL ã¯æ¥é èŸ (<code>data:</code>)ãããŒã¿ã®çš®é¡ã瀺ã <a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME ã¿ã€ã</a>ãããã¹ãã§ã¯ãªãããŒã¿ã§ããå Žåã®ãªãã·ã§ã³ã§ãã <code>base64</code> ããŒã¯ã³ãããŒã¿èªäœã® 4 ã€ã®éšåã§æ§æãããŸãã</p> + +<pre class="syntaxbox notranslate">data:[<mediatype>][;base64],<data> +</pre> + +<p><code>mediatype</code> 㯠<a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME ã¿ã€ã</a>ã§, äŸãã° <code>'image/jpeg'</code> 㧠JPEG ç»åãè¡šããŸããçç¥æã®æ¢å®å€ã¯ <code>text/plain;charset=US-ASCII</code> ã§ãã</p> + +<p>ããŒã¿ãæåãªãã°ããã®ãŸãŸåã蟌ããŸã (åã蟌ãææžã¿ã€ãã«å¿ããŠãé©åãªå®äœåç
§ããšã¹ã±ãŒããè¡ãªã£ãŠãã ãã)ããã以å€ã§ã¯ <code>base64</code> ãæå®ãã base64 ãšã³ã³ãŒããããã€ããªããŒã¿ãåã蟌ã¿ãŸãã MIME ã¿ã€ãã«ã€ããŠã®è©³ããæ
å ±ã¯<a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">ãã¡ã</a>ã<a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types">ãã¡ã</a>ã«ãããŸãã</p> + +<p>äŸ:</p> + +<dl> + <dt><code>data:,Hello%2C%20World!</code></dt> + <dd>å¹³æ㪠text/plain ããŒã¿ã§ããåŒçšç¬Šã空çœã«ã¯<a href="/ja/docs/Glossary/percent-encoding">ããŒã»ã³ããšã³ã³ãŒãã£ã³ã°</a> (URL ãšã³ã³ãŒãã£ã³ã°) ã䜿çšããŸãããŸãã CSV ããŒã¿ (MIME ã¿ã€ã㯠"text/csv") ãã¹ãã¬ããã·ãŒãã®è¡ãåºåãããã®æ¹è¡æåãä¿åããããã«ããŒã»ã³ããšã³ã³ãŒãã£ã³ã°ãå¿
èŠã§ãã</dd> + <dt><code>data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==</code></dt> + <dd>åãå
容㮠base64 ãšã³ã³ãŒãç</dd> + <dt><code>data:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E</code></dt> + <dd><code><h1>Hello, World!</h1></code> ãšãã HTML ææž</dd> + <dt><code>data:text/html,<script>alert('hi');</script></code></dt> + <dd>JavaScript ã®ã¢ã©ãŒããå®è¡ãã HTML ææžãçµäºã¿ã°ãå¿
èŠã§ãã®ã§æ³šæããŠãã ããã</dd> +</dl> + +<h2 id="Encoding_data_into_base64_format" name="Encoding_data_into_base64_format">ããŒã¿ã® base64 圢åŒãžã®ãšã³ã³ãŒã</h2> + +<p>Base64 ã¯ãã€ããªããããã¹ããžã®ãšã³ã³ãŒãæ¹æ³ã®éãŸãã§ããã€ããªããŒã¿ã64é²æ°è¡šçŸã«å€æããããšã§ ASCII æåå圢åŒã«ãããã®ã§ãã ASCII æåã®ã¿ããæãããã Base64 ã®æååã¯äžè¬ã« URL ã§ãå®å
šã§ãã®ã§ãããŒã¿ URL ã®ããŒã¿ã®ãšã³ã³ãŒãã«å©çšããããšãã§ããŸãã</p> + +<h3 id="Encoding_in_Javascript" name="Encoding_in_Javascript">Javascript ã§ã®ãšã³ã³ãŒã</h3> + +<p>Web API ã«ã¯ã Base64 ããšã³ã³ãŒããŸãã¯ãã³ãŒãããããã®ãã€ãã£ãã¡ãœããã <a href="/ja/docs/Web/API/WindowBase64/Base64_encoding_and_decoding">Base64 encoding and decoding</a> ããããŸãã</p> + +<h3 id="Encoding_on_a_Unix_system" name="Encoding_on_a_Unix_system">Unix ã·ã¹ãã ã§ã®ãšã³ã³ãŒã</h3> + +<p>Linux ã Mac OS X ã·ã¹ãã ã§ã®ãã¡ã€ã«ãŸãã¯æååã® Base64 ãšã³ã³ãŒãã¯ãã³ãã³ãã©ã€ã³ã® <code>base64</code> (ãŸãã¯ãä»ã«ã <code>uuencode</code> ãŠãŒãã£ãªãã£ã® <code>-m</code> ãªãã·ã§ã³ã€ã) ã䜿çšããŠå®çŸã§ããŸãã</p> + +<pre class="brush: bash notranslate">echo -n hello|base64 +# ã³ã³ãœãŒã«ãžã®åºå: aGVsbG8= + +echo -n hello>a.txt +base64 a.txt +# ã³ã³ãœãŒã«ãžã®åºå: aGVsbG8= + +base64 a.txt>b.txt +# b.txt ãã¡ã€ã«ãžã®åºå: aGVsbG8= +</pre> + +<h3 id="Encoding_on_Microsoft_Windows" name="Encoding_on_Microsoft_Windows">Microsoft Windows ã§ã®ãšã³ã³ãŒã</h3> + +<p>Windows ã§ã¯ã <a href="https://docs.microsoft.com/ja-jp/dotnet/api/system.convert.tobase64string?view=net-5.0">Convert.ToBase64String</a> ã PowerShell ã§äœ¿çšããããšã§ Base64 ãšã³ã³ãŒããè¡ãããšãã§ããŸãã</p> + +<pre class="syntaxbox notranslate">[convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("hello")) +# outputs to console: aGVsbG8= +</pre> + +<p>ä»ã«ãã GNU/Linux ã·ã§ã« (<a href="https://ja.wikipedia.org/wiki/Windows_Subsystem_for_Linux">WSL</a> ãªã©) ã <code>base64</code> ãŠãŒãã£ãªãã£ãæäŸããŠããŸãã</p> + +<pre class="syntaxbox notranslate">bash$ echo -n hello | base64 +# outputs to console: aGVsbG8= +</pre> + +<h2 id="Common_problems" name="Common_problems">ããããåé¡</h2> + +<p>ãã®ç« ã§ã¯ <code>data</code> ã® URL ãäœã£ãã䜿ã£ãããããšãã«ãããèµ·ããåé¡ã«ã€ããŠè¿°ã¹ãŸãã</p> + +<pre class="notranslate">data:text/html,lots of text...<p><a name%3D"bottom">bottom</a>?arg=val +</pre> + +<p>ããã¯æ¬¡ã®å
容㮠HTML ãªãœãŒã¹ãè¡šããŸãã</p> + +<pre class="notranslate">lots of text...<p><a name="bottom">bottom</a>?arg=val +</pre> + +<dl> + <dt>æ§æ</dt> + <dd><code>data</code> URL ã®æžåŒã¯éåžžã«åçŽã§ããã"ããŒã¿" éšåã®åã«ã«ã³ãã眮ãã®ãå¿ããã¡ã§ããå¿ãããšããŒã¿ãæ£ãã base64 圢åŒã«ãšã³ã³ãŒããããŸããã</dd> + <dt>HTML ã«ããããã©ãŒããã</dt> + <dd><code>data</code> ã¯ãã¡ã€ã«å
ã§ãã¡ã€ã«ãæäŸããŸãããå€åŽã®ææžã«æ¯ã¹ãŠå¹
ããšãŠãåºããªãå¯èœæ§ããããŸãã URL ãšããŠã¯ã <code>data</code> ã¯ãã¯ã€ãã¹ããŒã¹ (æ¹è¡ãã¿ãã空çœ) ã§äœè£ãæŽããããšãã§ããã¯ãã§ããã <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=73026#c12">base64 ãšã³ã³ãŒãããããšèµ·ããåé¡</a> ããããŸãã</dd> + <dt>é·ãã®å¶é</dt> + <dd>Firefox ã¯åºæ¬çã«é·ãå¶éã®ãªã <code>data</code> URL ã«å¯Ÿå¿ããŠããŸããããã©ãŠã¶ãŒã¯ç¹å®ã®æ倧é·ã®ããŒã¿ã«å¯Ÿå¿ããå¿
èŠã¯ãããŸãããããšãã°ã Opera 11 ãã©ãŠã¶ãŒã§ã¯ URL ã65535æåã«å¶éãããŠããã <code>data</code> URL ã¯65529æåã«å¶éãããŠããŸã (65529æåã¯ã MIME ã¿ã€ããæå®ããã«ãã¬ãŒã³ã® <code>data:</code> ã䜿çšããå ŽåããœãŒã¹ã§ã¯ãªããšã³ã³ãŒããããããŒã¿ã®é·ãã§ã)ã</dd> + <dt>ãšã©ãŒåŠçã®æ¬ åŠ</dt> + <dd>ã¡ãã£ã¢å
ã®äžæ£ãªåŒæ°ãã <code>'base64'</code> ã®å®çŸ©å
ã®æã¡ééãã¯ç¡èŠãããäœããšã©ãŒã¯åºãŸããã</dd> + <dt>ã¯ãšãªæååã®ãµããŒãã®æ¬ åŠããªã©</dt> + <dd> + <p>ããŒã¿ URL ã®ããŒã¿éšåã¯äžéæ (opaque) ãªã®ã§ãããŒã¿ URL ãšäžç·ã«ã¯ãšãªæåå (<code><url>?parameter-data</code> ãšããæ§æã§è¡šãããããŒãžåºæã®ãã©ã¡ãŒã¿) ã䜿ããšãããŒã¿ URL ãè¡šçŸããããŒã¿ã«åã«ã¯ãšãªæååãå«ãŸãããã®ã«ãªããŸãã</p> + </dd> + <dt>ã»ãã¥ãªãã£ã®èª²é¡</dt> + <dd>å€æ°ã®ã»ãã¥ãªãã£åé¡ (ãã£ãã·ã³ã°ãªã©) ãããŒã¿ URL ã«é¢é£ä»ããããŠããããã©ãŠã¶ãŒã®æäžäœã§ãããã«ç§»åããŠããŸãããã®ãããªåé¡ã軜æžããããã«ãFirefox 59+ (ãªãªãŒã¹çãNightly/Beta ã¯58以é) ã§ã¯ <code>data://</code> URL ãžã®ãããã¬ãã«ã®ããã²ãŒã·ã§ã³ããããã¯ãããŠãããä»ã®ãã©ãŠã¶ãããã«å¯Ÿå¿ããããšãæåŸ
ããŠããŸãã詳现ã«ã€ããŠã¯ã<a href="https://blog.mozilla.org/security/2017/11/27/blocking-top-level-navigations-data-urls-firefox-58/">Firefox 58 ã«ãããããŒã¿ URL ãžã®ãããã¬ãã«ããã²ãŒã·ã§ã³ã®ãããã¯</a>ãåç
§ããŠãã ããã</dd> +</dl> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + <tr> + <td>{{RFC("2397")}}</td> + <td>The "data" URL scheme</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>{{compat("http.data-url")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/API/WindowBase64/Base64_encoding_and_decoding">Base64 ã®ãšã³ã³ãŒããšãã³ãŒã</a></li> + <li><a href="/ja/docs/Glossary/percent-encoding">ããŒã»ã³ããšã³ã³ãŒãã£ã³ã°</a></li> + <li>{{domxref("WindowBase64.atob","atob()")}}</li> + <li>{{domxref("WindowBase64.btoa","btoa()")}}</li> + <li><a href="/ja/docs/Web/CSS/uri">CSS <code>url()</code></a></li> + <li><a href="/ja/docs/Glossary/URI">URI</a></li> +</ul> diff --git a/files/ja/web/http/basics_of_http/evolution_of_http/index.html b/files/ja/web/http/basics_of_http/evolution_of_http/index.html new file mode 100644 index 0000000000..4357788871 --- /dev/null +++ b/files/ja/web/http/basics_of_http/evolution_of_http/index.html @@ -0,0 +1,210 @@ +--- +title: HTTP ã®é²å +slug: Web/HTTP/Basics_of_HTTP/Evolution_of_HTTP +tags: + - Guide + - HTTP + - NeedsUpdate + - NeedsUpdate(HTTP/3) +translation_of: Web/HTTP/Basics_of_HTTP/Evolution_of_HTTP +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><span class="seoSummary"><strong>HTTP</strong> 㯠World Wide Web ãæ¯ãããããã³ã«ã§ãã</span> Tim Berners-Lee ã«ãã£ãŠ 1989-1991 幎ã«éçºããããŠãããHTTP ã«ã¯ã·ã³ãã«ãã®ã»ãšãã©ãç¶æããªããæè»æ§ãããã«åœ¢äœããå€ãã®å€æŽãã¿ãããŸãã <span class="seoSummary">HTTP ã¯åæã®ããã¶ãä¿¡é Œãããç 究æã®ç°å¢å
ã§ãã¡ã€ã«ã亀æãããããã³ã«ãããçŸä»£ã®ã€ã³ã¿ãŒãããã®è¿·å®®ã§é«è§£å床ã 3D ã®ç»åãåç»ãéã¶ãããã³ã«ã«é²åããŸããã</span></p> + +<h2 id="Invention_of_the_World_Wide_Web" name="Invention_of_the_World_Wide_Web">World Wide Web ã®çºæ</h2> + +<p>1989 幎ã CERN ã§åããŠãã Tim Berners-Lee ã¯ãã€ã³ã¿ãŒãããäžã®ãã€ããŒããã¹ãã·ã¹ãã ãæ§ç¯ããããã®ææ¡æžãå·çããŸãããåœå <em>Mesh</em> ãšåŒã°ããŠãããã®ã·ã¹ãã ã¯ã1990 幎ã«å®è£
ãããŠããéã« <em>World Wide Web</em> ãžæ¹åãããŸããã World Wide Web ã¯æ¢åã® TCP ããã³ IP ãããã³ã«äžã«æ§ç¯ããã4 ã€ã®èŠçŽ ããæ§æãããŸãã:</p> + +<ul> + <li>ãã€ããŒããã¹ãææžãè¡šçŸããããã¹ã圢åŒã§ãã <em><a href="/ja/docs/Web/HTML">HyperText Markup Language</a></em> (HTML)ã</li> + <li>ãããã®ææžã亀æããã·ã³ãã«ãªãããã³ã«ã§ãã <em>HypertText Transfer Protocol </em>(HTTP)ã</li> + <li>ãããã®ææžã衚瀺 (ããã³ä»éçã«ç·šé) ããã¯ã©ã€ã¢ã³ãã§ããã<em>WorldWideWeb</em> ãšåŒã°ããæåã®ãŠã§ããã©ãŠã¶ãŒã</li> + <li>ææžãžã®ã¢ã¯ã»ã¹æ©èœãæäŸãããµãŒããŒã§ããã<em>httpd</em> ã®åæããŒãžã§ã³ã</li> +</ul> + +<p>ããã 4 ã€ã®æ§æèŠçŽ 㯠1990 幎ã®æ«ã«å®æããŠãæåã®ãµãŒããŒãæ©ãã 1991 幎ã®åæã« CERN ã®å€éšã§çšŒåããŸããã1991 幎 8 æ 6 æ¥ã®ã Tim Berners-Lee ã«ãã <em>alt.hypertext</em> å
¬éãã¥ãŒã¹ã°ã«ãŒããžã® <a href="https://www.w3.org/People/Berners-Lee/1991/08/art-6484.txt">æçš¿</a> ããå
¬éãããžã§ã¯ããšããŠã® World Wide Web ã®å
¬åŒãªéå§æ¥ãšèããããŠããŸãã</p> + +<p>åæ段éã§äœ¿çšããã HTTP ãããã³ã«ã¯ãšãŠãã·ã³ãã«ã§ãããåŸã« HTTP/0.9 ãšåä»ãããããŸãæã«ã¯ã¯ã³ã©ã€ã³ãããã³ã«ãšãåŒã°ããŸããã</p> + +<h2 id="HTTP0.9_â_The_one-line_protocol" name="HTTP0.9_â_The_one-line_protocol">HTTP/0.9 â ã¯ã³ã©ã€ã³ãããã³ã«</h2> + +<p>åæããŒãžã§ã³ã® HTTP ã«ã¯ããŒãžã§ã³çªå·ããããŸããã§ããã以éã®ããŒãžã§ã³ãšåºå¥ãããããåŸã« 0.9 ãšåŒã°ããããã«ãªããŸãããHTTP/0.9 ã¯ãšãŠãåçŽã§ãããªã¯ãšã¹ãã¯å¯äžäœ¿çšå¯èœãªã¡ãœããã§ãã {{HTTPMethod("GET")}} ã§å§ãŸã£ãŠããªãœãŒã¹ãžã®ãã¹ (ãµãŒããŒã«æ¥ç¶ããã°ãããã³ã«ããµãŒããŒåãããŒããå¿
èŠã§ã¯ãªããªãããã URL ã§ã¯ãããŸãã) ãåŸã«ç¶ã 1 è¡ã§æ§æãããŸãã</p> + +<pre class="notranslate">GET /mypage.html</pre> + +<p>ã¬ã¹ãã³ã¹ãããšãŠãåçŽã§ãããã¡ãã¯ãã¡ã€ã«èªèº«ã ãã§æ§æãããŸãã</p> + +<pre class="notranslate"><HTML> +A very simple HTML page +</HTML></pre> + +<p>以éã®é²å圢ãšã¯ç°ãªããHTTP ããããŒããªã HTML ãã¡ã€ã«ã ãã転éå¯èœã§ãããä»ã®çš®é¡ã®ææžã¯è»¢éã§ããŸããããŸããã¹ããŒã¿ã¹ããšã©ãŒã®ã³ãŒãã¯ãããŸãããåé¡ãçºçãããšã人éã䜿çšããããã«åé¡ã®èª¬æãåããå°çšã® HTML ãã¡ã€ã«ãè¿éããŸãã</p> + +<h2 id="HTTP1.0_â_Building_extensibility" name="HTTP1.0_â_Building_extensibility">HTTP/1.0 â æ¡åŒµæ§ãç¯ã</h2> + +<p>HTTP/0.9 ã¯å¶çŽããšãŠãå€ããããå€ç®çã«äœ¿çšã§ããããã«ãã©ãŠã¶ãŒããµãŒããŒããã¡æ©ãæ¡åŒµããŸããã</p> + +<ul> + <li>åãªã¯ãšã¹ãã§ããŒãžã§ã³æ
å ±ãéä¿¡ããããã«ãªããŸãã (<code>HTTP/1.0</code> ã <code>GET</code> ã®è¡ã«è¿œå ãããŸãã)ã</li> + <li>ã¬ã¹ãã³ã¹ã®å§ãã«ã¹ããŒã¿ã¹ã³ãŒãã®è¡ãéä¿¡ãããã©ãŠã¶ãŒèªäœããªã¯ãšã¹ãã®æåãŸãã¯å€±æãç解ããŠããã®çµæã«å¿ããŠåäœãé å¿ã§ãã (ç¹å®ã®æ¹æ³ã§ããŒã«ã«ã®ãã£ãã·ã¥ãæŽæ°ãŸãã¯äœ¿çšãããªã©) ããã«ãªããŸãã</li> + <li>ãªã¯ãšã¹ããšã¬ã¹ãã³ã¹ã®äž¡æ¹ã§ HTTP ããããŒã®æŠå¿µãå°å
¥ããŠãã¡ã¿ããŒã¿ã®éä¿¡ãå¯èœã«ãããšãšãã«ãããã³ã«ã極ããŠæè»ãã€æ¡åŒµå¯èœã«ããŸããã</li> + <li>æ°ã㪠HTTP ããããŒã®å©ããåããŠããã¬ãŒã³ HTML ãã¡ã€ã«ä»¥å€ã®ææžã転éããæ©èœãè¿œå ãã ({{HTTPHeader("Content-Type")}} ããããŒã®ããã)ã</li> +</ul> + +<p>ãã®æç¹ã§ãäžè¬çãªãªã¯ãšã¹ããšã¬ã¹ãã³ã¹ã¯ãã®ããã«ãªããŸããã</p> + +<pre class="notranslate">GET /mypage.html HTTP/1.0 +User-Agent: NCSA_Mosaic/2.0 (Windows 3.1) + +200 OK +Date: Tue, 15 Nov 1994 08:12:31 GMT +Server: CERN/3.0 libwww/2.17 +Content-Type: text/html +<HTML> +A page with an image + <IMG SRC="/myimage.gif"> +</HTML></pre> + +<p>次ã®ã³ãã¯ã·ã§ã³ãç¶ããŠãç»åã®èªã¿èŸŒã¿ããªã¯ãšã¹ãããŸã (åã®ãªã¯ãšã¹ãã®ã¬ã¹ãã³ã¹ã«ç¶ããŸã)ã</p> + +<pre class="notranslate">GET /myimage.gif HTTP/1.0 +User-Agent: NCSA_Mosaic/2.0 (Windows 3.1) + +200 OK +Date: Tue, 15 Nov 1994 08:12:32 GMT +Server: CERN/3.0 libwww/2.17 +Content-Type: text/gif +<em>(ç»åã³ã³ãã³ã)</em></pre> + +<p>ãããã®æ°æ©èœã¯å調äœæ¥ã«ãããã1991 幎ãã 1995 幎ã®éã«è©Šè¡é¯èª€ã«ãã£ãŠå°å
¥ãããŸããããµãŒããŒãšãã©ãŠã¶ãŒã«ããæ©èœãè¿œå ããŠãå¹æããããã確èªããŠããŸãããå€ãã®çžäºéçšæ§ã®åé¡ãæ¥åžžè¶é£¯äºã§ããã1996 幎 11 æã«ãããã®åé¡ã解æ¶ãããããå
±éã®æ
£è¡ã説æããæ
å ±ææžã§ãã {{RFC(1945)}} ãçºè¡ãããŸããããã㯠HTTP/1.0 ã®å®çŸ©ã§ãããç矩ã®æå³ã§å
¬åŒã®æšæºã§ã¯ãªãããšã¯æ³šç®ã«å€ããŸãã</p> + +<h2 id="HTTP1.1_â_The_standardized_protocol" name="HTTP1.1_â_The_standardized_protocol">HTTP/1.1 â æšæºåããããããã³ã«</h2> + +<p>ããŸããŸãª HTTP/1.0 ã®äœ¿çšã«ããããæ··æ²ããç¶æ³ãšäžŠè¡ããŠãHTTP/1.0 ã®ææžã®å
¬éãç¿å¹Žã«æ§ãã 1995 幎ãããæ£åŒãªæšæºåãé²ããããŸãããHTTP ã§æåã«æšæºåãããããŒãžã§ã³ã§ãã HTTP/1.1 ããHTTP/1.0 ããæ°ãæåŸã§ãã 1997 幎åé ã«å
¬éãããŸããã</p> + +<p>HTTP/1.1 ã§ã¯ãããŸããªéšåãæ確ã«ãããšãšãã«ãããã€ãã®æ¹è¯ãæœããŸãã:</p> + +<ul> + <li>ã³ãã¯ã·ã§ã³ã®åå©çšãå¯èœã«ãªããŸãããæåã«åã蟌ãã ã²ãšã€ã®ææžå
ã«åã蟌ãŸããŠãããªãœãŒã¹ã衚瀺ããããã«ãã³ãã¯ã·ã§ã³ãäœåºŠãéãæéãç¯çŽããŸãã</li> + <li>ãã€ãã©ã€ã³æ©èœãè¿œå ããŸãããæåã®ãªã¯ãšã¹ããžã®åçãå®å
šã«è»¢éãããåã«æ¬¡ã®ãªã¯ãšã¹ããéä¿¡ã§ããéä¿¡ã®ã¬ã€ãã³ã·ãŒãåæžããŸãã</li> + <li>Chunked 圢åŒã®ã¬ã¹ãã³ã¹ããµããŒãããŸããã</li> + <li>æ°ããªãã£ãã·ã¥å¶åŸ¡ã®ä»çµã¿ãè¿œå ããŸããã</li> + <li>èšèªããšã³ã³ãŒãã£ã³ã°ãã¿ã€ãã®ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ãå°å
¥ããŸãããã¯ã©ã€ã¢ã³ããšãµãŒããŒãããã£ãšãé©åãªã³ã³ãã³ãã亀æããããåæããããšãã§ããŸãã</li> + <li>åã IP ã¢ãã¬ã¹ã§ç°ãªããã¡ã€ã³ãæäŸã§ãã {{HTTPHeader("Host")}} ããããŒã®ãããã§ããµãŒããŒã®ã³ãã±ãŒã·ã§ã³ãå¯èœã«ãªããŸããã</li> +</ul> + +<p>ã²ãšã€ã®ã³ãã¯ã·ã§ã³ã§è¡ãããå
žåçãªãªã¯ãšã¹ãã®ãããŒã¯ã以äžã®ããã«ãªããŸããã</p> + +<pre class="notranslate">GET /en-US/docs/Glossary/Simple_header HTTP/1.1 +Host: developer.mozilla.org +User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-US,en;q=0.5 +Accept-Encoding: gzip, deflate, br +Referer: https://developer.mozilla.org/en-US/docs/Glossary/Simple_header + +200 OK +Connection: Keep-Alive +Content-Encoding: gzip +Content-Type: text/html; charset=utf-8 +Date: Wed, 20 Jul 2016 10:55:30 GMT +Etag: "547fa7e369ef56031dd3bff2ace9fc0832eb251a" +Keep-Alive: timeout=5, max=1000 +Last-Modified: Tue, 19 Jul 2016 00:59:33 GMT +Server: Apache +Transfer-Encoding: chunked +Vary: Cookie, Accept-Encoding + +<em>(ã³ã³ãã³ã)</em> + + +GET /static/img/header-background.png HTTP/1.1 +Host: developer.cdn.mozilla.net +User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0 +Accept: */* +Accept-Language: en-US,en;q=0.5 +Accept-Encoding: gzip, deflate, br +Referer: https://developer.mozilla.org/en-US/docs/Glossary/Simple_header + +200 OK +Age: 9578461 +Cache-Control: public, max-age=315360000 +Connection: keep-alive +Content-Length: 3077 +Content-Type: image/png +Date: Thu, 31 Mar 2016 13:34:46 GMT +Last-Modified: Wed, 21 Oct 2015 18:27:50 GMT +Server: Apache + +<em>(3077 ãã€ãã®ç»åã³ã³ãã³ã)</em></pre> + +<p>HTTP/1.1 ã¯ã1997 幎 1 æã« {{rfc(2068)}} ãšããŠåçãçºè¡ãããŸããã</p> + +<h2 id="More_than_15_years_of_extensions" name="More_than_15_years_of_extensions">15 幎以äžã«ãããæ¡åŒµ</h2> + +<p>HTTP ã®æ¡åŒµæ§ (æ°ããªããããŒãã¡ãœããã容æã«è¿œå ã§ãã) ã®ãããã§ãHTTP/2 ãå
¬éãããåã« 1999 幎 1 æã«çºè¡ããã {{RFC("2616")}} ã 2014 幎 6 æã«çºè¡ããã {{RFC("7230")}}-{{RFC("7235")}} ã«ãã£ãŠ HTTP/1.1 ãããã³ã«ã 2 床æ¹çãããŠãããã®ãããã³ã«ã¯ 15 幎以äžã«ããã£ãŠæ¥µããŠå®å®ããŠããŸããã</p> + +<h3 id="Using_HTTP_for_secure_transmissions" name="Using_HTTP_for_secure_transmissions">å®å
šãªè»¢éã®ããã« HTTP ã䜿çšãã</h3> + +<p>HTTP ã§ãã£ãšã倧ããªå€åããæ©ãã 1994 幎ã®æ«ã«çºçããŸãããåºæ¬ç㪠TCP/IP ã¹ã¿ãã¯äžã§ HTTP ãéä¿¡ãããããã«ãTCP/IP ã®äžå±€ã«è¿œå ããæå·åããã転éã¬ã€ã€ãŒã§ãã SSL ã Netscape Communications ãéçºããŸãããSSL 1.0 ã¯ç€Ÿå€ã«å
¬éãããŸããã§ããããSSL 2.0 ãšãã®åŸç¶ã§ãã SSL 3.0 ã¯ããµãŒããŒãšã¯ã©ã€ã¢ã³ãã®éã§äº€æãããã¡ãã»ãŒãžã®æå·åããã³ä¿¡é Œæ§ã®ä¿èšŒã«ãã£ãŠãé»ååååŒã®ãŠã§ããµã€ãã®äœæãå¯èœã«ããŸããã SSL ã¯æšæºåã®éçšã«ä¹ããããŠæçµçã« TLS ã«ãªããããŒãžã§ã³ 1.0ã1.1ã1.2ã1.3 ãè匱æ§ãæããããšã«æåããŸããã</p> + +<p>ãããšåæã«ãæå·åããããã©ã³ã¹ããŒãå±€ã®å¿
èŠæ§ãçºçããŸããããŠã§ããäž»ã«åŠè¡çšãããã¯ãŒã¯ã«ããæ¯èŒçä¿¡é Œãããç¶æ³ã倱ã£ãŠãåºåè
ãããŸããŸãªå人ãç¯çœªè
ã人ã
ã®å人æ
å ±ãå€ãåŸãããšç«¶ãåãããªãããŸããæ¹å€ãããããŒã¿ã«ãã眮ãæããå³ãããã«ãªããŸãããHTTP äžã«æ§ç¯ãããã¢ããªã±ãŒã·ã§ã³ãããã«åŒ·åã«ãªãã®ã«åŸã£ãŠã¢ãã¬ã¹åž³ãé»åã¡ãŒã«ããŠãŒã¶ãŒã®äœçœ®æ
å ±ãšãã£ãããã«å人çãªæ
å ±ãžã¢ã¯ã»ã¹ããããã«ãªããTLS ã®å¿
èŠæ§ã¯é»ååååŒãè¶ããŠããããšããã«ååšããŸãã</p> + +<h3 id="Using_HTTP_for_complex_applications" name="Using_HTTP_for_complex_applications">è€éãªã¢ããªã±ãŒã·ã§ã³ã®ããã« HTTP ã䜿çšãã</h3> + +<p>Tim Berners-Lee ã«ããåœåã®ãŠã§ãã®ããžã§ã³ã¯ãèªã¿åãå°çšã®æ段ã§ã¯ãããŸããã§ããã圌ã¯ãŠã§ãã«ã€ããŠã人ã
ãé éæäœã§ææžãè¿œå ã移åããããšãã§ããéããããã¡ã€ã«ã·ã¹ãã ãæããŠããŸããã1996 幎é ã« HTTP ã¯ãªãŒãµãªã³ã°ãã§ããããã«æ¡åŒµãããWebDAV ãšããååã®æšæºä»æ§ãäœãããŸãããããã¯ã¢ãã¬ã¹åž³ã®é
ç®ãæ±ã CardDAV ãã«ã¬ã³ããŒãæ±ã CalDAV ãªã©ãç¹å®ã®ã¢ããªã±ãŒã·ã§ã³åãã«ããã«æ¡åŒµãããŸãããããããããã® *DAV æ¡åŒµã«ã¯ãããã䜿çšãããµãŒããŒã«å®è£
ãããŠããå¿
èŠãããããŸããšãŠãè€éã§ãã£ããšããæ¬ ç¹ããããŸãããŠã§ãã®é åã§ãããã¯ãå
茪ã§äœ¿çšãããŠãããŸãŸã§ãã</p> + +<p>2000 幎ã«ãHTTP ã䜿çšããæ°ããªãã¿ãŒã³ã§ãã {{glossary("REST", "representational state transfer")}} (REST) ãèæ¡ãããŸãããAPI ãçºããã¢ã¯ã·ã§ã³ã¯æ°ã㪠HTTP ã¡ãœããã«ãã£ãŠäŒéããããåºæ¬ç㪠HTTP/1.1 ã¡ãœããã«ãã£ãŠç¹å®ã® URI ã«ã¢ã¯ã»ã¹ããå Žåã«éãããŸããããã«ãããŠã§ãã¢ããªã±ãŒã·ã§ã³ã¯ããã©ãŠã¶ãŒããµãŒããŒãæŽæ°ããããšãªãããŒã¿ã®åãåºããå€æŽãã§ãã API ã®æäŸãå¯èœã«ãªããŸããå¿
èŠãªãã®ã¯ãã¹ãŠãæšæºã® HTTP/1.1 ã«ãã£ãŠãŠã§ããµã€ãããæäŸããããã¡ã€ã«ã«åã蟌ãŸããŠããŸããããããã®ãŠã§ããµã€ããç¬èªã®éæšæºãª RESTful API ãå®çŸ©ããŠããããããŠã§ããµã€ããå¶åŸ¡ãããšããäºå®ã« REST ã¢ãã«ã®æ¬ ç¹ããããŸãã*DAV æ¡åŒµãšã®éãã¯ãã¯ã©ã€ã¢ã³ããšãµãŒããŒãçžäºäœ¿çšå¯èœã§ã¯ãªãããšã§ããRESTful API ã¯ã2010 幎代ã«ã¯ãšãŠãäžè¬çã«ãªããŸããã</p> + +<p>2005 幎ãããŠã§ãããŒãžãæ Œæ®µã«åäžããã API ã»ãããå©çšå¯èœã«ãªããŸããããŸããããã®ããã€ãã¯ç¹å®çšéåãã«ãäž»ã«æ°ããªåºæã® HTTP ããããŒãäœæã㊠HTTP ãããã³ã«ãæ¡åŒµããŸãã:</p> + +<ul> + <li><a href="/ja/docs/Web/API/Server-sent_events">Server-sent events</a>ããµãŒããŒãã¯ã©ã€ã¢ã³ãã«å¯ŸããŠãç¹å¥ãªã¡ãã»ãŒãžãéä¿¡ã§ããŸãã</li> + <li><a href="/ja/docs/Web/API/WebSocket_API">WebSocket</a>ãæ¢åã® HTTP ã³ãã¯ã·ã§ã³ãæŽæ°ããããšã§ã»ããã¢ããã§ãããæ°ããªãããã³ã«ã§ãã</li> +</ul> + +<h3 id="Relaxing_the_security-model_of_the_Web" name="Relaxing_the_security-model_of_the_Web">ãŠã§ãã®ã»ãã¥ãªãã£ã¢ãã«ãç·©åãã</h3> + +<p>HTTP ã¯ãŠã§ãã®ã»ãã¥ãªãã£ã¢ãã«ã§ãã <a href="/ja/docs/Web/Security/Same-origin_policy">åäžãªãªãžã³ããªã·ãŒ</a> ãšã¯ç¬ç«ããååšã§ããå®ã¯ãçŸåšã®ãŠã§ãã®ã»ãã¥ãªãã£ã¢ãã«ã¯ HTTP ãäœæããåŸã«éçºãããã®ã§ã!é·å¹ŽãããŠãäžå®ã®æ¡ä»¶ã®äžã§ãã®ããªã·ãŒã®å¶éã®äžéšã解é€ã§ããããã«ããããšã«ãããããå¯å€§ã«ã§ããããšãæå¹ã§ãããšç«èšŒãããŸããããã€ã©ã®ããã«ããŠãããã®å¶éã解é€ãããã¯ãæ°ã㪠HTTP ããããŒçŸ€ã䜿çšããŠãµãŒããŒããã¯ã©ã€ã¢ã³ãã«éä¿¡ãããŸãããã㯠<a href="/ja/docs/Glossary/CORS">Cross-Origin Resource Sharing</a> (CORS) ã <a href="/ja/docs/Web/Security/CSP">Content Security Policy</a> (CSP) ãšãã£ãä»æ§ã§å®çŸ©ãããŠããŸãã</p> + +<p>ãããã®å€§ããªæ¡åŒµã«å ããŠãã»ãã«ãå®éšçšã«éããã®ãå«ããŠå€ãã®ããããŒãè¿œå ãããŸãããäž»ãªããããŒãšããŠãã©ã€ãã·ãŒãå¶åŸ¡ããããã® Do Not Track ({{HTTPHeader("DNT")}}) ããããŒã{{HTTPHeader("X-Frame-Options")}}ã{{HTTPHeader('Upgrade-Insecure-Request')}} ããããŸãããããã«å€ãã®ããããŒãååšããŸãã</p> + +<h2 id="HTTP2_â_A_protocol_for_greater_performance" name="HTTP2_â_A_protocol_for_greater_performance">HTTP/2 â é«ããã©ãŒãã³ã¹ãªãããã³ã«</h2> + +<p>é·å¹ŽãããŠãŠã§ãããŒãžã¯ããè€éã«ãªããã¢ããªã±ãŒã·ã§ã³èªäœãåæ§ã«è€éåããŸããã衚瀺ããèŠèŠã¡ãã£ã¢ã®éãã察話æ©èœãè¿œå ããã¹ã¯ãªããã®èŠæš¡ããµã€ãºãå¢å ããŸãããèããå€ãã® HTTP ãªã¯ãšã¹ãã«ãã£ãŠãããå€ãã®ããŒã¿ã転éãããŸããHTTP/1.1 ã®ã³ãã¯ã·ã§ã³ã¯ãæ£ããé åºã§ãªã¯ãšã¹ããéä¿¡ããªããã°ãªããŸãããçè«äžã¯äžŠè¡ããŠããã€ãã®ã³ãã¯ã·ã§ã³ã䜿çšã§ããŸã (éåžž 5 ãã 8 ã®é) ããããªãã®ãªãŒããŒããããè€éæ§ããããããŸããããšãã° HTTP ãã€ãã©ã€ã³ã¯ããŠã§ãéçºã§ãªãœãŒã¹ã®è² è·ã«ãªãããšãæããã«ãªããŸããã</p> + +<p>2010 幎代ã®ååã« Google ã¯å®éšçãªãããã³ã«ã§ãã SPDY ãå®è£
ããŠãã¯ã©ã€ã¢ã³ããšãµãŒããŒã®éã§ããŒã¿ã亀æããããã®ä»£æ¿æ段ã瀺ããŸãããããã¯ããã©ãŠã¶ãŒããµãŒããŒã®äž¡æ¹ã®éçºè
ããå€ãã®é¢å¿ãéããŸãããå¿çæ§ã®åäžãæ確ã«ãããšãšãã«ã転éããããŒã¿ã®éè€ã«ããåé¡ã解決ããããšã§ãSPDY 㯠HTTP/2 ãããã³ã«ã®åºç€ãåããŸããã</p> + +<p>HTTP/2 ãããã³ã«ã«ã¯ãHTTP/1.1 ãšã®å€§ããªéããããã€ããããŸã:</p> + +<ul> + <li>ããã¹ã圢åŒã§ã¯ãªãããã€ããªåœ¢åŒã®ãããã³ã«ã§ãããã®ããŒãã«ã«ããå
容ãèªãã ãæäœæ¥ã§äœæãããããããšãã§ããªããªããŸããããæ¹è¯ãããæé©åæè¡ãå®è£
ã§ããããã«ãªããŸããã</li> + <li>å€éåããããããã³ã«ã§ããåãã³ãã¯ã·ã§ã³ã§ãªã¯ãšã¹ãã䞊è¡ããŠæ±ãããšãã§ããHTTP/1.x ãããã³ã«ã®é åºãããããã³ã°ã®å¶çŽãæé€ããŠããŸãã</li> + <li>ããããŒãå§çž®ããŸããäžåŒã®ãªã¯ãšã¹ãå
ã§äŒŒããã®ãååšããããšãå€ããããããã¯ããŒã¿è»¢éã®éè€ããªãŒããŒããããåæžããŸãã</li> + <li>ãµãŒããŒããã·ã¥ãšåŒã°ããä»çµã¿ã«ãã£ãŠããªã¯ãšã¹ãããå
ã«ãµãŒããŒãã¯ã©ã€ã¢ã³ãã®ãã£ãã·ã¥ã«ããŒã¿ãå ããããšãã§ããŸãã</li> +</ul> + +<p>HTTP/2 㯠2015 幎 5 æã«æ£åŒã«æšæºåãããå€ãã®æåäŸããããŸããã2016 幎 7 æã«ã¯ããã¹ãŠã®ãŠã§ããµã€ãã® 8.7% <sup><a href="https://w3techs.com/technologies/details/ce-http2/all/all">[1]</a></sup> ã§ãã§ã«äœ¿çšãããŠããããã¹ãŠã®ãªã¯ãšã¹ãã® 68% 以äžãå ããŠããŸã<sup><a href="https://www.keycdn.com/blog/http2-statistics/">[2]</a></sup>ããã©ãã£ãã¯ãå€ããŠã§ããµã€ãã§ãã£ãšãæ©ãæ¡çšãããŠãããããŒã¿è»¢éã®ãªãŒããŒããããããã«ããçµè²»ãããªãåæžããŠããŸãã</p> + +<p>HTTP/2 ã¯ãŠã§ããµã€ããã¢ããªã±ãŒã·ã§ã³ã®æ¹é ãäžèŠ (ãããã«ãšã£ãŠ HTTP/1.1 ã䜿çšããã HTTP/2 ã䜿çšãããã¯ééçã§ã) ã§ãã®ã§ããã®ãã°ããæ¡çšã®ããŒã¹ã¯ãã£ãšãã§ããæè¿ã®ãã©ãŠã¶ãŒãšéä¿¡ããææ°ã®ãµãŒããŒãããã°ãHTTP/2 ãæå¹åããã®ã«ååã§ããéãããã°ã«ãŒãã ããæ¡çšã®ãã£ãããšããŠå¿
èŠã§ãããå€ããã©ãŠã¶ãŒããµãŒããŒãæŽæ°ãããã®ã«åŸã£ãŠããŠã§ãéçºè
ã®åªåãªãã«äœ¿çšåæãèªç¶ã«å¢ããŠãããŸãã</p> + +<h2 id="Post-HTTP2_evolution" name="Post-HTTP2_evolution">HTTP/2 以éã®é²å</h2> + +<p>HTTP/2 ã®å
¬éã«ãã£ãŠ HTTP ã®é²åãæ¢ãŸã£ãããã§ã¯ãããŸãããéå»ã® HTTP/1.x ãšåæ§ã«ãæ°ããæ©èœãè¿œå ããããã« HTTP ã®æ¡åŒµæ§ãä»ã§ã掻çšãããŠããŸããç¹ã«ã2016 幎ã«çŸããæ°ã㪠HTTP ã®æ¡åŒµãæããããšãã§ããŸã:</p> + +<ul> + <li>{{HTTPHeader("Alt-Svc")}} ã«å¯Ÿå¿ããããšã§ãæå®ããããªãœãŒã¹ã®å Žæãšåäžæ§ãåé¢ããããšãã§ããããã¹ããŒã㪠{{Glossary("CDN")}} ã®ãã£ãã·ã¥æ©æ§ãå¯èœã«ããŸãã</li> + <li>{{HTTPHeader("Client-Hints")}} ã®å°å
¥ã«ãããã©ãŠã¶ãŒãã¯ã©ã€ã¢ã³ãããµãŒããŒã«å¯ŸããŠãã¯ã©ã€ã¢ã³ãã®èŠä»¶ãããŒããŠã§ã¢ã®å¶çŽã«é¢ããæ
å ±ãçå
ããŠäŒããããšãã§ããŸãã</li> + <li>{{HTTPHeader("Cookie")}} ããããŒã«å°å
¥ãããã»ãã¥ãªãã£é¢é£ã®æ¥é èŸã¯ãå®å
šãª Cookie ãæ¹å€ãããŠããªãããšãä¿èšŒããå©ãã«ãªããŸãã</li> +</ul> + +<p>ãããã® HTTP ã®é²åã¯ãããã³ã«ã®æ¡åŒµæ§ãã·ã³ãã«ããå®èšŒããŠãããå€ãã®ã¢ããªã±ãŒã·ã§ã³ã®äœæããããã³ã«ã®æ¡çšãä¿ããŠããŸããä»æ¥ã® HTTP ã䜿çšãããç°å¢ã¯ã1990 幎代åé ã«ã¿ãããç°å¢ãšã¯å€§ããç°ãªã£ãŠããŸãã HTTP ã®æ¬æ¥ã®èšèšã¯åäœã§ããããšãå®èšŒããŠãããååäžçŽã«ããã£ãŠæµæãããããšãªããŠã§ããé²åãããããšãã§ããŸããã HTTP ãæåãããæè»æ§ãæ¡åŒµæ§ãç¶æãããªããæ¬ ç¹ãçŽãã HTTP/2 ã®æ¡çšã¯ããããã³ã«ã®æããæªæ¥ãæ瀺ããŠããŸãã</p> + +<h2 id="HTTP3_-_HTTP_over_QUIC">HTTP/3 - HTTP over QUIC</h2> + +<p>{{Draft}}{{SeeCompatTable}}</p> + +<p>次ã®ã¡ãžã£ãŒããŒãžã§ã³ã® HTTP ã§ãã HTTP/3 ã¯ããã©ã³ã¹ããŒã局㫠TCP/TLS ã®ä»£ããã« QUIC ã䜿çšããäºå®ã§ãã</p> + +<p>Firefox ã§ã®å®è£
ç¶æ³ã«ã€ããŠã¯ {{bug(1158011)}} ãåç
§ããŠãã ããã</p> diff --git a/files/ja/web/http/basics_of_http/identifying_resources_on_the_web/index.html b/files/ja/web/http/basics_of_http/identifying_resources_on_the_web/index.html new file mode 100644 index 0000000000..aa8dd47efd --- /dev/null +++ b/files/ja/web/http/basics_of_http/identifying_resources_on_the_web/index.html @@ -0,0 +1,192 @@ +--- +title: ãŠã§ãäžã®ãªãœãŒã¹ã®èå¥ +slug: Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web +tags: + - Domain + - HTTP + - Path + - Scheme + - Syntax + - URI + - URL + - URL Syntax + - Web + - fragment + - port + - query + - resources +translation_of: Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary">HTTP èŠæ±ã®å¯Ÿè±¡ã¯ããªãœãŒã¹ããšåŒã°ãããã®æ¬è³ªã¯çŽ°ããå®çŸ©ãããŠããŸãããããã¥ã¡ã³ããåçããã®ä»ã®äœã«ã§ããªãããŸããããããã®ãªãœãŒã¹ã¯ããªãœãŒã¹ãç¹å®ããããã« HTTP ã®è³ããšããã§äœ¿çšããã Uniform Resource Identifier ({{Glossary("URI")}}) ã§ç¹å®ãããŸãã</p> + +<p>ãŠã§ãäžã«ãããªãœãŒã¹ã®èº«å
ãå Žæã¯ããããŠãã²ãšã€ã® URL (Uniform Resource Locatorã äžçš®ã® URI) ã«ãã£ãŠäžããããŸããæã
ãåäžã® URI ã«ãã£ãŠèº«å
ãå Žæãäžããããªãçç±ãååšããŸããèŠæ±ããããªãœãŒã¹ã«ã€ããŠãã¯ã©ã€ã¢ã³ãã«å¥ã®å Žæãžã¢ã¯ã»ã¹ããŠã»ããå Žåã«ãHTTP ã§ã¯ {{HTTPHeader("Alt-Svc")}} ããããŒã䜿çšããŸãã</p> + +<h2 id="URLs_and_URNs" name="URLs_and_URNs">URL ãš URN</h2> + +<h3 id="URLs" name="URLs">URL</h3> + +<p>ãã£ãšãäžè¬ç㪠URI ã®åœ¢åŒã¯ Uniform Resource Locator ({{Glossary("URL")}}) ã§ããã<em>ãŠã§ãã¢ãã¬ã¹</em>ãšããŠç¥ãããŠããŸãã</p> + +<pre class="notranslate">https://developer.mozilla.org +https://developer.mozilla.org/en-US/docs/Learn/ +https://developer.mozilla.org/en-US/search?q=URL</pre> + +<p>ãã©ãŠã¶ãŒã®ã¢ãã¬ã¹ããŒã« URL ãå
¥åããŠãURL ã«é¢é£ä»ããããŠããããŒãž (ãªãœãŒã¹) ãèªã¿èŸŒãããã«æ瀺ã§ããŸãã</p> + +<p>URL ã¯ããŸããŸãªéšåã§æ§æãããŠãããå¿
é ã®ãã®ãšçç¥å¯èœãªãã®ããããŸããããè€é㪠URL ã®äŸã¯ã以äžã®ããã«ãªããŸã:</p> + +<pre class="notranslate">http://www.example.com:80/path/to/myfile.html?key1=value1&key2=value2#SomewhereInTheDocument</pre> + +<h3 id="URNs" name="URNs">URN</h3> + +<p>Uniform Resource Name (URN) ã¯ãç¹å®ã®åå空éå
ã®ååã«ãã£ãŠãªãœãŒã¹ãç¹å®ãã URI ã§ãã</p> + +<pre class="notranslate">urn:isbn:9780141036144 +urn:ietf:rfc:7230 +</pre> + +<p>2 ã€ã® URN ã¯ä»¥äžã®ãã®ã«å¯Ÿå¿ããŸã:</p> + +<ul> + <li>George Orwell ã®æžç± Nineteen Eighty-Four</li> + <li>IETF ä»æ§æž 7230ã Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</li> +</ul> + +<h2 id="Syntax_of_Uniform_Resource_Identifiers_URIs" name="Syntax_of_Uniform_Resource_Identifiers_(URIs)">Uniform Resource Identifiers (URI) ã®æ§æ</h2> + +<h3 id="Scheme_or_protocol" name="Scheme_or_protocol">ã¹ããŒã ãŸãã¯ãããã³ã«</h3> + +<dl> + <dt><img alt="Protocol" src="https://mdn.mozillademos.org/files/8013/mdn-url-protocol@x2.png" style="height: 70px; width: 440px;"></dt> + <dd><code>http://</code> ã¯ãããã³ã«ã§ããããã¯ããã©ãŠã¶ãŒã䜿çšãã¹ããããã³ã«ã瀺ããŸããéåžžã HTTP ãããã³ã«ãŸãã¯å®å
šãªããŒãžã§ã³ã§ãã HTTPS ã«ãªããŸãããŠã§ãã§ã¯ããã2ã€ã®ãã¡ã²ãšã€ãå¿
èŠãšããŸããããã©ãŠã¶ãŒã¯ <code>mailto:</code> (ã¡ãŒã«ã¯ã©ã€ã¢ã³ããéã) ããã¡ã€ã«è»¢éãæ±ã <code>ftp:</code> ãšãã£ãã»ãã®ãããã³ã«ã®æ±ãæ¹ãç¥ã£ãŠããŸãã®ã§ããã®ãããªãããã³ã«ãçŸããŠãé©ããªãã§ãã ãããäž»ãªã¹ããŒã ã¯ä»¥äžã®ãšããã§ã:</dd> +</dl> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ã¹ããŒã </th> + <th scope="col">説æ</th> + </tr> + </thead> + <tbody> + <tr> + <td>data</td> + <td><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Data_URIs">Data URI</a></td> + </tr> + <tr> + <td>file</td> + <td>ãã¹ãåºæã®ãã¡ã€ã«å</td> + </tr> + <tr> + <td>ftp</td> + <td><a href="/ja/docs/Glossary/FTP">File Transfer Protocol</a></td> + </tr> + <tr> + <td>http/https</td> + <td><a href="/ja/docs/Glossary/HTTP">Hyper text transfer protocol (å®å
š)</a></td> + </tr> + <tr> + <td>javascript</td> + <td>URL ã«åã蟌ãŸãã JavaScript ã®ã³ãŒã</td> + </tr> + <tr> + <td>mailto</td> + <td>é»åã¡ãŒã«ã¢ãã¬ã¹</td> + </tr> + <tr> + <td>ssh</td> + <td>Secure shell</td> + </tr> + <tr> + <td>tel</td> + <td>é»è©±</td> + </tr> + <tr> + <td>urn</td> + <td>Uniform Resource Names</td> + </tr> + <tr> + <td>view-source</td> + <td>ãªãœãŒã¹ã®ãœãŒã¹ã³ãŒã</td> + </tr> + <tr> + <td>ws/wss</td> + <td>(æå·åããã) <a href="/ja/docs/Web/API/WebSockets_API">WebSocket</a> æ¥ç¶</td> + </tr> + </tbody> +</table> + +<h3 id="Authority" name="Authority">ãªãŒãœãªãã£</h3> + +<dl> + <dt><img alt="Domaine Name" src="https://mdn.mozillademos.org/files/8015/mdn-url-domain@x2.png" style="height: 70px; width: 440px;"></dt> + <dd><code>www.example.com</code> ã¯ãåå空éãçµ±å¶ãããã¡ã€ã³åãŸãã¯ãªãŒãœãªãã£ã§ããããã¯ãã©ã®ãŠã§ããµãŒããŒãèŠæ±ãããŠãããã瀺ããŸãã代ããã« {{Glossary("IP address","IP ã¢ãã¬ã¹")}} ãçŽæ¥äœ¿çšããããšãã§ããŸãããå©äŸ¿æ§ãäœããããŠã§ãã§ã¯ããŸã䜿çšãããŸããã</dd> +</dl> + +<h3 id="Port" name="Port">ããŒã</h3> + +<dl> + <dt><img alt="Port" src="https://mdn.mozillademos.org/files/8017/mdn-url-port@x2.png" style="height: 70px; width: 440px;"></dt> + <dd>ãã㧠<code>:80</code> ã¯ããŒãã§ããããã¯ãŠã§ããµãŒããŒå
ã®ãªãœãŒã¹ãžã¢ã¯ã»ã¹ããããã«äœ¿çšãããæè¡äžã® "åºå
¥å£" ã§ãããŠã§ããµãŒããŒããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãåãå
¥ããããã« HTTP ãããã³ã«ã®æšæºããŒã (HTTP ã§ã¯ 80ãHTTPS ã§ã¯ 443) ã䜿çšããŠããå Žåãéåžžã¯ããŒããçç¥ããŸãããã以å€ã®å Žåã¯ãããŒããå¿
é ã§ãã</dd> +</dl> + +<h3 id="Path" name="Path">ãã¹</h3> + +<dl> + <dt><img alt="Path to the file" src="https://mdn.mozillademos.org/files/8019/mdn-url-path@x2.png" style="height: 70px; width: 440px;"></dt> + <dd><code>/path/to/myfile.html</code> ã¯ããŠã§ããµãŒããŒå
ã«ãããªãœãŒã¹ã®ãã¹ã§ããåæã®ãŠã§ãã§ã¯ãã®ãããªãã¹ãããŠã§ããµãŒããŒå
ã®ç©ççãªãã¡ã€ã«ã®å Žæãè¡šããŠããŸãããçŸä»£ã®ãã¹ã¯ãããŠãç©ççãªå®æ
ãšé¢ä¿ããªãããŠã§ããµãŒããŒã«ãã£ãŠå¶åŸ¡ãããæœè±¡çãªãã®ã«ãªã£ãŠããŸãã</dd> +</dl> + +<h3 id="Query" name="Query">ã¯ãšãª</h3> + +<dl> + <dt><img alt="Parameters" src="https://mdn.mozillademos.org/files/8021/mdn-url-parameters@x2.png" style="height: 70px; width: 440px;"></dt> + <dd><code>?key1=value1&key2=value2</code> ã¯ããŠã§ããµãŒããŒã«æäŸããè¿œå ãã©ã¡ãŒã¿ãŒã§ãããã®ãã©ã¡ãŒã¿ãŒã¯ <code>&</code> èšå·ã§åºåããããããŒãšå€ã®ãã¢ã®ãªã¹ãã§ãããŠã§ããµãŒããŒã¯ããŠãŒã¶ãŒãžãªãœãŒã¹ãè¿ãåã«è¿œå ã®åŠçãè¡ãããã«ããã®ãã©ã¡ãŒã¿ãŒã䜿çšã§ããŸããããããã®ãŠã§ããµãŒããŒã¯ãã©ã¡ãŒã¿ãŒã«ã€ããŠç¬èªã®èŠåãæã£ãŠãããç¹å®ã®ãŠã§ããµãŒããŒããã©ã¡ãŒã¿ãŒãæ±ãæ¹æ³ãç¥ãããã«å¯äžä¿¡é Œã§ããæ¹æ³ã¯ããŠã§ããµãŒããŒã®ææè
ã«å°ããããšã§ãã</dd> +</dl> + +<h3 id="Fragment" name="Fragment">ãã©ã°ã¡ã³ã</h3> + +<dl> + <dt><img alt="Anchor" src="https://mdn.mozillademos.org/files/8023/mdn-url-anchor@x2.png" style="height: 70px; width: 440px;"></dt> + <dd><code>#SomewhereInTheDocument</code> ã¯ããªãœãŒã¹èªäœã®å¥ã®å Žæãžã®ã¢ã³ã«ãŒã§ããã¢ã³ã«ãŒã¯ãªãœãŒã¹å
ã®äžçš®ã® "ããã¯ããŒã¯" ãè¡šããŠããã "ããã¯ããŒã¯" å°ç¹ã«ããã³ã³ãã³ãã衚瀺ããããã«ãã©ãŠã¶ãŒãžæ瀺ãäžããŸããäŸãã° HTML ããã¥ã¡ã³ãã§ã¯ããã©ãŠã¶ãŒã¯ã¢ã³ã«ãŒãå®çŸ©ãããŠããäœçœ®ã«ã¹ã¯ããŒã«ããŸããåç»ãé³å£°ã®ããã¥ã¡ã³ãã§ã¯ããã©ãŠã¶ãŒã¯ã¢ã³ã«ãŒã瀺ãäœçœ®ãžã®ç§»åãè©Šã¿ãŸãã # ããåŸã®éšåã¯ãã©ã°ã¡ã³ãèå¥ãšããŠãç¥ãããŠãããèŠæ±ã§ãµãŒããŒã«ã¯éä¿¡ãããªãããšã¯æ³šç®ã«å€ããŸãã</dd> +</dl> + +<h2 id="䜿çšäžã®ã¡ã¢">䜿çšäžã®ã¡ã¢</h2> + +<p>{{Glossary("HTML")}} ã³ã³ãã³ãã®äžã§ URL ã䜿çšåŒ·ãããšããäžè¬ã«äœ¿ãããšãã§ãã URL ã¹ããŒã ã¯ãããã§ãããµããªãœãŒã¹ãåç
§ããå Žå â ã€ãŸããæåã¯å·šå€§ãªææžã®äžéšã ãã䜿çšããå Žå â ã¯ã HTTP åã³ HTTPS ã¹ããŒã ãã䜿çšããããšãã§ããŸãããå ããŠããã©ãŠã¶ãŒã¯ã»ãã¥ãªãã£äžã®çç±ããã FTP ã䜿çšãããµããªãœãŒã¹ã®èªã¿èŸŒã¿ã®å¯Ÿå¿ãåé€ãã€ã€ãããŸãã</p> + +<p>FTP ã¯æäžäœã§ã¯å©çšã§ããŸãã (ãã©ãŠã¶ãŒã® URL ããŒã«çŽæ¥å
¥åãããããªã³ã¯ã®å¯Ÿè±¡ãšããç)ããã©ãŠã¶ãŒã«ãã£ãŠã¯ FTP ã³ã³ãã³ãã®èªã¿èŸŒã¿ãä»ã®ã¢ããªã±ãŒã·ã§ã³ã«å§è²ãããããããŸããã</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">https://developer.mozilla.org/en-US/docs/Learn +tel:+1-816-555-1212 +git@github.com:mdn/browser-compat-data.git +ftp://example.org/resource.txt +urn:isbn:9780141036144 +mailto:help@supercyberhelpdesk.info +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + <tr> + <td>{{RFC("7230", "Uniform Resource Identifiers", "2.7")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Learn/Common_questions/What_is_a_URL">URL ãšã¯äœã</a></li> + <li><a href="http://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml">IANA list of URI schemes</a></li> +</ul> diff --git a/files/ja/web/http/basics_of_http/index.html b/files/ja/web/http/basics_of_http/index.html new file mode 100644 index 0000000000..0ea3565f5a --- /dev/null +++ b/files/ja/web/http/basics_of_http/index.html @@ -0,0 +1,50 @@ +--- +title: HTTP ã®åºæ¬ +slug: Web/HTTP/Basics_of_HTTP +tags: + - Guide + - HTTP + - ã¬ã€ã + - æŠèŠ +translation_of: Web/HTTP/Basics_of_HTTP +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã¯ãšãŠãæ¡åŒµæ§ã®ãããããã³ã«ã§ãããªãœãŒã¹ã®èšè¿°ã URI ãªã©ããããªåºæ¬æŠå¿µã«åºã¥ããŠãããã¡ãã»ãŒãžæ§é ãåçŽã§ãã³ãã¥ãã±ãŒã·ã§ã³ã®æµãã¯ã¯ã©ã€ã¢ã³ãã»ãµãŒããŒæ§é ã§ãããããã®åºæ¬æŠå¿µã®äžã«ãããã€ãã®æ¡åŒµãäœå¹Žã«ãããã£ãŠè¡ãããæ°ããæ©èœãæ°ããæå³ãæ°ãã HTTP ã¡ãœãããããããŒã«ãã£ãŠè¿œå ãããŠããŸãã</p> + +<h2 id="Articles" name="Articles">èšäº</h2> + +<dl> + <dt><a href="/ja/docs/Web/HTTP/Overview">HTTP ã®æŠèŠ</a></dt> + <dd>HTTP ãšã¯äœã§ãããããããŠãŠã§ãã¢ãŒããã¯ãã£ã«ããããã®ãããã³ã«ã®åœ¹å²ã«ã€ããŠèª¬æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Evolution_of_HTTP">HTTP ã®é²å</a></dt> + <dd>HTTP ã¯1990幎代åãã«äœæãããäœåºŠãæ¡åŒµãããŸããããã®èšäºã§ã¯ã HTTP/0.9ã HTTP/1.0ã HTTP/1.1ãçŸä»£ã® HTTP/2ãããã³é·å¹Žã«ãããå°å
¥ãããŠããå°ããªããã«ãã£ã«ã€ããŠã®æŽå²ã説æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Negotiating_an_HTTP_version">HTTP ããŒãžã§ã³ã®ããŽã·ãšãŒã·ã§ã³</a></dt> + <dd>ã¯ã©ã€ã¢ã³ããšãµãŒããŒãç¹å®ã® HTTP ããŒãžã§ã³ãããŽã·ãšãŒãããæçµçã«äœ¿çšããããããã³ã«ããŒãžã§ã³ãã¢ããã°ã¬ãŒãããæ¹æ³ã説æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Resources_and_URIs">ãªãœãŒã¹ãš URI</a></dt> + <dd>ãŠã§ãäžã®ãªãœãŒã¹ãèå¥åãããã³å Žæã®æŠå¿µãç°¡åã«çŽ¹ä»ããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web">ãŠã§ãäžã®ãªãœãŒã¹ã®èå¥</a></dt> + <dd>ãŠã§ããªãœãŒã¹ã®åç
§æ¹æ³ãšã©ã®ããã«é
眮ãããã®ãã«ã€ããŠèª¬æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Data_URIs">ããŒã¿ URI</a></dt> + <dd>ãããè¡šããªãœãŒã¹ãçŽæ¥åã蟌ãç¹å®ã®çš®é¡ã® URIãããŒã¿ URI ã¯ãšãŠã䟿å©ã§ãããããã€ãã®æ³šæç¹ããããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Resource_URLs">ãªãœãŒã¹ URL</a> {{Non-standard_Inline}}</dt> + <dd><code>resource:</code> ãšããã¹ããŒã ã®æ¥é èŸãä»ãã URL ã¯ã Firefox ãš Firefox ã®ãã©ãŠã¶ãŒæ¡åŒµæ©èœã«ãã£ãŠãªãœãŒã¹ãå
éšçã«èªã¿èŸŒãããã«äœ¿çšãããŸãããæ
å ±ã®äžéšã¯ãã©ãŠã¶ãŒãæ¥ç¶ãããµã€ãã§ãå©çšã§ããŸãã</dd> + <dt>ãªãœãŒã¹ã®èå¥ãšå Žæã®åé¢: Alt-Svc HTTP ããããŒ</dt> + <dd>ã»ãšãã©ã®å ŽåããŠã§ããªãœãŒã¹ã®èå¥åãšå Žæã¯å
±æãããŸããããã㯠{{HTTPHeader("Alt-Svc")}} ããããŒã§å€æŽã§ããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME ã¿ã€ã</a></dt> + <dd>HTTP/1.0 以éã§ã¯ãæ§ã
ãªã¿ã€ãã®ã³ã³ãã³ããéä¿¡ããããšãã§ããŸãã ãã®èšäºã§ã¯ {{HTTPHeader("Content-Type")}} ããããŒãš MIME æšæºã䜿çšããŠãããã©ã®ããã«è¡ããããã«ã€ããŠèª¬æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs">www URL ãšããã§ãªã URL ã®éžæ</a></dt> + <dd>www ãšããæ¥é èŸã®ãã¡ã€ã³ã䜿ããã©ããã«é¢ããã¢ããã€ã¹ã§ããã®èšäºã§ã¯éžæã®çµæãšãã®äœææ¹æ³ã«ã€ããŠèª¬æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Flow_of_an_HTTP_session">HTTP ã»ãã·ã§ã³ã®æµã</a></dt> + <dd>ãã®åºæ¬çãªèšäºã§ã¯å
žåç㪠HTTP ã»ãã·ã§ã³ã«ã€ããŠèª¬æããŸãããã©ãŠã¶ãŒã®ãªã³ã¯ãã¯ãªãã¯ãããšãäœãèµ·ããã®ã§ãããã</dd> + <dt><a href="/ja/docs/Web/HTTP/Messages">HTTP ã¡ãã»ãŒãž</a></dt> + <dd>HTTP ãªã¯ãšã¹ããŸãã¯ã¬ã¹ãã³ã¹äžã«éä¿¡ãããã¡ãã»ãŒãžã¯ãéåžžã«æ確ãªæ§é ãæã£ãŠããŸãããã®å
¥éèšäºã§ã¯ãã®æ§é ãç®çãå¯èœæ§ã«ã€ããŠèª¬æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Frame and message structure in HTTP_2">HTTP/2 ã§ã®ãã¬ãŒã ãšã¡ãã»ãŒãžæ§é </a></dt> + <dd>HTTP/2 㯠HTTP/1.x ã¡ãã»ãŒãžãã«ãã»ã«åãããã€ããªãã¬ãŒã ã§è¡šçŸããŸãããã®èšäºã§ã¯ãã¬ãŒã ã®æ§é ãç®çããšã³ã³ãŒãæ¹æ³ã«ã€ããŠèª¬æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Connection_management_in_HTTP_1.x">HTTP/1.x ã§ã®ã³ãã¯ã·ã§ã³ç®¡ç</a></dt> + <dd>HTTP/1.1 ã¯æç¶çãªæ¥ç¶ãšãã€ãã©ã€ã³åŠçããµããŒããã HTTP ã®æåã®ããŒãžã§ã³ã§ããããã®èšäºã§ã¯ãããã®2ã€ã®æŠå¿µã«ã€ããŠèª¬æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Connection_management_in_HTTP_2">HTTP/2 ã§ã®ã³ãã¯ã·ã§ã³ç®¡ç</a></dt> + <dd>HTTP/2 ã§ã¯æ¥ç¶ã®äœææ¹æ³ãšã¡ã³ããã³ã¹æ¹æ³ãå®å
šã«åèãããŸããããã®èšäºã§ã¯ HTTP ãã¬ãŒã ãå€éåãèš±å¯ãã以åã® HTTP ããŒãžã§ã³ã® 'head-of-line' ãããã¯åé¡ã解決ããæ¹æ³ã«ã€ããŠèª¬æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a></dt> + <dd>HTTP ã¯ãã©ãŠã¶ã奜ã¿ã®åœ¢åŒãèšèªããŸãã¯ãšã³ã³ãŒãã£ã³ã°ãã¢ããŠã³ã¹ããããã®æ¹æ³ãšã㊠<code>Accept-</code> ããå§ãŸãäžé£ã®ããããå°å
¥ããŠããŸãããã®èšäºã§ã¯ãã®å®£èšãã©ã®ããã«èµ·ãããããµãŒããã©ã®ããã«åå¿ãããšäºæ³ãããã©ã®ããã«æãé©åãªå¿çãéžæãããã«ã€ããŠèª¬æããŸãã</dd> +</dl> diff --git a/files/ja/web/http/basics_of_http/mime_types/common_types/index.html b/files/ja/web/http/basics_of_http/mime_types/common_types/index.html new file mode 100644 index 0000000000..e19297a919 --- /dev/null +++ b/files/ja/web/http/basics_of_http/mime_types/common_types/index.html @@ -0,0 +1,405 @@ +--- +title: ãããã MIME ã¿ã€ã +slug: Web/HTTP/Basics_of_HTTP/MIME_types/Common_types +tags: + - HTTP + - MIME + - MIME ã¿ã€ã + - Reference + - ã¿ã€ã + - ããã¹ã + - ãã¡ã€ã« + - ãã¡ã€ã«ã¿ã€ã + - åç» + - é³å£° +translation_of: Web/HTTP/Basics_of_HTTP/MIME_types/Common_types +--- +<div>{{HTTPSidebar}}</div> + +<p>ããã¯ææžã®çš®é¡ã«é¢é£ä»ããããŠãã MIME ã¿ã€ãã®äžèŠ§ã§ãããäžè¬çãªæ¡åŒµåã®æé ã«äžŠã¹ãŠããŸãã</p> + +<p>2 ã€ã®äž»èŠãª MIME ã¿ã€ãã¯ãæ¢å®ã®ã¿ã€ãã®åœ¹å²ãšããŠéèŠã§ãã</p> + +<ul> + <li><code>text/plain</code> ã¯ãããã¹ã圢åŒãã¡ã€ã«ã®æ¢å®ã®å€ã§ããããã¹ã圢åŒãã¡ã€ã«ã¯äººéãèªããã¯ãã§ããããã€ããªãŒããŒã¿ãå«ãã§ã¯ãªããŸããã</li> + <li><code>application/octet-stream</code> ã¯ãäžèšä»¥å€ã®å Žåã®æ¢å®å€ã§ããæªç¥ã®çš®é¡ã®ãã¡ã€ã«ã¯ããã®ã¿ã€ãã䜿çšããã¹ãã§ãããã©ãŠã¶ãŒã¯ãããã®ãã¡ã€ã«ãæ±ãéã«ç¹ã«æ³šæãæããå±éºãªåäœãããŠãŒã¶ãŒãä¿è·ããããšããŸãã</li> +</ul> + +<p>IANA 㯠MIME ã¡ãã£ã¢ã¿ã€ãã®å
¬åŒãªç»é²å
ã§ããã<a href="http://www.iana.org/assignments/media-types/media-types.xhtml">ãã¹ãŠã®å
¬åŒ MIME ã¿ã€ãã®äžèŠ§</a> ã管çããŠããŸãã以äžã®è¡šã¯ããŠã§ãåãã«éèŠãªäžéšã® MIME ã¿ã€ããæ²èŒããŠããŸã:</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">æ¡åŒµå</th> + <th scope="col">ææžã®çš®é¡</th> + <th scope="col">MIME ã¿ã€ã</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>.aac</code></td> + <td>AAC é³å£°</td> + <td><code>audio/aac</code></td> + </tr> + <tr> + <td><code>.abw</code></td> + <td><a href="https://ja.wikipedia.org/wiki/AbiWord">AbiWord</a> ææž</td> + <td><code>application/x-abiword</code></td> + </tr> + <tr> + <td><code>.arc</code></td> + <td>(è€æ°ã®ãã¡ã€ã«ãåã蟌ãŸãã) ã¢ãŒã«ã€ãææž</td> + <td><code>application/x-freearc</code></td> + </tr> + <tr> + <td><code>.avi</code></td> + <td>AVI: Audio Video Interleave</td> + <td><code>video/x-msvideo</code></td> + </tr> + <tr> + <td><code>.azw</code></td> + <td>Amazon Kindle eBook 圢åŒ</td> + <td><code>application/vnd.amazon.ebook</code></td> + </tr> + <tr> + <td><code>.bin</code></td> + <td>ä»»æã®çš®é¡ã®ãã€ããªãŒããŒã¿</td> + <td><code>application/octet-stream</code></td> + </tr> + <tr> + <td><code>.bmp</code></td> + <td>Windows OS/2 ããããããç»å</td> + <td><code>image/bmp</code></td> + </tr> + <tr> + <td><code>.bz</code></td> + <td>BZip ã¢ãŒã«ã€ã</td> + <td><code>application/x-bzip</code></td> + </tr> + <tr> + <td><code>.bz2</code></td> + <td>BZip2 ã¢ãŒã«ã€ã</td> + <td><code>application/x-bzip2</code></td> + </tr> + <tr> + <td><code>.csh</code></td> + <td>C-Shell ã¹ã¯ãªãã</td> + <td><code>application/x-csh</code></td> + </tr> + <tr> + <td><code>.css</code></td> + <td>ã«ã¹ã±ãŒãã£ã³ã°ã¹ã¿ã€ã«ã·ãŒã (CSS)</td> + <td><code>text/css</code></td> + </tr> + <tr> + <td><code>.csv</code></td> + <td>ã«ã³ãåºåãå€ (CSV)</td> + <td><code>text/csv</code></td> + </tr> + <tr> + <td><code>.doc</code></td> + <td>Microsoft Word</td> + <td><code>application/msword</code></td> + </tr> + <tr> + <td><code>.docx</code></td> + <td>Microsoft Word (OpenXML)</td> + <td><code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code></td> + </tr> + <tr> + <td><code>.eot</code></td> + <td>MS åã蟌㿠OpenType ãã©ã³ã</td> + <td><code>application/vnd.ms-fontobject</code></td> + </tr> + <tr> + <td><code>.epub</code></td> + <td>é»ååºç (EPUB)</td> + <td><code>application/epub+zip</code></td> + </tr> + <tr> + <td><code>.gz</code></td> + <td>GZip å§çž®ã¢ãŒã«ã€ã</td> + <td><code>application/gzip</code></td> + </tr> + <tr> + <td><code>.gif</code></td> + <td>ã°ã©ãã£ãã¯äº€æåœ¢åŒ (GIF)</td> + <td><code>image/gif</code></td> + </tr> + <tr> + <td><code>.htm<br> + .html</code></td> + <td>ãã€ããŒããã¹ãããŒã¯ã¢ããèšèª (HTML)</td> + <td><code>text/html</code></td> + </tr> + <tr> + <td><code>.ico</code></td> + <td>ã¢ã€ã³ã³åœ¢åŒ</td> + <td><code>image/vnd.microsoft.icon</code></td> + </tr> + <tr> + <td><code>.ics</code></td> + <td>iCalendar 圢åŒ</td> + <td><code>text/calendar</code></td> + </tr> + <tr> + <td><code>.jar</code></td> + <td>Java Archive (JAR)</td> + <td><code>application/java-archive</code></td> + </tr> + <tr> + <td><code>.jpeg</code><br> + <code>.jpg</code></td> + <td>JPEG ç»å</td> + <td><code>image/jpeg</code></td> + </tr> + <tr> + <td><code>.js</code></td> + <td>JavaScript</td> + <td> + <p>以äžã®ä»æ§æžã«ããã° <code>text/javascript</code></p> + + <ul> + <li><a href="https://html.spec.whatwg.org/multipage/#scriptingLanguages">https://html.spec.whatwg.org/multipage/#scriptingLanguages</a></li> + <li><a href="https://html.spec.whatwg.org/multipage/#dependencies:willful-violation">https://html.spec.whatwg.org/multipage/#dependencies:willful-violation</a></li> + <li><a href="https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/">https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/</a></li> + </ul> + </td> + </tr> + <tr> + <td><code>.json</code></td> + <td>JSON 圢åŒ</td> + <td><code>application/json</code></td> + </tr> + <tr> + <td><code>.jsonld</code></td> + <td>JSON-LD 圢åŒ</td> + <td><code>application/ld+json</code></td> + </tr> + <tr> + <td><code>.mid</code><br> + <code>.midi</code></td> + <td>Musical Instrument Digital Interface (MIDI)</td> + <td><code>audio/midi</code> <code>audio/x-midi</code></td> + </tr> + <tr> + <td><code>.mjs</code></td> + <td>JavaScript ã¢ãžã¥ãŒã«</td> + <td><code>text/javascript</code></td> + </tr> + <tr> + <td><code>.mp3</code></td> + <td>MP3 é³å£°</td> + <td><code>audio/mpeg</code></td> + </tr> + <tr> + <td><code>.mpeg</code></td> + <td>MPEG åç»</td> + <td><code>video/mpeg</code></td> + </tr> + <tr> + <td><code>.mpkg</code></td> + <td>Apple Installer Package</td> + <td><code>application/vnd.apple.installer+xml</code></td> + </tr> + <tr> + <td><code>.odp</code></td> + <td>OpenDocuemnt ãã¬ãŒã³ããŒã·ã§ã³ææž</td> + <td><code>application/vnd.oasis.opendocument.presentation</code></td> + </tr> + <tr> + <td><code>.ods</code></td> + <td>OpenDocuemnt è¡šèšç®ææž</td> + <td><code>application/vnd.oasis.opendocument.spreadsheet</code></td> + </tr> + <tr> + <td><code>.odt</code></td> + <td>OpenDocument ããã¹ãææž</td> + <td><code>application/vnd.oasis.opendocument.text</code></td> + </tr> + <tr> + <td><code>.oga</code></td> + <td>OGG é³å£°</td> + <td><code>audio/ogg</code></td> + </tr> + <tr> + <td><code>.ogv</code></td> + <td>OGG åç»</td> + <td><code>video/ogg</code></td> + </tr> + <tr> + <td><code>.ogx</code></td> + <td>OGG</td> + <td><code>application/ogg</code></td> + </tr> + <tr> + <td><code>.opus</code></td> + <td>Opus é³å£°</td> + <td><code>audio/opus</code></td> + </tr> + <tr> + <td><code>.otf</code></td> + <td>OpenType ãã©ã³ã</td> + <td><code>font/otf</code></td> + </tr> + <tr> + <td><code>.png</code></td> + <td>Portable Network Graphics</td> + <td><code>image/png</code></td> + </tr> + <tr> + <td><code>.pdf</code></td> + <td>Adobe <a href="https://acrobat.adobe.com/jp/ja/why-adobe/about-adobe-pdf.html">Portable Document Format</a> (PDF)</td> + <td><code>application/pdf</code></td> + </tr> + <tr> + <td><code>.php</code></td> + <td>Hypertext Preprocessor (<strong>Personal Home Page</strong>)</td> + <td><code>application/x-httpd-php</code></td> + </tr> + <tr> + <td><code>.ppt</code></td> + <td>Microsoft PowerPoint</td> + <td><code>application/vnd.ms-powerpoint</code></td> + </tr> + <tr> + <td><code>.pptx</code></td> + <td>Microsoft PowerPoint (OpenXML)</td> + <td><code>application/vnd.openxmlformats-officedocument.presentationml.presentation</code></td> + </tr> + <tr> + <td><code>.rar</code></td> + <td>RAR ã¢ãŒã«ã€ã</td> + <td><code>application/vnd.rar</code></td> + </tr> + <tr> + <td><code>.rtf</code></td> + <td>ãªããããã¹ãåœ¢åŒ (RTF)</td> + <td><code>application/rtf</code></td> + </tr> + <tr> + <td><code>.sh</code></td> + <td>Bourne shell ã¹ã¯ãªãã</td> + <td><code>application/x-sh</code></td> + </tr> + <tr> + <td><code>.svg</code></td> + <td>Scalable Vector Graphics (SVG)</td> + <td><code>image/svg+xml</code></td> + </tr> + <tr> + <td><code>.swf</code></td> + <td><a href="https://en.wikipedia.org/wiki/SWF">Small web format</a> (SWF) ãŸã㯠Adobe Flash ææž</td> + <td><code>application/x-shockwave-flash</code></td> + </tr> + <tr> + <td><code>.tar</code></td> + <td>Tape Archive (TAR)</td> + <td><code>application/x-tar</code></td> + </tr> + <tr> + <td><code>.tif<br> + .tiff</code></td> + <td>Tagged Image File Format (TIFF)</td> + <td><code>image/tiff</code></td> + </tr> + <tr> + <td><code>.ts</code></td> + <td>MPEG transport stream</td> + <td><code>video/mp2t</code></td> + </tr> + <tr> + <td><code>.ttf</code></td> + <td>TrueType ãã©ã³ã</td> + <td><code>font/ttf</code></td> + </tr> + <tr> + <td><code>.txt</code></td> + <td>ããã¹ããã¡ã€ã« (äžè¬ã« ASCII or ISO 8859-<em>n</em>)</td> + <td><code>text/plain</code></td> + </tr> + <tr> + <td><code>.vsd</code></td> + <td>Microsoft Visio</td> + <td><code>application/vnd.visio</code></td> + </tr> + <tr> + <td><code>.wav</code></td> + <td>Waveform é³å£°åœ¢åŒ</td> + <td><code>audio/wav</code></td> + </tr> + <tr> + <td><code>.weba</code></td> + <td>WEBM é³å£°</td> + <td><code>audio/webm</code></td> + </tr> + <tr> + <td><code>.webm</code></td> + <td>WEBM åç»</td> + <td><code>video/webm</code></td> + </tr> + <tr> + <td><code>.webp</code></td> + <td>WEBP ç»å</td> + <td><code>image/webp</code></td> + </tr> + <tr> + <td><code>.woff</code></td> + <td>Web Open Font Format (WOFF)</td> + <td><code>font/woff</code></td> + </tr> + <tr> + <td><code>.woff2</code></td> + <td>Web Open Font Format (WOFF)</td> + <td><code>font/woff2</code></td> + </tr> + <tr> + <td><code>.xhtml</code></td> + <td>XHTML</td> + <td><code>application/xhtml+xml</code></td> + </tr> + <tr> + <td><code>.xls</code></td> + <td>Microsoft Excel</td> + <td><code>application/vnd.ms-excel</code></td> + </tr> + <tr> + <td><code>.xlsx</code></td> + <td>Microsoft Excel (OpenXML)</td> + <td><code>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</code></td> + </tr> + <tr> + <td><code>.xml</code></td> + <td><code>XML</code></td> + <td><code>application/xml</code>: äžè¬ã®ãŠãŒã¶ãŒããèªãããã®<em>ã§ã¯ãªã</em>å Žå (<a href="https://tools.ietf.org/html/rfc3023#section-3">RFC 3023</a>, section 3)<br> + <code>text/xml</code>: äžè¬ã®ãŠãŒã¶ãŒããèªãããã®ã§ããå Žå (<a href="https://tools.ietf.org/html/rfc3023#section-3">RFC 3023</a>, section 3)</td> + </tr> + <tr> + <td><code>.xul</code></td> + <td>XUL</td> + <td><code>application/vnd.mozilla.xul+xml</code></td> + </tr> + <tr> + <td><code>.zip</code></td> + <td>ZIP ã¢ãŒã«ã€ã</td> + <td><code>application/zip</code></td> + </tr> + <tr> + <td><code>.3gp</code></td> + <td><a href="https://en.wikipedia.org/wiki/3GP_and_3G2">3GPP</a> é³å£°/åç»ã³ã³ãããŒ</td> + <td><code>video/3gpp</code><br> + åç»ãå«ãŸãªãå Žå㯠<code>audio/3gpp</code></td> + </tr> + <tr> + <td><code>.3g2</code></td> + <td><a href="https://en.wikipedia.org/wiki/3GP_and_3G2">3GPP2</a> é³å£°/åç»ã³ã³ãããŒ</td> + <td><code>video/3gpp2</code><br> + åç»ãå«ãŸãªãå Žå㯠<code>audio/3gpp2</code></td> + </tr> + <tr> + <td><code>.7z</code></td> + <td><a href="https://ja.wikipedia.org/wiki/7-Zip">7-zip</a> ã¢ãŒã«ã€ã</td> + <td><code>application/x-7z-compressed</code></td> + </tr> + </tbody> +</table> diff --git a/files/ja/web/http/basics_of_http/mime_types/index.html b/files/ja/web/http/basics_of_http/mime_types/index.html new file mode 100644 index 0000000000..687515e7f6 --- /dev/null +++ b/files/ja/web/http/basics_of_http/mime_types/index.html @@ -0,0 +1,329 @@ +--- +title: MIME ã¿ã€ã (IANA ã¡ãã£ã¢ã¿ã€ã) +slug: Web/HTTP/Basics_of_HTTP/MIME_types +tags: + - Content-Type + - Guide + - HTTP + - MIME ã¿ã€ã + - application/javascript + - application/json + - application/xml + - ãšã³ãã£ãã£ããã㌠+translation_of: Web/HTTP/Basics_of_HTTP/MIME_types +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><strong>ã¡ãã£ã¢ã¿ã€ã</strong> (å¥å <strong>Multipurpose Internet Mail Extensions ãŸã㯠MIME ã¿ã€ã</strong>) ã¯ãææžããã¡ã€ã«ããŸãã¯ãã€ãåã®æ§è³ªã圢åŒã瀺ãæšæºã§ãã</span> IETF ã® {{RFC(6838)}} ã§å®çŸ©ãããæšæºåãããŠããŸãã</p> + +<p><a href="https://www.iana.org/">Internet Assigned Numbers Authority (IANA)</a> ã¯ãã¹ãŠã®å
¬åŒã® MIME ã¿ã€ãã管çããŠããã<a href="https://www.iana.org/assignments/media-types/media-types.xhtml">Media Types</a> ããŒãžã§ææ°ã®å®å
šãªãªã¹ããèŠã€ããããšãã§ããŸãã</p> + +<div class="warning"> +<p><strong>éèŠ:</strong>ãã©ãŠã¶ãŒã¯ URL ãåŠçããæ¹æ³ã決å®ããããã«ã<em>ãã¡ã€ã«æ¡åŒµåã§ã¯ãªã</em> MIME ã¿ã€ãã䜿çšããŸãã®ã§ããŠã§ããµãŒããŒã¯æ£ãã MIME ã¿ã€ããã¬ã¹ãã³ã¹ã® {{HTTPHeader("Content-Type")}} ããããŒã§éä¿¡ããããšãéèŠã§ãããããæ£ããæ§æãããŠããªããšããã©ãŠã¶ãŒã¯ãã¡ã€ã«ã®äžèº«ã誀ã£ãŠè§£éãããµã€ããæ£ããåäœããªãã£ãããããŠã³ããŒããã¡ã€ã«ã誀ã£ãŠæ±ããããããããšããããŸãã</p> +</div> + +<h2 id="Structure_of_a_MIME_type" name="Structure_of_a_MIME_type">MIME ã¿ã€ãã®æ§é </h2> + +<p>ãã£ãšãåçŽãª MIME ã¿ã€ãã¯<var>ã¿ã€ã</var>ãš<var>ãµãã¿ã€ã</var>ã§æ§æãããŸãããããã¯ã©ã¡ããæååã§ããã®éãã¹ã©ãã·ã¥ (<code>/</code>) ã§æ¥ç¶ãã MIME ã¿ã€ããæ§æããŸãã{{Glossary("Whitespace", "ãã¯ã€ãã¹ããŒã¹")}}㯠MIME ã¿ã€ãã§ã¯èš±å¯ãããŠããŸããã</p> + +<pre class="syntaxbox notranslate"><var>ã¿ã€ã</var>/<var>ãµãã¿ã€ã</var></pre> + +<p><var>ã¿ã€ã</var>ã¯ããŒã¿åãåœãŠã¯ãŸãå
šè¬çãªã«ããŽãªãããªãã¡ <code>video</code> ã <code>text</code> ãªã©ãè¡šããŸãã<var>ãµãã¿ã€ã</var>ã¯ããã® MIME ã¿ã€ããè¡šãæ£ç¢ºãªããŒã¿ã®çš®é¡ãèå¥ããŸããäŸãã°ã MIME ã¿ã€ãã <code>text</code> ã®å Žåããµãã¿ã€ã㯠<code>plain</code> (ãã¬ã€ã³ããã¹ã)ã <code>html</code> ({{Glossary("HTML")}} ãœãŒã¹ã³ãŒã)ã <code>calendar</code> (iCalendar/<code>.ics</code>) ãã¡ã€ã«ãªã©ã§ãã</p> + +<p>ãã¹ãŠã®ã¿ã€ãã¯å©çšå¯èœãªãµãã¿ã€ããæã£ãŠããã MIME ã¿ã€ãã¯åžžã«ã¿ã€ããšãµãã¿ã€ãã®äž¡æ¹ãæã¡ãäžæ¹ã ãã§äœ¿ãããããšã¯ãããŸããã</p> + +<p>ä»»æã§<strong>åŒæ°</strong>ãè¿œå ããŠãè¿œå ã®è©³çŽ°æ
å ±ãæäŸããããšãã§ããŸãã</p> + +<pre class="syntaxbox notranslate"><var>ã¿ã€ã</var>/<var>ãµãã¿ã€ã</var>;<var>åŒæ°</var>=<var>å€</var></pre> + +<p>äŸãã°ã MIME ã¿ã€ãã®ãã¡ã¡ã€ã³ã¿ã€ãã <code>text</code> ã§ãããã®ã§ã¯ãä»»æ㧠<code>charset</code> åŒæ°ã䜿çšããŠãããŒã¿å
ã®æåã®æåã³ãŒããæå®ããããšãã§ããŸãã <code>charset</code> ãæå®ãããªãå Žåã¯ãæ¢å®ã§ã¯ {{Glossary("ASCII")}} (<code>US-ASCII</code>) ãã{{Glossary("user agent", "ãŠãŒã¶ãŒãšãŒãžã§ã³ã")}}ã®èšå®ã§äžæžããããªãéã䜿ãããŸãã UTF-8 ã®ããã¹ããã¡ã€ã«ãæå®ããã«ã¯ã MIME ã¿ã€ããšã㊠<code>text/plain;charset=UTF-8</code> ã䜿çšãããŸãã</p> + +<p>MIME ã¿ã€ãã¯å€§æåã»å°æåãåºå¥ãããŸãããã倧æåã»å°æåã®åºå¥ãç¹å®ã®æå³ãæã€å¯èœæ§ãããåŒæ°ã®å€ãé€ããŠãäŒçµ±çã«å°æåã§èšè¿°ãããŸãã</p> + +<h3 id="Types" name="Types">ã¿ã€ã</h3> + +<p>ã¿ã€ãã«ã¯Â <ruby><strong>åå¥å</strong><rp> (</rp><rt>discrete</rt></ruby> ãš<ruby><strong>ãã«ãããŒãå</strong><rp> (</rp><rt>multipart</rt></ruby> ã®äºçš®é¡ããããŸããåå¥åã¯åäžã®ãã¡ã€ã«ãŸãã¯ã¡ãã£ã¢ãè¡šãã¿ã€ãã§ãåäžã®ããã¹ããã¡ã€ã«ãé³æ¥œãã¡ã€ã«ãåäžã®æ åãªã©ã§ãããã«ãããŒãåã¯è€æ°ã®ã³ã³ããŒãã³ãéšåã«ãã£ãŠæ§æãããææžãè¡šããã®ã§ãããããã®éšåãåºæã® MIME ã¿ã€ããæã¡ãŸãããŸãããã«ãããŒãåã¯äžåºŠã®ãã©ã³ã¶ã¯ã·ã§ã³ã§äžç·ã«éä¿¡ãããè€æ°ã®ãã¡ã€ã«ããŸãšããããšãã§ããŸããäŸãã°ããã«ãããŒã MIME ã¿ã€ãã¯è€æ°ã®ãã¡ã€ã«ãé»åã¡ãŒã«ã«æ·»ä»ãããšãã«äœ¿çšãããŸãã</p> + +<h4 id="Discrete_types" name="Discrete_types">åå¥å</h4> + +<p>çŸåš IANA ã«ç»é²ãããŠããåå¥åã¯ä»¥äžã®ãšããã§ãã</p> + +<dl> + <dt><code>application</code><a href="https://www.iana.org/assignments/media-types/media-types.xhtml#application" style="float: right;">IANA ã§ã®äžèŠ§</a></dt> + <dd>ä»ã®ã¿ã€ãã«æ確ã«åœãŠã¯ãŸããªããããããçš®é¡ã®ãã€ããªããŒã¿ã§ããäœããã®æ¹æ³ã§å®è¡ãããã解éããããããããŒã¿ããŸãã¯å©çšããã®ã«ç¹å®ã®ã¢ããªã±ãŒã·ã§ã³ãç¹å®ã®çš®é¡ã®ã¢ããªã±ãŒã·ã§ã³ãå¿
èŠãšãããã€ããªããŒã¿ã®ã©ã¡ããã§ããæ±çšçãªãã€ããªããŒã¿ (ãŸãã¯æ¬åœã®ã¿ã€ããäžæãªãã€ããªããŒã¿) 㯠<code>application/octet-stream</code> ã§ããä»ã®ããããäŸãšããŠã <code>application/pdf</code>, <code>application/pkcs8</code>, <code>application/zip</code> ããããŸãã</dd> + <dt><code>audio</code> <a href="https://www.iana.org/assignments/media-types/media-types.xhtml#audio" style="float: right;">IANA ã§ã®äžèŠ§</a></dt> + <dd>é³å£°ãŸãã¯é³æ¥œããŒã¿ã§ããäŸãã°ã <code>audio/mpeg</code>, <code>audio/vorbis</code> ãªã©ããããŸãã</dd> + <dt><code>example</code></dt> + <dd>MIME ã¿ã€ãã®äœ¿çšæ¹æ³ãäŸç€ºããéã®ãã¬ã€ã¹ãã«ããŒãšããŠäœ¿çšããããã«äºçŽãããŠããŸãããããã¯ãµã³ãã«ã³ãŒãã®ãªã¹ããææžã®å€ã§äœ¿çšããŠã¯ãããŸããã <code>example</code> ã¯ãµãã¿ã€ããšããŠäœ¿çšããããšãã§ããŸããäŸãã°ããŠã§ãäžã§é³å£°ãšããŠåäœããäŸãšããŠã MIME ã¿ã€ãã® <code>audio/example</code> ã䜿çšããŠã¿ã€ãããã¬ã€ã¹ãã«ããŒã§ãããå®äžçã§äœ¿çšãããã³ãŒãã§ã¯é©åãªãã®ã§çœ®ãæããããããšãè¡šããŸãã</dd> + <dt><code>font</code> <a href="https://www.iana.org/assignments/media-types/media-types.xhtml#font" style="float: right;">IANA ã§ã®äžèŠ§</a></dt> + <dd>ãã©ã³ããã¿ã€ããã§ã€ã¹ã®ããŒã¿ã§ãããã䜿ããããã®ãšããŠã¯ <code>font/woff</code>, <code>font/ttf</code>, <code>font/otf</code> ãªã©ããããŸãã</dd> + <dt><code>image</code> <a href="https://www.iana.org/assignments/media-types/media-types.xhtml#image" style="float: right;">IANA ã§ã®äžèŠ§</a></dt> + <dd>ç»åãŸãã¯ã°ã©ãã£ãã¯ããŒã¿ã§ããããããããšãã¯ã¿ãŒéæ¢ç»åã®äž¡æ¹ãå«ã¿ãããã«éæ¢ç»å圢åŒã®ã¢ãã¡ãŒã·ã§ã³çã§ããã¢ãã¡ãŒã·ã§ã³ {{Glossary("GIF")}} ã APNG ãªã©ãå«ã¿ãŸãããã䜿ããããã®ãšããŠã¯ã <code>image/jpeg</code>, <code>image/png</code>, <code>image/svg+xml</code> ãªã©ããããŸãã</dd> + <dt><code>model</code> <a href="https://www.iana.org/assignments/media-types/media-types.xhtml#model" style="float: right;">IANA ã§ã®äžèŠ§</a></dt> + <dd>äžæ¬¡å
ã®ãªããžã§ã¯ããã·ãŒã³ãªã©ã®ã¢ãã«ããŒã¿ã§ããäŸãã°ã <code>model/3mf</code> ã <code>model/vml</code> ãªã©ããããŸãã</dd> + <dt><code>text</code> <a href="https://www.iana.org/assignments/media-types/media-types.xhtml#text" style="float: right;">IANA ã§ã®äžèŠ§</a></dt> + <dd>ããã¹ãã®ã¿ã®ããŒã¿ã§ã人éãèªãããšãã§ããããããã³ã³ãã³ãããœãŒã¹ã³ãŒããã³ã³ãåºåãå€ (CSV) 圢åŒã®ããŒã¿ã®ãããªããã¹ãããŒã¿ãå«ã¿ãŸããäŸãã°ã <code>text/plain</code>, <code>text/csv</code>, <code>text/html</code> ãªã©ããããŸãã</dd> + <dt><code>video</code> <a href="https://www.iana.org/assignments/media-types/media-types.xhtml#video" style="float: right;">IANA ã§ã®äžèŠ§</a></dt> + <dd>åç»ã®ããŒã¿ãŸãã¯ãã¡ã€ã«ã§ã MP4 movies (<code>video/mp4</code>) ãªã©ããããŸãã</dd> +</dl> + +<p>ç¹å®ã®ãµãã¿ã€ããæããªãããã¹ã圢åŒã®ææžã«ã¯ã <code>text/plain</code> ã䜿çšããŠãã ãããåæ§ã«ãç¹å®ã®ãµãã¿ã€ããŸãã¯æ¢ç¥ã®ãµãã¿ã€ããæããªããã€ããªåœ¢åŒã®ææžã«ã¯ã <code>application/octet-stream</code> ã䜿çšããŠãã ããã</p> + +<h4 id="Multipart_types" name="Multipart_types">ãã«ãããŒãå</h4> + +<p id="sect1"><strong>ãã«ãããŒã</strong>åã¯ããµã€ãããããç°ãªã MIME ã¿ã€ããæã€è€æ°ã®éšåã«åå²ãããææžã®ã«ããŽãªã瀺ããŸãããããã¯ãç¹ã«é»åã¡ãŒã«ã«ãããŠãåããã©ã³ã¶ã¯ã·ã§ã³ã®äžéšã§ããè€æ°ã®å¥ã
ã®ãã¡ã€ã«ãè¡šãããã«ã䜿çšãããŸãããããã¯<strong>è€åææž</strong>ãè¡šããŸãã</p> + +<p>HTTP 㯠<code>multipart/form-data</code> ã <a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã </a>ã® {{HTTPMethod("POST")}} ã¡ãœããã§äœ¿çšããããã <code>multipart/byteranges</code> ãææžã®äžéšãéä¿¡ããããã« {{HTTPStatus("206")}} <code>Partial Content</code> ã§äœ¿çšããããããäŸå€ãé€ããŠã HTTP ã¯ãã«ãããŒãææžãç¹å®ã®æ¹æ³ã§æ±ããŸãããã¡ãã»ãŒãžã¯ (ããããææžãã€ã³ã©ã€ã³ã§è¡šç€ºããæ¹æ³ãããããããååãä»ããŠä¿åããããããšãææ¡ãããã§ãããã) ãã©ãŠã¶ãŒãžéä¿¡ãããŸãã</p> + +<p>ãã«ãããŒãåã¯äºçš®é¡ããããŸãã</p> + +<dl> + <dt><code>message</code> <a href="https://www.iana.org/assignments/media-types/media-types.xhtml#message" style="float: right;">IANA ã§ã®äžèŠ§</a></dt> + <dd>A message that encapsulates other messages. This can be used, for instance, to represent an email that includes a forwarded message as part of its data, or to allow sending very large messages in chunks as if it were multiple messages. Examples include <code>message/rfc822</code> (for forwarded or replied-to message quoting) and <code>message/partial</code> to allow breaking a large message into smaller ones automatically to be reassembled by the recipient.</dd> + <dt><code>multipart</code> <a href="https://www.iana.org/assignments/media-types/media-types.xhtml#multipart" style="float: right;">IANA ã§ã®äžèŠ§</a></dt> + <dd>Data that is comprised of multiple components which may individually have different MIME types. Examples include <code>multipart/form-data</code> (for data produced using the {{domxref("FormData")}} API) and <code>multipart/byteranges</code> (defined in {{RFC(7233, "5.4.1")}} and used with {{Glossary("HTTP")}}'s {{HTTPStatus(206)}} "Partial Content" response returned when the fetched data is only part of the content, such as is delivered using the {{HTTPHeader("Range")}} header).</dd> +</dl> + +<h2 id="Important_MIME_types_for_Web_developers" name="Important_MIME_types_for_Web_developers">ãŠã§ãéçºè
åãã®éèŠãª MIME ã¿ã€ã</h2> + +<h3 id="applicationoctet-stream">application/octet-stream</h3> + +<p>ããã¯ããã€ããªãã¡ã€ã«ã§ã¯æ¢å®ã§ããããã¯<em>æªç¥ã®ãã€ããªåœ¢åŒ</em>ã®ãã¡ã€ã«ãè¡šããã®ã§ããããã©ãŠã¶ãŒã¯ãµã€ãå®è¡ããããå®è¡ããã¹ãã確èªãããããŸãããããã㯠{{HTTPHeader("Content-Disposition")}} ããããŒã®å€ã« <code>attachment</code> ãèšå®ããããã®ããã«æ±ãããååãä»ããŠä¿åããã€ã¢ãã°ãææ¡ããŸãã</p> + +<h3 id="textplain">text/plain</h3> + +<p>ããã¯ãããã¹ã圢åŒã®ãã¡ã€ã«ã®æ¢å®ã§ããå®éã«ã¯ãæªç¥ã®ããã¹ã圢åŒãã®ãã¡ã€ã«ãè¡šããã®ã§ã¯ãããŸããããã©ãŠã¶ãŒã¯è¡šç€ºå¯èœã§ãããšæšæž¬ããŸãã</p> + +<div class="blockIndicator note"> +<p><code>text/plain</code> ã¯ãä»»æã®ããã¹ã圢åŒããŒã¿ããè¡šããã®ã§ã¯ãããŸããã®ã§æ³šæããŠãã ãããç¹å®ã®çš®é¡ã®ããã¹ã圢åŒã®ããŒã¿ãæ³å®ããŠããå Žåã¯ããããããã®ãšããã«å€æãããªãã§ããããç¹ã«ãCSS ãã¡ã€ã«ã宣èšãã {{HTMLElement("link")}} èŠçŽ ãã <code>text/plain</code> 圢åŒã®ãã¡ã€ã«ãããŠã³ããŒããããšã <code>text/plain</code> ã§ç€ºããããã¡ã€ã«ã¯æ£ãã CSS ãã¡ã€ã«ã§ãããšèªèãããŸããã CSS ã® MIME ã¿ã€ãã§ãã <code>text/css</code> ã䜿çšããªããã°ãªããŸããã</p> +</div> + +<h3 id="textcss">text/css</h3> + +<p>ãŠã§ãããŒãžãã¹ã¿ã€ã«ä»ãããããã® CSS ãã¡ã€ã«ã¯ <code>text/css</code> ã§éä¿¡ããããšã<strong>å¿
èŠ</strong>ã§ãããµãŒããŒã CSS ãã¡ã€ã«ã«ã€ã㊠<code>.css</code> ã®æ¥å°ŸèŸãèªèããªãå Žåã <code>text/plain</code> ã <code>application/octet-stream</code> ã® MIME ã¿ã€ãã§éä¿¡ããããšããããŸãããã®å Žåãå€ãã®ãã©ãŠã¶ãŒãã CSS ãšããŠèªèããããç¡èŠãããããšã«ãªããŸãã</p> + +<h3 id="texthtml">text/html</h3> + +<p>ãã¹ãŠã® HTML ã³ã³ãã³ãã¯ããã®ã¿ã€ãã§æäŸããã¹ãã§ãã XHTML åãã®æ°ã㪠MIME ã¿ã€ã (<code>application/xhtml+xml</code> ãªã©) ã¯ãçŸåšã§ã¯ã»ãŒç¡çšã§ãã</p> + +<div class="blockIndicator note"> +<p><strong>ã¡ã¢:</strong> XML ã®å³å¯ãªè§£éã«ãŒã«ãã <code><a href="/ja/docs/Web/API/CDATASection"><![CDATA[âŠ]]></a></code> ã»ã¯ã·ã§ã³ã HTML/SVG/MathML ã®åå空éã«å«ãŸããªãèŠçŽ ã䜿çšãããå Žåã¯ã <code>application/xml</code> ãŸã㯠<code>application/xhtml+xml</code> ã䜿çšããŠãã ããã</p> +</div> + +<h3 id="textjavascript"><span id="JavaScript_types">text/javascript</span></h3> + +<p>HTML ä»æ§æžã§ã¯ã JavaScript ãã¡ã€ã«ã¯ MIME ã¿ã€ããšããŠåžžã« <code>text/javascript</code> ã䜿çšããããšã«ãªã£ãŠããŸããä»ã®å€ã¯åŠ¥åœã§ãããšèŠãªãããããããã䜿çšãããšã¹ã¯ãªãããèªã¿èŸŒãŸããªãã£ãããå®è¡ãããªãã£ããããçµæã«ãªãå¯èœæ§ããããŸãã</p> + +<p>æŽå²çãªçç±ã§ã <a href="https://mimesniff.spec.whatwg.org/">MIME ã¹ãããã£ã³ã°æšæº</a> (ãã©ãŠã¶ãŒãã¡ãã£ã¢ã¿ã€ããã©ã®ããã«è§£éããæå¹ãªã¿ã€ããæããªãã³ã³ãã³ããã©ãåŠçããããå®çŸ©ããæ¹æ³ã®å®çŸ©) ã¯ã JavaScript ã以äžã®ãããããšåºæ¬çã«äžèŽãã MIME ã¿ã€ãã䜿çšããŠæäŸããããšãèš±å¯ããŠããŸãã</p> + +<ul> + <li><code>application/javascript</code></li> + <li><code>application/ecmascript</code></li> + <li><code>application/x-ecmascript</code> {{Non-standard_Inline}}</li> + <li><code>application/x-javascript</code> {{Non-standard_Inline}}</li> + <li><code>text/javascript</code></li> + <li><code>text/ecmascript</code></li> + <li><code>text/javascript1.0</code> {{Non-standard_Inline}}</li> + <li><code>text/javascript1.1</code> {{Non-standard_Inline}}</li> + <li><code>text/javascript1.2</code> {{Non-standard_Inline}}</li> + <li><code>text/javascript1.3</code> {{Non-standard_Inline}}</li> + <li><code>text/javascript1.4</code> {{Non-standard_Inline}}</li> + <li><code>text/javascript1.5</code> {{Non-standard_Inline}}</li> + <li><code>text/jscript</code> {{Non-standard_Inline}}</li> + <li><code>text/livescript</code> {{Non-standard_Inline}}</li> + <li><code>text/x-ecmascript</code> {{Non-standard_Inline}}</li> + <li><code>text/x-javascript</code> {{Non-standard_Inline}}</li> +</ul> + +<div class="blockIndicator note"> +<p><strong>Note:</strong> Even though any given {{Glossary("user agent")}} may support any or all of these, you should only use <code>text/javascript</code>. It's the only MIME type guaranteed to work now and into the future.</p> +</div> + +<p>Some content you find may have a <code>charset</code> parameter at the end of the <code>text/javascript</code> media type, to specify the character set used to represent the code's content. This is not valid, and in most cases will result in a script not being loaded.</p> + +<h3 id="Image_types" name="Image_types">ç»åã¿ã€ã</h3> + +<p>Files whose MIME type is <code>image</code> contain image data. The subtype specifies which specific image file format the data represents. Only a few image types are used commonly enough to be considered safe for use on web pages:</p> + +<p>{{page("/ja/docs/Web/Media/Formats/Image_types", "table-of-image-file-types")}}</p> + +<h3 id="Audio_and_video_types" name="Audio_and_video_types">é³å£°ãšåç»ã®ã¿ã€ã</h3> + +<p>ç»åãšåããã HTML 㯠{{HTMLElement("audio")}} ã {{HTMLElement("video")}} èŠçŽ ã§å¯Ÿå¿ããŠããåãå®çŸ©ããŠããªãã®ã§ããŠã§ãã§äœ¿çšããããšãã§ããã®ã¯äžéšã®ã¿ã§ãã <a href="/ja/docs/Web/HTML/Supported_media_formats">HTML5 ã® audio ãš video èŠçŽ ã§å¯Ÿå¿ããŠããã¡ãã£ã¢åœ¢åŒ</a>ã§ã䜿çšå¯èœãªã³ãŒããã¯ãã³ã³ãããŒã説æããŠããŸãã</p> + +<p>Our <a href="/ja/docs/Web/Media/Formats/Containers">media container formats guide</a> provides a list of the file types that are commonly supported by web browsers, including information about what their special use cases may be, any drawbacks they have, and compatibility information, along with other details.</p> + +<p>The <a href="/ja/docs/Web/Media/Formats/Audio_codecs">audio codec</a> and <a href="/ja/docs/Web/Media/Formats/Video_codecs">video codec</a> guides list the various codecs that web browsers often support, providing compatibility details along with technical information such as how many audio channels they support, what sort of compression is used, and what bit rates and so forth they're useful at. The <a href="/ja/docs/Web/Media/Formats/WebRTC_codecs">codecs used by WebRTC</a> guide expands upon this by specifically covering the codecs supported by the major web browsers, so you can choose the codecs that best cover the range of browsers you wish to support.</p> + +<p>As for MIME types of audio or video files, they typically specify the container format (file type). The optional <a href="/ja/docs/Web/Media/Formats/codecs_parameter">codecs parameter</a> can be added to the MIME type to further specify which codecs to use and what options were used to encode the media, such as codec profile, level, or other such information.</p> + +<p>The most commonly used MIME types used for web content are listed below. This isn't a complete list of all the types that may be available, however. See the <a href="/ja/docs/Web/Media/Formats/Containers">media container formats</a> guide for that.</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">MIME ã¿ã€ã</th> + <th scope="col">é³å£°ãŸãã¯åç»ã®ã¿ã€ã</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>audio/wave</code><br> + <code>audio/wav</code><br> + <code>audio/x-wav</code><br> + <code>audio/x-pn-wav</code></td> + <td>WAVE ã³ã³ãããŒåœ¢åŒã®é³å£°ãã¡ã€ã«ã PCM ãªãŒãã£ãªã³ãŒãã㯠(WAVE ã³ãŒãã㯠"1") ã¯ãããŠããµããŒããããŠããŸãããä»ã®ã³ãŒããã¯ã®ãµããŒã㯠(ãããšããŠã) éå®çã§ãã</td> + </tr> + <tr> + <td><code>audio/webm</code></td> + <td>WebM ã³ã³ãããŒåœ¢åŒã®é³å£°ãã¡ã€ã«ã Vorbis ã Opus ã WebM ä»æ§æžã§å
¬åŒã«å¯Ÿå¿ããŠããã³ãŒããã¯ã§ãã</td> + </tr> + <tr> + <td><code>video/webm</code></td> + <td>WebM ã³ã³ãããŒåœ¢åŒã®ãããããé³å£°ãå«ãåç»ãã¡ã€ã«ãVP8 ã VP9 ããã£ãšãäžè¬çã«äœ¿çšãããåç»ã³ãŒããã¯ã§ãã Vorbis ã Opus ããã£ãšãäžè¬çãªé³å£°ã³ãŒããã¯ã§ãã</td> + </tr> + <tr> + <td><code>audio/ogg</code></td> + <td>Ogg ã³ã³ãããŒåœ¢åŒã®é³å£°ãã¡ã€ã«ã Vorbis ãããã®ã³ã³ãããŒã§ãã£ãšãäžè¬çã«äœ¿çšãããé³å£°ã³ãŒããã¯ã§ãããããã Opus ãåæ§ã« Ogg ã§å¯Ÿå¿ããŸããã</td> + </tr> + <tr> + <td><code>video/ogg</code></td> + <td>Ogg ã³ã³ãããŒåœ¢åŒã®ãããããé³å£°ãå«ãåç»ãã¡ã€ã«ãéåžžã®åç»ã³ãŒããã¯ã¯ Theoraãé³å£°ã³ãŒããã¯ã¯ Vorbis ã§ããã Opus ããã£ãšæåã«ãªã£ãŠããŠããŸãã</td> + </tr> + <tr> + <td><code>application/ogg</code></td> + <td>OGG ã³ã³ãããŒåœ¢åŒã䜿çšããé³å£°ãŸãã¯åç»ã®ãã¡ã€ã«ãéåžžã®åç»ã³ãŒããã¯ã¯ Theoraãé³å£°ã³ãŒããã¯ã¯ Vorbis ã§ãã</td> + </tr> + </tbody> +</table> + +<h3 id="multipartform-data">multipart/form-data</h3> + +<p><code>multipart/form-data</code> ã¿ã€ãã¯ãå
¥åæžã¿ã® <a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã </a> ã®å
容ããã©ãŠã¶ãŒãããµãŒããŒã«éä¿¡ãããšãã«äœ¿çšããããšãã§ããŸãã</p> + +<p>ããã¯ãã«ãããŒãææžåœ¢åŒãšããŠè€æ°ã®éšåããæããå¢ç (äºéããã·ã¥ <code>--</code> ã§å§ãŸãæåå) ã«ãã£ãŠåºåãããŸããããããã®éšåã¯åºæã®ãšã³ãã£ãã£ã§ãããåºæã® HTTP ããããŒãšã㊠{{HTTPHeader("Content-Disposition")}} ããã¡ã€ã«ã¢ããããŒãã®ãã£ãŒã«ãã«ã¯ {{HTTPHeader("Content-Type")}} ãæã¡ãŸãã</p> + +<pre class="syntaxbox notranslate">Content-Type: multipart/form-data; boundary=aBoundaryString +(ãã«ãããŒãææžå
šäœã«é¢é£ä»ãããããä»ã®ããããŒ) + +--aBoundaryString +Content-Disposition: form-data; name="myFile"; filename="img.jpg" +Content-Type: image/jpeg + +(ããŒã¿) +--aBoundaryString +Content-Disposition: form-data; name="myField" + +(ããŒã¿) +--aBoundaryString +(ãµãããŒã) +--aBoundaryString-- + +</pre> + +<p>以äžã® <code><form></code> ããããšããŸãã</p> + +<pre class="brush: html notranslate"><form action="http://localhost:8000/" method="post" enctype="multipart/form-data"> + <label>Name: <input name="myTextField" value="Test"></label> + <label><input type="checkbox" name="myCheckBox"> Check</label> + <label>Upload file: <input type="file" name="myFile" value="test.txt"></label> + <button>Send the file</button> +</form></pre> + +<p>ããã¯ä»¥äžã®ã¡ãã»ãŒãžãéä¿¡ããŸãã</p> + +<pre class="notranslate">POST / HTTP/1.1 +Host: localhost:8000 +User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-US,en;q=0.5 +Accept-Encoding: gzip, deflate +Connection: keep-alive +Upgrade-Insecure-Requests: 1 +Content-Type: multipart/form-data; boundary=---------------------------8721656041911415653955004498 +Content-Length: 465 + +-----------------------------8721656041911415653955004498 +Content-Disposition: form-data; name="myTextField" + +Test +-----------------------------8721656041911415653955004498 +Content-Disposition: form-data; name="myCheckBox" + +on +-----------------------------8721656041911415653955004498 +Content-Disposition: form-data; name="myFile"; filename="test.txt" +Content-Type: text/plain + +Simple file. +-----------------------------8721656041911415653955004498-- + +</pre> + +<h3 id="multipartbyteranges">multipart/byteranges</h3> + +<p><code>multipart/byteranges</code> MIME ã¿ã€ãã¯ãéšåçãªã¬ã¹ãã³ã¹ããã©ãŠã¶ãŒãžè¿ãããã«äœ¿çšãããŸãã</p> + +<p>{{HTTPStatus("206")}}<code> Partial Content</code> ã¹ããŒã¿ã¹ã³ãŒããéä¿¡ãããšãããã® MIME ã¿ã€ãã¯ææžãããã€ãã®éšåã§æ§æãããŠããããšã瀺ããŠãããããããã®ãªã¯ãšã¹ããããç¯å²ã®ã²ãšã€ã«ãªããŸããã»ãã®ãã«ãããŒãåãšåæ§ã«ã {{HTTPHeader("Content-Type")}} 㧠<code>boundary</code> ã䜿çšããŠããããã®éšåãåºåããŸããããããã®éšåã¯å®éã®ã¿ã€ããè¡šã {{HTTPHeader("Content-Type")}} ããããŒãšãè¡šçŸããŠããç¯å²ãè¡šã {{HTTPHeader("Content-Range")}} ããããŒãæã¡ãŸãã</p> + +<pre class="notranslate"><code>HTTP/1.1 206 Partial Content +Accept-Ranges: bytes +Content-Type: multipart/byteranges; boundary=3d6b6a416f9b5 +Content-Length: 385 + +--3d6b6a416f9b5 +Content-Type: text/html +Content-Range: bytes 100-200/1270 + +eta http-equiv="Content-type" content="text/html; charset=utf-8" /> + <meta name="vieport" content +--3d6b6a416f9b5 +Content-Type: text/html +Content-Range: bytes 300-400/1270 + +-color: #f0f0f2; + margin: 0; + padding: 0; + font-family: "Open Sans", "Helvetica +--3d6b6a416f9b5--</code></pre> + +<h2 id="Importance_of_setting_the_correct_MIME_type" name="Importance_of_setting_the_correct_MIME_type">æ£ãã MIME ã¿ã€ããèšå®ããããšã®éèŠæ§</h2> + +<p>å€ãã®ãŠã§ããµãŒããŒã¯æªç¥ã®çš®é¡ã®ãªãœãŒã¹ã«ã€ããŠãæ¢å®ã® <code>application/octet-stream</code> MIME ã¿ã€ããéããŸããã»ãã¥ãªãã£äžã®çç±ã§ãå€ãã®ãã©ãŠã¶ãŒã¯ãã®ãããªãªãœãŒã¹ã«æ¢å®ã®ã¢ã¯ã·ã§ã³ãå®çŸ©ããããšãèš±å¯ããããªãœãŒã¹ã䜿çšããããã«ãã£ã¹ã¯ãžä¿åããããšããŠãŒã¶ãŒã«åŒ·å¶ããŸãã</p> + +<p>以äžã®ãããªèª€ã£ããµãŒããŒèšå®ãããèŠãããŸãã</p> + +<ul> + <li> + <p>RAR ã§å§çž®ããããã¡ã€ã«ããã®å Žåãå
ãã¡ã€ã«ã®å®éã®çš®é¡ã§ããããšãçæ³ã§ããããã¯ã .RAR ãã¡ã€ã«ãããŸããŸãªçš®é¡ã®è€æ°ã®ãªãœãŒã¹ãå«ãããšãã§ããããããããŠãã¯äžå¯èœã§ãããã®å ŽåããµãŒããŒã <code>application/x-rar-compressed</code> ãéä¿¡ããããã«èšå®ããŠãã ããã</p> + </li> + <li> + <p>é³å£°ããã³åç»ãæ£ãã MIME ã¿ã€ããæã€ãªãœãŒã¹ã ããã {{HTMLElement("video")}} ãŸã㯠{{HTMLElement("audio")}} èŠçŽ ã§åçãããŸãã<a href="/ja/docs/Web/Media/Formats">é³å£°ããã³åç»ã«å¯ŸããŠæ£ãã MIME ã¿ã€ãã䜿çšãã</a>ãã泚æããŠãã ããã</p> + </li> + <li> + <p>ãããã©ã€ãšã¿ãªãŒãªãã¡ã€ã«ã¿ã€ããç¹å¥ãªæäœãã§ããªããªãããã<code>application/octet-stream</code> ã®äœ¿çšã¯é¿ããŠãã ãããã»ãšãã©ã®ãã©ãŠã¶ãŒã¯ããã®æ±çšç㪠MIME ã¿ã€ãã«æ¢å®ã®åäœ (ãWord ã§éãããªã©) ãå®çŸ©ããããšãã§ããŸããã <code>application/vnd.mspowerpoint</code> ã®ãããªç¹å®ã®åãªãã°ããŠãŒã¶ãŒããã®ãããªãã¡ã€ã«ãèªåçã«éžæãããã¬ãŒã³ããŒã·ã§ã³ãœãããŠã§ã¢ã§éãããšãã§ããŸãã</p> + </li> +</ul> + +<h2 id="MIME_sniffing" name="MIME_sniffing">MIME ã¹ãããã£ã³ã°</h2> + +<p>MIME ã¿ã€ããæ¬ èœããŠãããããã㯠MIME ã¿ã€ãã誀ã£ãŠèšå®ãããŠãããšã¯ã©ã€ã¢ã³ããèããŠããå Žåã«ããã©ãŠã¶ãŒã¯ MIME ã¹ãããã£ã³ã°ãè¡ããŸããããã¯ããªãœãŒã¹ã確èªããŠæ£ãã MIME ã¿ã€ããæšæž¬ããŸãã</p> + +<p>MIME ã¹ãããã£ã³ã°ã¯ãã©ãŠã¶ãŒã«ãã£ãŠç°ãªãæ¹æ³ã§ãç°ãªãç¶æ³äžã§è¡ããŸãã (äŸãã°ã Safari ã¯åä¿¡ãã MIME ã¿ã€ããåããªãå Žåã¯ã URL ã®ãã¡ã€ã«ã®æ¡åŒµåãèŠãŸãã) å®è¡å¯èœãªã³ã³ãã³ããè¡šã MIME ã¿ã€ãã®äžéšã«ã¯ãã»ãã¥ãªãã£äžã®æžå¿µããããŸãããµãŒããŒã¯ {{HTTPHeader("X-Content-Type-Options")}} ãéä¿¡ããããšã§ãMIME ã¹ãããã£ã³ã°ãæå¶ã§ããŸãã</p> + +<h2 id="Other_methods_of_conveying_document_type" name="Other_methods_of_conveying_document_type">ææžåœ¢åŒãäŒããä»ã®æ¹æ³</h2> + +<p>MIME ã¿ã€ãã¯ãææžã®çš®é¡ã®æ
å ±ãäŒããå¯äžã®æ¹æ³ã§ã¯ãããŸããã</p> + +<ul> + <li>ç¹ã« Microsoft Windows ã§ã¯ããã¡ã€ã«åã®æ¡åŒµåã䜿çšããããšããããŸããæ¡åŒµåã«æå³ããããšã¯èããªããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ããããŸãã (Linux ã Mac OS ãªã©)ãæ£ãããšããä¿èšŒã¯ãããŸããã</li> + <li>ããžãã¯ãã³ããŒããã€ãæ§é ãèŠãããšã§ãæ§ã
ãªåœ¢åŒã®æ§æã«ãããã¡ã€ã«ã¿ã€ããæšæž¬ããããšãã§ããŸããäŸãã° GIF ãã¡ã€ã«ã¯16é²æ°ã®å€ <code>47 49 46 38 39</code> (<code>GIF89</code>)ã PNG ãã¡ã€ã«ã¯ <code>89 50 4E 47</code> (<code>.PNG</code>) ã§å§ãŸããŸããããžãã¯ãã³ããŒãæããªãçš®é¡ã®ãã¡ã€ã«ããããŸãã®ã§ã100%ä¿¡é Œã§ããã·ã¹ãã ã§ã¯ãããŸããã</li> +</ul> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/Media">ãŠã§ãã¡ãã£ã¢æè¡</a></li> + <li><a href="/ja/docs/Web/Media/Formats">ãŠã§ãäžã§äœ¿çšãããã¡ãã£ã¢åœ¢åŒã®ã¬ã€ã</a></li> + <li><a href="/ja/docs/Web/Security/Securing_your_site/Configuring_server_MIME_types">ãµãŒããŒã® MIME ã¿ã€ãã®æ£ããæ§æ</a></li> +</ul> diff --git a/files/ja/web/http/basics_of_http/resource_urls/index.html b/files/ja/web/http/basics_of_http/resource_urls/index.html new file mode 100644 index 0000000000..1161f32c54 --- /dev/null +++ b/files/ja/web/http/basics_of_http/resource_urls/index.html @@ -0,0 +1,73 @@ +--- +title: ãªãœãŒã¹ URL +slug: Web/HTTP/Basics_of_HTTP/Resource_URLs +tags: + - Guide + - HTTP + - Intermediate + - Resource +translation_of: Web/HTTP/Basics_of_HTTP/Resource_URLs +--- +<p>{{HTTPSidebar}}{{non-standard_header}}</p> + +<p><code>resource:</code> ãšããã¹ããŒã ã®ãã¬ãã£ãã¯ã¹ãä»ãããªãœãŒã¹ URL ã¯ãFirefox ãš Firefox ã®ãã©ãŠã¶æ¡åŒµæ©èœã«ãã£ãŠãªãœãŒã¹ãå
éšçã«èªã¿èŸŒãããã«äœ¿çšãããŸãããæ
å ±ã®äžéšã¯ãã©ãŠã¶ãæ¥ç¶ãããµã€ãã§ãå©çšã§ããŸãã</p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p>ãªãœãŒã¹URLã¯ãæ¥é èŸ (<code>resource:</code>) ãšããŒããããªãœãŒã¹ãæã URL ã®2ã€ã®éšåã§æ§æãããŸãã</p> + +<pre class="syntaxbox">resource://<url></pre> + +<p>äŸ</p> + +<pre>resource://gre/res/svg.css</pre> + +<p>ãªãœãŒã¹ URL ('->') ã«ç¢å°ãããå Žåã¯ãæåã®ãã¡ã€ã«ã次ã®ãã¡ã€ã«ã«ããŒããããããšãæå³ããŸãã</p> + +<pre>resource://<File-loader> -> <File-loaded></pre> + +<p>ããäžè¬çãªè©³çŽ°ã«ã€ããŠã¯ã<a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web">ãŠã§ãäžã®ãªãœãŒã¹ã®èå¥</a>ãåç
§ããŠãã ããã</p> + +<p>ãã®èšäºã§ã¯ãçµã¿èŸŒã¿ã®ãªãœãŒã¹ãæãããã« Firefox ãå
éšçã«äœ¿çšãããªãœãŒã¹ URI ã«çŠç¹ãåœãŠãŸãã</p> + +<h2 id="Threats" name="Threats">è
åš</h2> + +<p><code>resource:</code> URL ã«ãã£ãŠå
±æãããæ
å ±ã®äžéšã¯ãŠã§ããµã€ãã§å©çšã§ããããããŠã§ãããŒãžã¯å
éšã¹ã¯ãªãããå®è¡ããããã©ã«ãã®èšå®ãå«ã Firefox ã®å
éšãªãœãŒã¹ã調ã¹ãããšãã§ããŸãã</p> + +<p>ããšãã°ã<a href="https://www.browserleaks.com/firefox">Browserleaks ã®ã¹ã¯ãªãã</a>ã¯ããµã€ãã§å®è¡ãããŠããç°¡åãªã¹ã¯ãªããã§ã¯ãšãªãå®è¡ããããšãã« Firefox ã衚瀺ããå
容ã匷調衚瀺ããŸã (ã³ãŒã㯠<a href="https://browserleaks.com/firefox#more">https://browserleaks.com/firefox#more</a> ã«ãããŸã)ã</p> + +<p>ãã¡ã€ã« firefox.js ã¯ãããªãã¡ã¬ã³ã¹åãšå€ã pref() é¢æ°ã«æž¡ããŸãã äŸãã°ã</p> + +<pre><a href="http://searchfox.org/mozilla-central/rev/48ea452803907f2575d81021e8678634e8067fc2/browser/app/profile/firefox.js#575">http://searchfox.org/mozilla-central/rev/48ea452803907f2575d81021e8678634e8067fc2/browser/app/profile/firefox.js#575</a></pre> + +<p>ãŠã§ããµã€ãã§ã¯ãã® <code>pref()</code> é¢æ°ããªãŒããŒã©ã€ãããã¹ã¯ãªãã<code>resource:///defaults/preferences/firefox.js</code> ã䜿çšããŠã Firefox ã®ããã©ã«ãèšå®ãç°¡åã«åéã§ããŸãã</p> + +<p>ããã«ããã©ãããã©ãŒã ããã±ãŒã«ãªã©ã®ãã«ãæ§æã«ãã£ãŠã¯ããŠã§ããµã€ãããã®æ
å ±ã䜿çšããŠåã
ã®ãŠãŒã¶ãŒãèå¥ã§ãããšããæå³ã§ãããã€ãã®ããã©ã«ãèšå®å€ãç°ãªããŸãã</p> + +<h2 id="Solution" name="Solution">解決æ¹æ³</h2> + +<p>ãã®åé¡ã解決ããããã«ã Mozilla 㯠{{bug(863246)}} ã®ãªãœãŒã¹ãèªã¿èŸŒãåäœãå€æŽããŸããããã㯠<a href="/ja/docs/Mozilla/Firefox/Releases/57">Firefox 57 (Quantum)</a> ã§ç»å ŽããŸããã</p> + +<p>éå»ã«ã¯ããŠã§ãã³ã³ãã³ãã¯ã Firefox ã®å
éšãªãœãŒã¹ã ãã§ãªããæ¡åŒµæ©èœã®è³ç£ãå«ããURIãå¿
èŠãšãããããããªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããšãã§ããŸããã çŸåšããã®åäœã¯ããã©ã«ãã§ã¯çŠæ¢ãããŠããŸãã</p> + +<p>ããããç¹å®ã®ç¶æ³äžã§ Firefox ããŠã§ãã³ã³ãã³ãã«ãªãœãŒã¹ãèªã¿èŸŒãå¿
èŠããããŸãã ããšãã°ããã¥ãŒã»ãœãŒã¹ã»ããŒãž (ãã¥ãŒã»ãœãŒã¹ãŸãã¯ãã¥ãŒéžæãœãŒã¹) ãéããšã <code>resource:</code> URI ãä»ã㊠<code>viewsource.css</code> ãå¿
èŠã§ãããŠã§ãã³ã³ãã³ãã«å
¬éããå¿
èŠããããªãœãŒã¹ã¯ã <code>resource://content-accessible/</code>ãšããååã®æ°ããå Žæã«ç§»åãããŸãããããã¯éé¢ãããŠãããéèŠã§ã¯ãªããªãœãŒã¹ã®ã¿ãå«ãŸããŠããŸãã ãã®ããã«ããŠãéèŠãªãªãœãŒã¹ãå
¬éããã»ãšãã©ã®è
åšãæé€ã§ããŸãã</p> + +<div class="note"> +<p><strong>ã¡ã¢</strong>: ãŠã§ããšæ¡åŒµæ©èœã®éçºè
ããªãœãŒã¹ URL ããã䜿çšããããšããªãããšããå§ãããŸãã圌ãã®äœ¿ãæ¹ã¯ããŸããããŸããã§ããããããŠã»ãšãã©ã®äœ¿çšæ³ã¯ãã以äžåäœããŸããã</p> +</div> + +<h2 id="Specifications" name="Specifications">ä»æ§</h2> + +<p>resource: ã¯ã©ã®ä»æ§æžã«ãå®çŸ©ãããŠããŸããã</p> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p>resource: 㯠Firefox ã®ã¿å¯Ÿå¿</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web">ãŠã§ãäžã®ãªãœãŒã¹ã®èå¥</a></li> + <li><a href="/ja/docs/Learn/Common_questions/What_is_a_URL">URL ãšã¯äœã</a></li> + <li><a href="https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml">IANA list of URI schemes</a> (<code>resource:</code> is <a href="https://www.iana.org/assignments/uri-schemes/prov/resource">covered here</a>)</li> +</ul> diff --git a/files/ja/web/http/browser_detection_using_the_user_agent/index.html b/files/ja/web/http/browser_detection_using_the_user_agent/index.html new file mode 100644 index 0000000000..8277621dea --- /dev/null +++ b/files/ja/web/http/browser_detection_using_the_user_agent/index.html @@ -0,0 +1,380 @@ +--- +title: ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååãçšãããã©ãŠã¶ãŒã®å€å® +slug: Web/HTTP/Browser_detection_using_the_user_agent +tags: + - Compatibility + - HTTP + - Web Development +translation_of: Web/HTTP/Browser_detection_using_the_user_agent +--- +<div>{{HTTPSidebar}}</div> + +<p>ãã©ãŠã¶ãŒã«ãã£ãŠç°ãªããŠã§ãããŒãžãŸãã¯ãµãŒãã¹ãæäŸããã®ã¯ããµã€ãã¯è¯ãããšã§ã¯ãããŸããããŠã§ãã¯äœ¿çšããŠãããã©ãŠã¶ãŒãæ©åšã«é¢ä¿ãªãã誰ããã§ãã¢ã¯ã»ã¹ã§ãããã®ã§ãããŠã§ããµã€ããéçºããæ¹æ³ãšããŠãç¹å®ã®ãã©ãŠã¶ãŒã察象ã«ããã®ã§ã¯ãªããæ©èœãå©çšã§ãããã©ããã«åºã¥ããããã°ã¬ãã·ããšã³ãã³ã¹ã¡ã³ãã«ããæ¹æ³ããããŸãã</p> + +<p>ãããããã©ãŠã¶ãŒãæšæºã¯å®å
šã§ã¯ãªãããã©ãŠã¶ãŒã®å€å®ãå¿
èŠãšããå Žåãçšã«ãããŸãããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã䜿çšããŠãã©ãŠã¶ãŒãå€å®ããããšã¯ç°¡åã«èŠããŸãããããŸãè¡ãããã«ããã®ã¯ãå®ã¯ãšãŠãé£ããåé¡ã§ãããã®ææžã§ã¯ããããã§ããã ãæ£ããè¡ãæ¹æ³ãæ¡å
ããŸãã</p> + +<div class="note"> +<p>ç¹°ãè¿ããŸãããŠãŒã¶ãŒãšãŒãžã§ã³ãã調ã¹ãã®ãè¯ãããšã¯ãã£ãã«ãããŸãããåé¡ã解決ããã«ã¯ããã£ãšè¯ãããã£ãšåºãäºææ§ã®ããæ¹æ³ãèŠã€ããã¯ãã§ãã</p> +</div> + +<h2 id="Considerations_before_using_browser_detection" name="Considerations_before_using_browser_detection">ãã©ãŠã¶ãŒã®å€å®ãçšããåã«èããããš</h2> + +<p>ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã䜿çšããŠã䜿çšãããŠãããã©ãŠã¶ãŒãå€å®ããããšãæ€èšããŠããå Žåã¯ãã§ããã°ãŸãã¯åé¿ããããã«ããŠãã ããã<strong>ãªã</strong>ãããããããã®ããèŠåããããšããå§ããŸãããã</p> + +<dl> + <dt>ãã©ãŠã¶ãŒã®ããããŒãžã§ã³ã®ç¹æã®ãã°ãåé¿ããããšããŠããã®ã§ããïŒ</dt> + <dd>å°éã®ãã©ãŒã©ã ã§èŠããå°ãããããŠã¿ãŸãããããã®åé¡ã«æåã«ééããã®ãããªãã§ããããšã¯ã»ãšãã©ãããŸããããŸãå°é家ããããã¯åã«å¥ã®èŠç¹ãæã€äººã
ãããã°ãåé¿ããããã®ã¢ã€ãã£ã¢ãããããããããŸãããçããåé¡ã§ããå Žåã¯ããã®ãã°ããã°è¿œè·¡ã·ã¹ãã (<a class="link-https" href="https://bugzilla.mozilla.org">Mozilla</a>; <a class="external" href="https://bugs.webkit.org">WebKit</a>; <a href="https://www.chromium.org/issue-tracking">Blink</a>; <a class="link-https" href="https://bugs.opera.com/">Opera</a>) ãä»ããŠãã©ãŠã¶ãŒã®ãã³ããŒã«å ±åãããŠãããã©ããã確èªããããšãéèŠã§ãããã©ãŠã¶ãŒã¡ãŒã«ãŒã¯ãã°ã¬ããŒãã«æ³šæãæãããã®ãã°ã®ä»ã®åé¿çãåæãããããããŸããã</dd> + <dt>ç¹å®ã®æ©èœãååšãããã©ãã確èªããããšããŠããã®ã§ããïŒ</dt> + <dd>äžéšã®ãã©ãŠã¶ãŒããŸã 察å¿ããŠããªãç¹å®ã®ãŠã§ãæ©èœããµã€ãã§äœ¿çšããå¿
èŠãããå Žåãæªå¯Ÿå¿ã®ãã©ãŠã¶ãŒã®ãŠãŒã¶ãŒã«ã¯ãããæ©èœãå°ãªããã®ã®åäœããããšãåãã£ãŠããå€ããŠã§ããµã€ããéä¿¡ãããå ŽåããããŸããããã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®æ€åºã䜿çšããææªã®çç±ã§ãããªããªãããã®å·®ã¯æçµçã«ä»ã®ãã¹ãŠã®ãã©ãŠã¶ãŒãè¿œãã€ãããã§ããããã«ãããã»ã©äžè¬çã§ãªããã©ãŠã¶ãŒãïŒã€ïŒã€å
šãŠãã¹ãããã®ã¯çŸå®çã§ã¯ãããŸããããŠãŒã¶ãŒãšãŒãžã§ã³ãã«ããå€å®ã¯<strong>決ããŠ</strong>è¡ãã¹ãã§ã¯ãããŸããããã®ä»£ããã«<strong>åžžã«</strong>æ©èœã®æ€åºãè¡ã代æ¿æ段ããããŸãã</dd> +</dl> + +<dl> + <dt>䜿çšãããŠãããã©ãŠã¶ãŒã«ãã£ãŠç°ãªã HTML ãæäŸããäºå®ã§ããïŒ</dt> + <dd>éåžžã§ã¯æªãæ
£äŸã§ããããããå¿
èŠãªå ŽåããããŸãããã®ãããªå Žåã¯ããŸãèªåã®ç¶æ³ãåæããŠãããæ¬åœã«å¿
èŠã§ããããšã確èªããŠãã ããã圢åŒç㪠{{ HTMLElement("div") }} ãŸã㯠{{ HTMLElement("span") }} èŠçŽ ãè¿œå ããããšã§ããããé²ãããšãã§ããŸãããïŒãŠãŒã¶ãŒãšãŒãžã§ã³ãã®æ€åºãæ£ããè¡ãããšã¯ã HTML ã®çŽåºŠãããããæãªã£ãŠãæ§ããªããããé£ãããã®ã§ãããŸãããã¶ã€ã³ãèãçŽããŠãã ãããããã°ã¬ãã·ããšã³ãã³ã¹ã¡ã³ããæµäœã¬ã€ã¢ãŠãã䜿çšããããšã§ãåé¿ããããšã¯ã§ããŸãããïŒ</dd> +</dl> + +<h2 id="Avoiding_user_agent_detection" name="Avoiding_user_agent_detection">ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®å€å®ã®åé¿</h2> + +<p>ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®æ€åºã䜿çšããªãããã«ããã®ã§ããã°ãããã€ãã®éžæè¢ããããŸãã</p> + +<dl> + <dt>æ©èœã®æ€åº</dt> + <dd>æ©èœã®æ€åºãšã¯ãããŒãžã衚瀺ããŠãããã©ãŠã¶ãŒãç¹å®ããã®ã§ã¯ãªããå¿
èŠãªæ©èœãå©çšå¯èœã§ãããã©ããã確èªããããšã§ããå©çšã§ããªãå Žåã¯ä»£æ¿æ段ã䜿çšããŸãããã©ãŠã¶ãŒã«ãã£ãŠç°ãªãåäœãããå Žåã¯çšã§ããããŠãŒã¶ãŒãšãŒãžã§ã³ãæååããã§ãã¯ãã代ããã«ããã©ãŠã¶ãŒããã® API ãã©ãå®è£
ããŠãããæ€æ»ããåŠçãå®è£
ãããããã䜿ãæ¹ãå€æããŸããããæ©èœã®æ€åºã®ä»ã®ãšããè¯ãäŸã¯æ¬¡ã®éãã§ããæè¿ã Chrome ã¯<a href="https://www.chromestatus.com/feature/5668726032564224">æ£èŠè¡šçŸã«å®éšçãªåŸæ¹åç
§ã®å¯Ÿå¿ãè¿œå ããŸãã</a>ããä»ã®ãã©ãŠã¶ãŒã¯ä»ã®ãšãã察å¿ããŠããŸãããã§ããããééã£ãŠä»¥äžã®ããã«ããã¹ããšæããããããŸããã</dd> + <dd> + <pre class="brush: js notranslate">// this code snippet splits a string in a special notation + +if (navigator.userAgent.indexOf("Chrome") !== -1){ + // YES! The user is suspected to support look-behind regexps + // DO NOT USE /(?<=[A-Z])/. It will cause a syntax error in + // browsers that do not support look-behind expressions + // because all browsers parse the entire script, including + // sections of the code that are never executed. + var camelCaseExpression = new RegExp("(?<=[A-Z])"); + var splitUpString = function(str) { + return (""+str).split(camelCaseExpression); + }; +} else { + /*This fallback code is much less performant, but works*/ + var splitUpString = function(str){ + return str.replace(/[A-Z]/g,"z$1").split(/z(?=[A-Z])/g); + }; +} +console.log(splitUpString("fooBare")); // ["fooB", "are"] +console.log(splitUpString("jQWhy")); // ["jQ", "W", "hy"]</pre> + + <p>äžèšã®ã³ãŒãã§ã¯ãããã€ãã®ééã£ãä»®å®ãããã§ãããã</p> + + <ul> + <li>ããã¯ãéšåæåå "Chrome" ãå«ããã¹ãŠã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã Chrome ã§ãããšä»®å®ããã§ãããã UA æååã¯èª€è§£ãæãããšã§æåã§ãã</li> + <li>ãã©ãŠã¶ãŒã Chrome ã§ããã°ãã«ãã¯ãã€ã³ãæ©èœã¯åžžã«å©çšå¯èœã§ãããšä»®å®ããŠããŸãããšãŒãžã§ã³ãã¯å¯Ÿå¿ãè¿œå ãããåã®å€ãããŒãžã§ã³ã® Chrome ãããããªããã (åœæã¯å®éšçãªæ©èœã ã£ãã®ã§) ãããåé€ãããåŸã®ããŒãžã§ã³ã® Chrome ãããããŸããã</li> + <li>æãéèŠãªã®ã¯ãä»ã®ãã©ãŠã¶ãŒããã®æ©èœã«å¯Ÿå¿ããŠããªãããšãåæãšããŠããããšã§ããä»ã®ãã©ãŠã¶ãŒã§ã¯ãã€ã®éã«ã察å¿ãè¿œå ãããŠãããããããŸãããããã®ã³ãŒãã§ã¯å£ã£ãéãéžæãç¶ããŠããããšã«ãªããŸãã</li> + </ul> + + <p>ãã®ãããªåé¡ã¯ãæ©èœèªäœã®å¯Ÿå¿ããã¹ãããããšã§åé¿ããããšãã§ããŸãã</p> + + <pre class="brush: js notranslate">var isLookBehindSupported = false; + +try { + new RegExp("(?<=)"); + isLookBehindSupported = true; +} catch (err) { + // If the agent doesn't support lookbehinds, the attempted + // creation of a RegExp object using that syntax throws and + // isLookBehindSupported remains false. +} + +var splitUpString = isLookBehindSupported ? function(str) { + return (""+str).split(new RegExp("(?<=[A-Z])")); +} : function(str) { + return str.replace(/[A-Z]/g,"z$1").split(/z(?=[A-Z])/g); +}; +</pre> + + <p>äžèšã®ã³ãŒãã瀺ãããã«ããã©ãŠã¶ãŒã®äºææ§ããŠãŒã¶ãŒãšãŒãžã§ã³ãã®å€å®ãªãã«è¡ãæ¹æ³ã¯<strong>åžžã«</strong>ãããŸãããã®ããã«ãŠãŒã¶ãŒã®æååããã§ãã¯ããçç±ã¯<strong>決ããŠãããŸãã</strong>ã</p> + + <p>æåŸã«ãäžèšã®ã³ãŒãã¹ããããã¯ãåžžã«èæ
®ããªããã°ãªããªãã¯ãã¹ãã©ãŠã¶ãŒã®ã³ãŒãã£ã³ã°ã§é倧ãªåé¡ãåŒãèµ·ãããŸãããµããŒã察象å€ã®ãã©ãŠã¶ãŒã§ãã¹ãããŠãã API ãæå³ãã䜿çšããªãã§ãã ãããããã¯æããã§ã·ã³ãã«ã«èããããããããŸããããããã§ãªãæããããŸããããšãã°ãäžèšã®ã³ãŒãã¹ããããã§ã¯ãçã regexp è¡šèš (ããšãã° /reg/igm) 㧠lookbehind ã䜿çšãããšããµããŒããããŠããªããã©ãŠã¶ãŒã§ parser ãšã©ãŒãçºçããŸãããããã£ãŠãããªãã®ã³ãŒãã® lookbehind ããµããŒããããŠããã»ã¯ã·ã§ã³ã§ãã£ãŠããäžèšã®äŸã§ã¯ <em>new RegExp("(?<=look_behind_stuff)");</em> ã <em>/(?<=look_behind_stuff)/</em> ã®ä»£ããã«äœ¿çšããŸãã</p> + </dd> + <dt>ããã°ã¬ãã·ããšã³ãã³ã¹ã¡ã³ã</dt> + <dd>ãã®èšèšææ³ã¯ããŠã§ããµã€ãããéå±€ãã§éçºããããã ã¢ããã®ã¢ãããŒãã䜿çšããŠãããç°¡åãªéå±€ããå§ããéå±€ãäžããã«åŸã£ãŠããå€ãã®æ©èœã䜿çšããŠããµã€ãã®æ©èœãåäžãããæ¹æ³ã§ãã</dd> + <dt>ã°ã¬ã€ã¹ãã«ãã°ã©ããŒã·ã§ã³</dt> + <dd>ããã¯ãããããŠã³ã®ã¢ãããŒãã§ãå¿
èŠãªãã¹ãŠã®æ©èœã䜿çšããŠæé©ãªãµã€ããæ§ç¯ãããããå€ããã©ãŠã¶ãŒã§ã䜿çšã§ããããã«èª¿æŽããæ¹æ³ã§ããããã¯ãããã°ã¬ãã·ããšã³ãã³ã¹ã¡ã³ããããé£ãããæå¹æ§ãäœããªããŸãããå Žåã«ãã£ãŠã¯æçšã§ããããšããããŸãã</dd> + <dt id="Mobile_Device_Detection">ã¢ãã€ã«ç«¯æ«ã®æ€åº</dt> + <dd>ããããããŠãŒã¶ãŒãšãŒãžã§ã³ãã®å€å®ã§æãäžè¬çãã€èª€ã£ã䜿çšæ³ã¯ããã®ç«¯æ«ãã¢ãã€ã«ç«¯æ«ã§ãããã©ãããæ€åºããããšã§ãããããããããåŸã§æ¬åœã«ã©ããªããã¯èŠéããããã¡ã§ããéçºè
ã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®å€å®ã䜿çšããŠããŠãŒã¶ãŒã®ç«¯æ«ãã¿ããæäœã§ããããšãå°ããç»é¢ã§ããããšãå€å¥ããããã«å¿ããŠãŠã§ããµã€ããæé©åããããšããããŸãããŠãŒã¶ãŒãšãŒãžã§ã³ãã®å€å®ã§ããããæ€åºã§ããããšããããŸããããã¹ãŠã®ç«¯æ«ãåãã§ã¯ãããŸãããã¢ãã€ã«ç«¯æ«ã倧ããªãµã€ãºã®ç»é¢ãæã£ãŠããå Žåããããããã¹ã¯ããããå°ããªã¿ããç»é¢ãæã£ãŠããå ŽåããããããŸã£ããç°ãªãçæã§ããã¹ããŒããã¬ãã§èŠãŠããå Žåãããããã¿ãã¬ããã®åããå転ãããŠç»é¢ã®å¹
ãé«ããåçã«å€åãããŠãã人ãããŸãããã£ãŠããŠãŒã¶ãŒãšãŒãžã§ã³ãã®æ€åºã¯æ±ºå®çãªæ¹æ³ã§ã¯ãããŸããã幞ããã¯ããã«è¯ã代æ¿æ¹æ³ããããŸãããŠãŒã¶ãŒã®ç«¯æ«ã«ã¿ããç»é¢ããããã©ãããæ€åºããã«ã¯ã <a href="/ja/docs/Web/API/Navigator/maxTouchPoints">Navigator.maxTouchPoints</a> ã䜿çšããŸãããããããŠã <em>if (!("maxTouchPoints" in navigator)) { /*Code here*/}</em> ã®å Žåã®ã¿ããŠãŒã¶ãŒãšãŒãžã§ã³ãã®ç»é¢ããã§ãã¯ããæ¢å®ã«æ»ããŸãããã®æ
å ±ã䜿çšããŠç«¯æ«ã«ã¿ããç»é¢ããããã©ããã確èªããããšãã§ããŸãããã¿ãã端æ«ã§ããã ãã®ããã«ãŠã§ããµã€ãã®ã¬ã€ã¢ãŠãå
šäœãå€æŽããªãããã«ããŠãã ãããããã¯èªåã®äœæ¥ãšã¡ã³ããã³ã¹ã®éãå¢ããã ãã§ããããããããã¿ããã«é©ãããã倧ãããããã¯ãªãã¯ãããããã¿ã³ãè¿œå ããŸããã (CSS ã䜿çšããŠãã©ã³ããµã€ãºãäžããã ãã§ã)ãã¢ãã€ã«ç«¯æ«ã§ #exampleButton ã®ããã£ã³ã°ã 1em ã«æ¡åŒµããã³ãŒãã®äŸã瀺ããŸãã</dd> + <dd> + <pre class="brush: js notranslate">var hasTouchScreen = false; +if ("maxTouchPoints" in navigator) { + hasTouchScreen = navigator.maxTouchPoints > 0; +} else if ("msMaxTouchPoints" in navigator) { + hasTouchScreen = navigator.msMaxTouchPoints > 0; +} else { + var mQ = window.matchMedia && matchMedia("(pointer:coarse)"); + if (mQ && mQ.media === "(pointer:coarse)") { + hasTouchScreen = !!mQ.matches; + } else if ('orientation' in window) { + hasTouchScreen = true; // deprecated, but good fallback + } else { + // Only as a last resort, fall back to user agent sniffing + var UA = navigator.userAgent; + hasTouchScreen = ( + /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(UA) || + /\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA) + ); + } +} +if (hasTouchScreen) + document.getElementById("exampleButton").style.padding="1em";</pre> + </dd> + <dd>ç»é¢ã®ãµã€ãºã«ã€ããŠã¯ã <em>window.innerWidth</em> ãš window.addEventListener("resize", function(){ /*refresh screen size dependent things*/ }) ã䜿çšããã ãã§ããç»é¢ãµã€ãºã®å¯ŸçãšããŠããããããšã¯ãå°ããªç»é¢ã®æã«æ
å ±ãåããªãããšã§ãããã¹ã¯ãããããŒãžã§ã³ã䜿çšããããã«ãªãã®ã§ã人ã
ãæ©ãŸãã ãã§ããããããå°ããç»é¢ã§é·ãããŒãžã§ã¯æ
å ±ã®åæ°ãå°ãªãããç»é¢ãµã€ãºã倧ããã»ã©çãããŒãžã§å€ãã®åãæã€ããã«ããŠãã ããããã®å¹æã¯ã CSS <a href="/ja/docs/Learn/CSS/CSS_layout/Flexbox">ãã¬ãã¯ã¹ããã¯ã¹</a>ã䜿çšããæã«ã¯éšåçãªä»£æ¿æ段ãšããŠ<a href="/en-US/docs/Learn/CSS/CSS_layout/Floats">æµ®åã¬ã€ã¢ãŠã</a>ãçšããããšã§ç°¡åã«éæã§ããŸãã</dd> + <dd>ãŸããé¢é£æ§ãéèŠæ§ã®äœãæ
å ±ãäžã«ç§»åãããããŒãžã®ã³ã³ãã³ããææ矩ã«ãŸãšããŠã¿ãŠãã ããããããã¯å€ã§ã¯ãããŸããã以äžã®è©³çŽ°ãªäŸãèŠãã°ããŠãŒã¶ãŒãšãŒãžã§ã³ãã®ã¹ãããã£ã³ã°ãé¿ããããã®æŽå¯åãã¢ã€ãã¢ãåŸããããããããŸãããè€æ°ã®æ
å ±ã®ããã¯ã¹ã§æ§æãããããŒãžãæ³åããŠã¿ãŸããããããããã®ããã¯ã¹ã¯æ§ã
ãªç«ãç¬ã®åçš®ã«ã€ããŠã®ãã®ã§ãããšããŸããåããã¯ã¹ã«ã¯ãç»åãæŠèŠãçµç·¯ããããšããŸããç»åã¯ã倧ç»é¢ã§ãé©åãªæ倧ã®å€§ãããç¶æããããšããŸããæå³ã®ããã°ã«ãŒãåããããããã«ããã¹ãŠã®ç«ã®ããã¯ã¹ãšãã¹ãŠã®ç¬ã®ããã¯ã¹ãåé¢ããç«ãšç¬ã®ç®±ãæ··åšããªãããã«ããŠããŸãã倧ããªç»é¢ã§ã¯ã段çµã¿ãããŠç»åã®å·Šå³ã®ç¡é§ãªç©ºéãçž®å°ããããšã§ã空éãç¯çŽããŸãããã®ããã¯ã¹ã¯2ã€ã®ç䟡ãªæ¹æ³ã«ããã段çµã¿ã«åå²ããããšãã§ããŸããããã§ãç¬ã®ããã¯ã¹ã¯ãã¹ãŠãœãŒã¹ã³ãŒãã®äžã®æ¹ã«ãããç«ã®ããã¯ã¹ã¯ãã¹ãŠãœãŒã¹ã³ãŒãã®äžã®æ¹ã«ããããããã®ç®±ã®èŠªèŠçŽ ã¯ãã¹ãŠå
±éã§ãããšä»®å®ããŸãããã¡ãããç«ããã¯ã¹ã®ããäžã«ç¬ããã¯ã¹ã®åäžã®ã€ã³ã¹ã¿ã³ã¹ããããŸããæåã®æ¹æ³ã§ã¯ãæ°Žå¹³æ¹åã®<a href="/ja/docs/Learn/CSS/CSS_layout/Flexbox">ãã¬ãã¯ã¹ããã¯ã¹</a>ã䜿çšããŠã³ã³ãã³ããã°ã«ãŒãåããããŒãžããšã³ããŠãŒã¶ãŒã«è¡šç€ºããããšãã«ããã¹ãŠã®ç¬ã®ããã¯ã¹ãããŒãžã®äžéšã«é
眮ãããã¹ãŠã®ç«ã®ããã¯ã¹ãããŒãžã®äžéšã«é
眮ããããã«ããŸãã2ã€ç®ã®æ¹æ³ã¯<a href="/ja/docs/Web/CSS/Layout_cookbook/Column_layouts">段çµã¿</a>ã¬ã€ã¢ãŠãã䜿çšãããã¹ãŠã®ç¬ãå·Šã«ããã¹ãŠã®ç«ãå³ã«é
眮ããŸãããã®ç¹å®ã®ã·ããªãªã§ã®ã¿ããã¬ãã¯ã¹ããã¯ã¹/段çµã¿ã®ãã©ãŒã«ããã¯ãæäŸããªãããšãé©åã§ããããã®çµæãå€ããã©ãŠã¶ãŒäžã§ã¯éåžžã«å¹
ã®åºãããã¯ã¹ã®åäžã®åã«ãªããŸãããŸãã以äžã®ããšãèæ
®ããŠãã ãããããå€ãã®äººããŠã§ãããŒãžã«ç«ãèŠã«æ¥ãã®ã§ããã°ããœãŒã¹ã³ãŒãäžã§ç¬ãããç«ããã¹ãŠå
ã«æžããšãã³ã³ãã³ãã1段ã«ãªããããªå°ããªç»é¢ã§ããããå€ãã®äººãæ¢ããŠãããã®ãããæ©ãèŠã€ããããšãã§ããããã«ãªãã®ã§ãè¯ãèããããããŸããã</dd> + <dd>次ã«ãã³ãŒããåžžã«åçã«ããŸãããããŠãŒã¶ãŒã¯æºåž¯ç«¯æ«ã®åããå転ãããŠãããŒãžã®å¹
ãšé«ããå€æŽããããšããããŸãããŸãã¯ãå°æ¥ã¯åºãããšç»é¢ãæ¡åŒµã§ãããããªãæãç³ã¿åŒé»è©±ã®ãããªå¥åŠãªç«¯æ«ãçŸãããããããŸãããæãç³ã¿åŒé»è©±ã®ãããªç«¯æ«ãã©ã®ããã«æ±ãããšããããšã«é ãæ©ãŸããªãã§ãã ãããéçºè
ããŒã«ã®ãµã€ãããã«ãéããŠç»é¢ã®ãµã€ãºãå€æŽããŠã¿ãŠããŠã§ãããŒãžãæ»ããã«ãæµåçã«ãåçã«ãµã€ãºå€æŽãããããã«ãªããŸã§æºè¶³ããªãããã«ããŠãã ããããããè¡ãæãåçŽãªæ¹æ³ã¯ãç»é¢ã®å€§ããã«åºã¥ããŠã³ã³ãã³ãã移åããããã¹ãŠã®ã³ãŒãããããŒãžãèªã¿èŸŒãŸãããšããšããã®åŸã® <a href="/ja/docs/Web/API/Window/resize_event">resize</a> ã€ãã³ãã®ãã³ã«åŒã³åºãããåäžã®é¢æ°ã«åé¢ããããšã§ããããããã®ã¬ã€ã¢ãŠãé¢æ°ãããŒãžã®æ°ããã¬ã€ã¢ãŠãã決å®ããåã«å€ãã®èšç®ãããå Žåã¯ãã€ãã³ããªã¹ããŒãåŒã³åºãããªãããã«ã€ãã³ããªã¹ããŒããããŠã³ã¹ããããšãæ€èšããŠãã ããããŸããã¡ãã£ã¢ã¯ãšãªã® <code>(max-width: 25em)</code>, <code>not all and (min-width: 25em)</code>, <code>(max-width: 24.99em)</code> ã®éã«ã¯å€§ããªéããããããšã«ã泚æããŠãã ããã <code>(max-width: 25em)</code> 㯠<code>(max-width: 25em)</code> ãé€å€ãã <code>not all and (min-width: 25em)</code> 㯠<code>(max-width: 25em)</code> ãå«ã¿ãŸãã <code>(max-width: 24.99em)</code> ã¯ãåã« <code>not all and (min-width: 25em)</code> ã®åããªäººã®ããŒãžã§ã³ã§ãã <code>(max-width: 24.99em)</code> ã䜿çšããªãã§ãã ãããé©åãªã¡ãã£ã¢ã¯ãšãªãéžæãã察å¿ãã JavaScript ã®äžã§é©å㪠>=, <=, >, < ãéžæãããšãããããæ··ãã£ãŠããŸãããããçµæãšããŠãã¬ã€ã¢ãŠããå€æŽãããç»é¢ãµã€ãºã§ãŠã§ããµã€ããèŠãŠããŸãããšã«ãªãããã§ãããã®ãããã¬ã€ã¢ãŠãå€æŽãé©åã«è¡ãããŠãããã©ããã確èªããããã«ãã¬ã€ã¢ãŠãå€æŽãè¡ãããŠããæ£ç¢ºãªå¹
/é«ãã§ãŠã§ããµã€ãã培åºçã«ãã¹ãããŠãã ããã</dd> +</dl> + +<h2 id="Making_the_best_of_user_agent_sniffing" name="Making_the_best_of_user_agent_sniffing">æé©ãªãŠãŒã¶ãŒãšãŒãžã§ã³ãã®å€å®</h2> + +<p>ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®å€å®ã®ãããã代æ¿æ¡ããã¹ãŠæ€èšããããã§ããŠãŒã¶ãŒãšãŒãžã§ã³ãã®å€å®ãé©åã§æ£åœåãããå¯èœæ§ã®ããå ŽåããŸã ããã€ããããŸãã</p> + +<p>ãã®ãããªå Žåã®ã²ãšã€ã«ã端æ«ã«ã¿ããããã«ããããã©ãããæ€åºããéã«ããŠãŒã¶ãŒãšãŒãžã§ã³ãã®å€å®ããã©ãŒã«ããã¯ãšããŠäœ¿çšãããšãããã®ããããŸãã詳现㯠<a href="#Mobile_Device_Detection">ã¢ãã€ã«ç«¯æ«ã®æ€åº</a>ã®ç¯ãåç
§ããŠãã ããã</p> + +<p>ããäžã€ã®äŸãšããŠãèªåæŽæ°ãããªããã©ãŠã¶ãŒã®ãã°ãä¿®æ£ããå ŽåããããŸãã Internet Explorer (Windows) ãš Webkit (iOS) ããã®å¥œäŸã§ããããŒãžã§ã³ 9 以åã®Internet Explorer ã¯ãã¬ã³ããªã³ã°ã®ãã°ã CSS ã®ãã°ã API ã®ãã°ãªã©ãä¿¡ããããªãã»ã©ã®åé¡ãæ±ããŠããŸãããããããããŒãžã§ã³ 9 以åã® Internet Explorer ã¯ç¹å¥ãªå°ã㪠<s>wasp</s> äŸå€ã ã£ããããå©çšå¯èœãªãã©ãŠã¶ãŒåºæã®æ©èœã«åºã¥ããŠãã©ãŠã¶ãŒãæ€åºããã®ã¯éåžžã«ç°¡åã§ããã Webkit ã¯ã Apple ã iOS äžã®ãã¹ãŠã®ãã©ãŠã¶ãŒã«å
éšçã« Webkit ã䜿çšããããã«åŒ·å¶ããŠããããããŠãŒã¶ãŒã¯å€ã端æ«äžã§ããè¯ããããæŽæ°ããããã©ãŠã¶ãŒãååŸããæ¹æ³ããããŸãããã»ãšãã©ã®ãã°ã¯æ€åºã§ããŸããããã°ã«ãã£ãŠã¯ä»ãããæ€åºã«æéããããå ŽåããããŸãããã®ãããªå Žåã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ãæ€åºã䜿çšããŠããã©ãŒãã³ã¹ãç¯çŽããã®ãæå¹ã§ããããšãã°ã Webkit 6 ã«ã¯ããã€ã¹ã®åããå€ãããšããã©ãŠã¶ãŒã {{domxref("MediaQueryList")}} ãªã¹ããŒãå®è¡ããªãå Žåããããšãããã°ããããŸãããã®ãã°ãåé¿ããã«ã¯ã以äžã®ã³ãŒããåç
§ããŠãã ããã</p> + +<pre class="brush: js notranslate">var UA=navigator.userAgent, isWebkit=/\b(iPad|iPhone|iPod)\b/.test(UA) && + /WebKit/.test(UA) && !/Edge/.test(UA) && !window.MSStream; + +var mediaQueryUpdated = true, mqL = []; +function whenMediaChanges(){mediaQueryUpdated = true} + +var listenToMediaQuery = isWebkit ? function(mQ, f) { + if(/height|width/.test(mQ.media)) mqL.push([mQ, f]); + mQ.addListener(f), mQ.addListener(whenMediaChanges); +} : function(){}; +var destroyMediaQuery = isWebkit ? function(mQ) { + for (var i=0,len=mqL.length|0; i<len; i=i+1|0) + if (mqL[i][0] === mQ) mqL.splice(i, 1); + mQ.removeListener(whenMediaChanges); +} : listenToMediaQuery; + +var orientationChanged = false; +addEventListener("orientationchange", function(){ + orientationChanged = true; +}, PASSIVE_LISTENER_OPTION); + +addEventListener("resize", setTimeout.bind(0,function(){ + if (orientationChanged && !mediaQueryUpdated) + for (var i=0,len=mqL.length|0; i<len; i=i+1|0) + mqL[i][1]( mqL[i][0] ); + mediaQueryUpdated = orientationChanged = false; +},0));</pre> + +<h2 id="Which_part_of_the_user_agent_contains_the_information_you_are_looking_for" name="Which_part_of_the_user_agent_contains_the_information_you_are_looking_for">æ¢ããŠããæ
å ±ããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã®ã©ã®éšåã«å«ãŸããŠããã</h2> + +<p>ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã®ããããã®éšåã«ã¯çµ±äžæ§ããªãã®ã§ãããã¯é£ããéšåã§ãã</p> + +<h3 id="Browser_Name" name="Browser_Name">ãã©ãŠã¶ãŒå</h3> + +<p>éçºè
ãããã©ãŠã¶ãŒãå€å®ãããããšããå Žåãå®éã¯ãã¬ã³ããªã³ã°ãšã³ãžã³ãå€å®ããããå Žåã§ããããšããã°ãã°ãããŸããå®éã« SeaMonkey ãš Firefox ãããŸã㯠Chromium ãš Chrome ãåºå¥ãããã®ã§ããããããããšããå®éã«ã¯ãã©ãŠã¶ãŒãã¬ã³ããªã³ã°ãšã³ãžã³ã« Gecko ã䜿çšããŠãããã WebKit ã䜿çšããŠãããã確èªãããã ãã§ããããããããå¿
èŠãªã®ã§ããã°ãããŒãžã®ãã£ãšäžãèŠãŠãã ããã</p> + +<p>ã»ãšãã©ã®ãã©ãŠã¶ãŒã¯ã Internet Explorer ã®äŸå€ãé€ããŠãååãšããŒãžã§ã³ã <em>BrowserName/VersionNumber</em> ã®åœ¢åŒã§èšå®ããŸãããããããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã¯ãã®ãããªåœ¢åŒã®ååã ãããæã£ãŠããèš³ã§ã¯ãªãã®ã§ããã©ãŠã¶ãŒã®ååãåããããã§ã¯ãªããæ¢ããŠããååããããã©ããã確èªããããšããã§ããŸããããããããã©ãŠã¶ãŒã«ãã£ãŠã¯ãããã€ãããšããããŸããäŸãã° Chrome ã¯ã Chrome ãš Safari ã®äž¡æ¹ã®æååãå«ã¿ãŸããã§ããã Safari ãå€å®ããã«ã¯ã Safari ã®æååããã£ãŠ Chrome ã®æååããªãããšã確èªããå¿
èŠããããŸããã Chromium ã¯èªåèªèº«ã Chrome ãšå ±åããããšãããããã Seamonkey ã¯èªåèªèº«ã Firefox ãšããŠå ±åããããšãæã
ãããŸãã</p> + +<p>ãŸãã BrowserName ã«åçŽãªæ£èŠè¡šçŸã䜿çšããªãããã«æ³šæããŠãã ããããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã«ã¯ã Keyword/Value æ§æ以å€ã®æååãå«ãŸããŠããŸããäŸãã°ã Safari ã Chrome ã§ã¯ã 'like Gecko' ã®ãããªæååãå«ãŸããŠããŸãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col"></th> + <th scope="col">å¿
ãå«ã</th> + <th scope="col">決ããŠå«ãŸãªã</th> + <th scope="col"></th> + </tr> + </thead> + <tbody> + <tr> + <td>Firefox</td> + <td>Firefox/xyz</td> + <td>Seamonkey/xyz</td> + <td></td> + </tr> + <tr> + <td>Seamonkey</td> + <td>Seamonkey/xyz</td> + <td></td> + <td></td> + </tr> + <tr> + <td>Chrome</td> + <td>Chrome/xyz</td> + <td>Chromium/xyz</td> + <td></td> + </tr> + <tr> + <td>Chromium</td> + <td>Chromium/xyz</td> + <td></td> + <td></td> + </tr> + <tr> + <td>Safari</td> + <td>Safari/xyz</td> + <td>Chrome/xyz ãŸã㯠Chromium/xyz</td> + <td>Safari ã¯ããŒãžã§ã³çªå·ã2ã€æäŸããŠãããäžæ¹ã¯æè¡ç㪠Safari/xyz ã®ããŒã¯ã³ãããäžæ¹ã¯ãŠãŒã¶ãŒã«åããããã Version/xyz ã®ããŒã¯ã³ã§ã</td> + </tr> + <tr> + <td>Opera</td> + <td> + <p>OPR/xyz <sup>[1]</sup></p> + + <p>Opera/xyz</p> + </td> + <td></td> + <td> + <p><sup>[1]</sup> Opera 15+ (Blink-based engine)</p> + + <p><sup>[2]</sup> Opera 12- (Presto-based engine)</p> + </td> + </tr> + <tr> + <td>Internet Explorer</td> + <td> + <p>; MSIE xyz; <sup>[1]</sup></p> + + <p>Trident/7.0; .*rv:xyz <sup>[2]</sup></p> + </td> + <td></td> + <td> + <p><sup>[1]</sup> Internet Explorer 10-</p> + + <p><sup>[2]</sup> Internet Explorer 11</p> + </td> + </tr> + </tbody> +</table> + +<p>ãã¡ãããä»ã®ãã©ãŠã¶ãŒããããã®äžéšããã€ãžã£ãã¯ããªããšãã絶察çãªä¿èšŒã¯ãããŸãã (éå»ã« Chrome ã Safari ã®æååããã€ãžã£ãã¯ããããã«)ããã®ããããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã䜿çšãããã©ãŠã¶ãŒã®å€å®ã¯ä¿¡é Œæ§ãäœãã®ã§ãããŒãžã§ã³çªå·ããã§ãã¯ããã®ã¿ã«ããŠãã ãã (éå»ã®ããŒãžã§ã³ããã€ãžã£ãã¯ããããšã¯ããŸããããŸãã)ã</p> + +<h3 id="Browser_version" name="Browser_version">ãã©ãŠã¶ãŒã®ããŒãžã§ã³</h3> + +<p>ãã©ãŠã¶ãŒã®ããŒãžã§ã³ã¯ãäŸå€ã¯ãããã®ã®ãå€ãããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã® <em>BrowserName/VersionNumber</em> ããŒã¯ã³ã®å€ã®éšåã«å
¥ããããŸãããã¡ãããã㯠Internet Explorer ã®å Žåã¯åœãŠã¯ãŸãã (MSIE ããŒã¯ã³ã®çŽåŸã«ããŒãžã§ã³çªå·ãå
¥ãã)ã Opera ã®ããŒãžã§ã³10以éã§ã¯ã Version/<em>VersionNumber</em> ããŒã¯ã³ãè¿œå ãããŠããŸãã</p> + +<p>ããã§å床ãæ¢ããŠãããã©ãŠã¶ãŒã®æ£ããããŒã¯ã³ãååŸããŠããããšã確èªããŠãã ãããä»ã«ã¯åŠ¥åœãªçªå·ãå«ãŸããŠãããšããä¿èšŒã¯ãããŸããã</p> + +<h3 id="Rendering_engine" name="Rendering_engine">ã¬ã³ããªã³ã°ãšã³ãžã³</h3> + +<p>åè¿°ã®ããã«ãå€ãã®å Žåã¯ã¬ã³ããªã³ã°ãšã³ãžã³ãæ¢ããæ¹ãè¯ãæ¹æ³ã«ãªããŸããããã¯ãããŸãç¥ãããŠããªããã©ãŠã¶ãŒãé€å€ããªãããã«ã圹ç«ã€ã§ããããå
±éã®ã¬ã³ããªã³ã°ãšã³ãžã³ãæã€ãã©ãŠã¶ãŒã¯ããŒãžãåãæ¹æ³ã§è¡šç€ºããŸããäžæ¹ã§åäœãããã®ã¯ããäžæ¹ã§ãåäœãããšããããšãæ³å®ããããšãã§ããŸãã</p> + +<p>äž»ãªã¬ã³ããªã³ã°ãšã³ãžã³ã«ã¯ã Trident, Gecko, Presto, Blink, WebKit ã®5ã€ããããŸããã¬ã³ããªã³ã°ãšã³ãžã³ã®ååãæ¢ãã®ãäžè¬çã§ãããããããããã®ã¬ã³ããªã³ã°ãšã³ãžã³ãä»ã®é£ããªã³ã°ãšã³ãžã³ã®ååãè¿œå ããŠæ€åºãããããã«ããŠããŸãããããã£ãŠãã¬ã³ããªã³ã°ãšã³ãžã³ãå€å®ããéã«ã¯èª€å€å®ãããªãããã«æ³šæãæãããšãéèŠã§ãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col"></th> + <th scope="col">å¿
ãå«ã</th> + <th scope="col"></th> + </tr> + </thead> + <tbody> + <tr> + <td>Gecko</td> + <td>Gecko/xyz</td> + <td></td> + </tr> + <tr> + <td>WebKit</td> + <td>AppleWebKit/xyz</td> + <td>泚æ: WebKit ãã©ãŠã¶ãŒã¯ 'like Gecko' ã®æååãè¿œå ããã®ã§ãå€å®æã«æ³šæããªããš Gecko ãšèª€èªããããšããããŸãã</td> + </tr> + <tr> + <td>Presto</td> + <td>Opera/xyz</td> + <td><strong>Note:</strong> Presto is no longer used in Opera browser builds >= version 15 (see 'Blink')</td> + </tr> + <tr> + <td>Trident</td> + <td>Trident/xyz</td> + <td>Internet Explorer put this token in the <em>comment</em> part of the User Agent String</td> + </tr> + <tr> + <td>EdgeHTML</td> + <td>Edge/xyz</td> + <td>The non-Chromium Edge puts its engine version after the <em>Edge/</em> token, not the application version.<br> + <strong>Note:</strong> EdgeHTML is no longer used in Edge browser builds >= version 79 (see 'Blink').</td> + </tr> + <tr> + <td>Blink</td> + <td>Chrome/xyz</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="Rendering_engine_version" name="Rendering_engine_version">ã¬ã³ããªã³ã°ãšã³ãžã³ã®ããŒãžã§ã³</h2> + +<p>ã»ãšãã©ã®ã¬ã³ããªã³ã°ãšã³ãžã³ã¯ã Gecko ãé€ã㊠<em>RenderingEngine/VersionNumber</em> ã®ããŒã¯ã³ã«ããŒãžã§ã³çªå·ãå
¥ããŠããŸãã Gecko ã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã®ã³ã¡ã³ãéšåã®äžã§ã <code>rv:</code> æååã®åŸã«ããŒãžã§ã³çªå·ãå
¥ããŸããã¢ãã€ã«çã® Gecko 14 ãšãã¹ã¯ãããçã® Gecko 17 ããããã®å€ã <code>Gecko/version</code> ã®ããŒã¯ã³ (以åã®ããŒãžã§ã³ã§ã¯ãã«ãæ¥ä»ããã®åŸã¯ GeckoTrail ãšåŒã°ããåºå®æ¥ä») ã«çœ®ããŸãã</p> + +<h2 id="OS">OS</h2> + +<p>ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã¯ãå€ãã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã§æäŸãããŸãã (ãã ã Firefox OS ã®ãããªãŠã§ãçšã®ãã©ãããã©ãŒã ã§ã¯æäŸãããŸãã)ãæžåŒã¯å€§å¹
ã«ç°ãªããŸããããã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã®ã³ã¡ã³ãéšåã«ãã2ã€ã®ã»ãã³ãã³éã®åºå®æååã§ãããããã®æååã¯ãã©ãŠã¶ãŒã«äŸåããŸãããã㯠OS ã瀺ããŸããããã°ãã°ããŒãžã§ã³ãäŸåããããŒããŠã§ã¢ (32/64ããããã Mac ã®å Žåã® Intel / PPC) ã瀺ããŸãã</p> + +<p>ãã¹ãŠã®å Žåãšåæ§ã«ããããã®æååã¯å°æ¥å€æŽãããå¯èœæ§ããããæ¢ã«ãªãªãŒã¹ãããŠãããã©ãŠã¶ãŒã®å€å®ãšçµã¿åãããŠäœ¿çšããå¿
èŠããããŸããæ°ããããŒãžã§ã³ã®ãã©ãŠã¶ãŒãåºçŸãããšãã¯ãã¹ã¯ãªãããé©åãããããã®æè¡èª¿æ»ãå¿
èŠã§ãã</p> + +<h3 id="Mobile_Tablet_or_Desktop" name="Mobile_Tablet_or_Desktop">ã¢ãã€ã«ããã¿ãã¬ãããããã¹ã¯ãããã</h3> + +<p>ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®å€å¥ãè¡ãæãäžè¬çãªçç±ã¯ããã©ãŠã¶ãŒãå®è¡ãããŠãã端æ«ã®çš®é¡ãå€å¥ããããšã§ããç®çã¯ãããããã®çš®é¡ã®ç«¯æ«ã«å¥ã
㪠HTML ãæäŸããããšã§ãã</p> + +<ul> + <li>ãã©ãŠã¶ãŒãã¬ã³ããªã³ã°ãšã³ãžã³ã¯ã1çš®é¡ã®ç«¯æ«ã§ããåäœããªããšæ³å®ããªãã§ãã ããããã©ãŠã¶ãŒãã¬ã³ããªã³ã°ãšã³ãžã³ããšã«ãç°ãªãæ¢å®å€ãèšå®ããªãã§ãã ããã</li> + <li>ãã©ãŠã¶ãŒãã¢ãã€ã«ãã¿ãã¬ããããã¹ã¯ãããã®ãããã§ããããå®çŸ©ããããã«ã OS ããŒã¯ã³ã䜿çšããªãã§ãã ããã OS ã¯è€æ°ã®çš®é¡ã®ç«¯æ« (Android ã¯ã¿ãã¬ãããæºåž¯é»è©±ãªã©) ã§åäœããŸãã</li> +</ul> + +<p>次ã®è¡šã¯äž»èŠãªãã©ãŠã¶ãŒã®ãã³ããŒãããã©ãŠã¶ãŒãã¢ãã€ã«ç«¯æ«äžã§åäœããŠããããšã瀺ãæ¹æ³ããŸãšãããã®ã§ãã</p> + +<table> + <caption>åãã©ãŠã¶ãŒã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</caption> + <thead> + <tr> + <th scope="col">ãã©ãŠã¶ãŒ</th> + <th scope="col">ã«ãŒã«</th> + <th scope="col">äŸ</th> + </tr> + </thead> + <tbody> + <tr> + <td>Mozilla (Gecko, Firefox)</td> + <td><a href="/ja/docs/Gecko_user_agent_string_reference"><strong>Mobile</strong> ãŸã㯠<strong>Tablet</strong> ã®ããŒã¯ã³</a>ãã³ã¡ã³ãã®äžã«ããã</td> + <td>Mozilla/5.0 (Android; Mobile; rv:13.0) Gecko/13.0 Firefox/13.0</td> + </tr> + <tr> + <td>WebKit ããŒã¹ã®ãã® (Android, Safari)</td> + <td><a href="https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3"><strong>Mobile Safari</strong> ã®ããŒã¯ã³</a>ãã³ã¡ã³ãã®å€ã«ããã</td> + <td>Mozilla/5.0 (Linux; U; Android 4.0.3; de-ch; HTC Sensation Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30</td> + </tr> + <tr> + <td>Blink ããŒã¹ã®ãã® (Chromium, Google Chrome, Opera 15 以é)</td> + <td><a href="https://developers.google.com/chrome/mobile/docs/user-agent"><strong>Mobile Safari</strong> ã®ããŒã¯ã³</a>ãã³ã¡ã³ãã®å€ã«ããã</td> + <td>Mozilla/5.0 (Linux; Android 4.4.2); Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Mobile Safari/537.36 OPR/20.0.1396.72047</td> + </tr> + <tr> + <td>Presto ããŒã¹ã®ãã® (Opera 12 ãŸã§)</td> + <td> + <p><a href="http://my.opera.com/community/openweb/idopera/"><strong>Opera Mobi/xyz</strong> ã®ããŒã¯ã³</a>ãã³ã¡ã³ãã®äžã«ããã (Opera 12 ãŸã§)</p> + </td> + <td> + <p>Opera/9.80 (Android 2.3.3; Linux; Opera Mobi/ADR-1111101157; U; es-ES) Presto/2.9.201 Version/11.50</p> + </td> + </tr> + <tr> + <td>Internet Explorer</td> + <td><strong>IEMobile/xyz</strong> ã®ããŒã¯ã³ãã³ã¡ã³ãã®äžã«ããã</td> + <td>Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)</td> + </tr> + <tr> + <td>Edge on Windows 10 Mobile</td> + <td><strong>Mobile/xyz</strong> & <strong>Edge/</strong> tokens outside the comment.</td> + <td>Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Mobile Safari/537.36 Edge/16.16299</td> + </tr> + </tbody> +</table> + +<p>èŠããã«ãã¢ãã€ã«ç«¯æ«ãæ€åºããã«ã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã®ã©ããã«æåå âMobiâ ããããã©ãããæ¢ãããšããå§ãããŸãã</p> + +<div class="note"> +<p>端æ«ã倧ãã㊠âMobiâ ãšè¡šç€ºãããŠããªãå Žåã¯ããã¹ã¯ããããµã€ããæäŸããŠãã ãã (ãã¹ããã©ã¯ãã£ã¹ãšããŠããã¹ã¯ãããæ©ã«ã¿ããç»é¢ãæ¡çšããã€ã€ããã®ã§ãã©ã¡ãã«ããŠãã¿ããå
¥åã«å¯Ÿå¿ããããã«ããŠãã ãã)ã</p> +</div> diff --git a/files/ja/web/http/caching/index.html b/files/ja/web/http/caching/index.html new file mode 100644 index 0000000000..0553479443 --- /dev/null +++ b/files/ja/web/http/caching/index.html @@ -0,0 +1,154 @@ +--- +title: HTTP ãã£ãã·ã¥ +slug: Web/HTTP/Caching +tags: + - Caching + - Guide + - HTTP +translation_of: Web/HTTP/Caching +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary">éå»ã«ååŸãããªãœãŒã¹ãå䜿çšãããšããŠã§ããµã€ããã¢ããªã±ãŒã·ã§ã³ã®ããã©ãŒãã³ã¹ã倧ããåäžããã§ãããããŠã§ããã£ãã·ã¥ã¯é
延ããããã¯ãŒã¯ã®ãã©ãã£ãã¯ãåæžããŠããªãœãŒã¹ã衚瀺ããããã«å¿
èŠãªæéãççž®ããŸããHTTP ãã£ãã·ã¥ã䜿çšãããšããŠã§ããµã€ãã®å¿çæ§ãé«ãŸããŸãã</p> + +<h2 id="Different_kinds_of_caches" name="Different_kinds_of_caches">ããŸããŸãªçš®é¡ã®ãã£ãã·ã¥</h2> + +<p>ãã£ãã·ã¥ã¯ãæäŸããããªãœãŒã¹ã®è€è£œãä¿åããŠãèŠæ±ããããšãã«èåŸã§ãã®è€è£œãæäŸããæè¡ã§ãããŠã§ããã£ãã·ã¥ã®ã¹ãã¢å
ã«èŠæ±ããããªãœãŒã¹ããããšãããã£ãã·ã¥ã¯ãªã¯ãšã¹ãã«ä»å
¥ããŠãæäŸå
ã®ãµãŒããŒããåã³ããŠã³ããŒããã代ããã«ãã£ãã·ã¥å
ã®è€è£œãè¿ããŸããããã«ããããµãŒããŒããã¹ãŠã®ã¯ã©ã€ã¢ã³ãã«å¿å¯Ÿããå¿
èŠããªããªãè² è·ã軜æžããããã£ãã·ã¥ãã¯ã©ã€ã¢ã³ãã«è¿ããšããã«ããã®ã§ããã©ãŒãã³ã¹ãåäžãããããªãã¡ãªãœãŒã¹ãè¿ãããã«ãããæéãçããããšãã£ãããšãå®çŸã§ããŸãããŠã§ããµã€ãã«ã€ããŠãé«ãããã©ãŒãã³ã¹ãéæããããã®äž»èŠãªæ§æèŠçŽ ã§ããäžæ¹ããã¹ãŠã®ãªãœãŒã¹ãåããŸãŸæ°žä¹
ã«ä¿åããªãããããã£ãã·ã¥ãé©åã«èšå®ããªããã°ãªããŸããããã£ãã·ã¥ã¯ããŸãé·ãä¿åããããªãœãŒã¹ãå€æŽããããŸã§ã®éã«ããããšãéèŠã§ãã</p> + +<p>ãã£ãã·ã¥ã«ã¯ããŸããŸãªçš®é¡ãããããããã¯ãã©ã€ããŒããã£ãã·ã¥ãšå
±æãã£ãã·ã¥ã® 2 ã€ã®ã«ããŽãªãŒã«å€§ããåé¡ã§ããŸãã<em>å
±æãã£ãã·ã¥</em>ã¯ãè€æ°ã®ãŠãŒã¶ãŒãå䜿çšããããã«ã¬ã¹ãã³ã¹ãä¿åãããã£ãã·ã¥ã§ãã<em>ãã©ã€ããŒããã£ãã·ã¥</em>ã¯ãã²ãšãã®ãŠãŒã¶ãŒã®ããã®ãã£ãã·ã¥ã§ãããã®ããŒãžã§ã¯äž»ã«ãã©ãŠã¶ãŒã®ãã£ãã·ã¥ãšãããã·ã®ãã£ãã·ã¥ãæ±ããŸããããŠã§ããµã€ãããŠã§ãã¢ããªã±ãŒã·ã§ã³ã®ä¿¡é Œæ§ãããã©ãŒãã³ã¹ãèŠæš¡ãåäžããããã«ãŠã§ããµãŒããŒã§å±éãããã²ãŒããŠã§ã€ã®ãã£ãã·ã¥ãCDNããªããŒã¹ãããã·ã®ãã£ãã·ã¥ãããŒããã©ã³ãµãŒãååšããŸãã</p> + +<p><img alt="What a cache provide, advantages/disadvantages of shared/private caches." src="https://mdn.mozillademos.org/files/13777/HTTPCachtType.png" style="height: 573px; width: 910px;"></p> + +<h3 id="Private_browser_caches" name="Private_browser_caches">ãã©ã€ããŒããªãã©ãŠã¶ãŒã®ãã£ãã·ã¥</h3> + +<p>ãã©ã€ããŒããã£ãã·ã¥ã¯ãã²ãšãã®ãŠãŒã¶ãŒã®ããã®ãã£ãã·ã¥ã§ãããã©ãŠã¶ãŒã®èšå®ã§ "ãã£ãã·ã¥" ãèŠãããšãããã§ãããããã©ãŠã¶ãŒã®ãã£ãã·ã¥ã¯ããŠãŒã¶ãŒã <a href="/ja/docs/Web/HTTP" title="HTTP">HTTP</a> ã§ããŠã³ããŒããããã¹ãŠã®ææžãä¿æããŸãããã®ãã£ãã·ã¥ã¯èšªåæžã¿ã®ææžã§ããµãŒããŒãšè¿œå ã®ããåããè¡ãå¿
èŠãªãã«æ»ã/é²ãæäœãããŒãžã®ä¿åããœãŒã¹ã®è¡šç€ºãªã©ãå¯èœã«ããŸãããŸãåæ§ã«ããã£ãã·ã¥æžã¿ã³ã³ãã³ãã®ãªãã©ã€ã³è¡šç€ºãæ¹åããŸãã</p> + +<h3 id="Shared_proxy_caches" name="Shared_proxy_caches">å
±æããããããã·ãã£ãã·ã¥</h3> + +<p>å
±æãã£ãã·ã¥ã¯ãè€æ°ã®ãŠãŒã¶ãŒã«ãã£ãŠå䜿çšãããã¬ã¹ãã³ã¹ãä¿åãããã£ãã·ã¥ã§ããäŸãã° ISP ãäŒæ¥ã¯ã人æ°ããããªãœãŒã¹ãäœåºŠãå䜿çšããŠãããã¯ãŒã¯ã®ãã©ãã£ãã¯ãé
延ãäœæžããããã«ãããŒã«ã«ãããã¯ãŒã¯ã®åºç€ã®äžéšãšããŠãŠã§ããããã·ãèšçœ®ããŠããã§ãããã</p> + +<h2 id="Targets_of_caching_operations" name="Targets_of_caching_operations">ãã£ãã·ã¥åŠçã®å¯Ÿè±¡</h2> + +<p>HTTP ãã£ãã·ã¥ã¯å¿
é ã§ã¯ãããŸãããããã£ãã·ã¥ãããªãœãŒã¹ã®å䜿çšã¯éåžžæãŸããããšã§ãããã ãäžè¬ç㪠HTTP ãã£ãã·ã¥ã¯ãããŠãã{{HTTPMethod("GET")}} ã®ã¬ã¹ãã³ã¹ã®ã¿ãã£ãã·ã¥ããããå¶éãããŠãããä»ã®ã¡ãœããã§ã¯ãã£ãã·ã¥ããŸãããäž»èŠãªãã£ãã·ã¥ã®ããŒã¯ãªã¯ãšã¹ãã¡ãœãããšå¯Ÿè±¡ URI ã§æ§æãããŸã (GET ãªã¯ãšã¹ãã ãããã£ãã·ã¥ã®å¯Ÿè±¡ã«ãããããURI ãã䜿çšãããªãããšããããããŸã)ããã£ãã·ã¥é
ç®ã®äžè¬çãªåœ¢åŒã¯ä»¥äžã®ãšããã§ãã</p> + +<ul> + <li>ååŸèŠæ±ã«æåããçµæ: {{HTTPMethod("GET")}} ãªã¯ãšã¹ãã«å¯Ÿãã {{HTTPStatus(200)}} (OK) ã¬ã¹ãã³ã¹ã«ã¯ãHTML ææžãç»åããã¡ã€ã«ãªã©ã®ãªãœãŒã¹ãå«ãŸããŠããŸãã</li> + <li>æä¹
çãªãªãã€ã¬ã¯ã: {{HTTPStatus(301)}} (Moved Permanently) ã¬ã¹ãã³ã¹ã</li> + <li>ãšã©ãŒã¬ã¹ãã³ã¹: {{HTTPStatus(404)}} (Not Found) ã®ããŒãžã</li> + <li>äžå®å
šãªçµæ: {{HTTPStatus(206)}} (Partial Content) ã¬ã¹ãã³ã¹ã</li> + <li>ãã£ãã·ã¥ã®ããŒãšããŠäœ¿çšããããšãé©åã§ãããšå®çŸ©ãããŠããã°ã{{HTTPMethod("GET")}} 以å€ã®ã¬ã¹ãã³ã¹ã</li> +</ul> + +<p>ãªã¯ãšã¹ããã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã®å¯Ÿè±¡ã§ããå Žåã¯ãã£ãã·ã¥é
ç®ãã第äºã®ããŒã§åºå¥ãããè€æ°ã®ä¿åæžã¿ã¬ã¹ãã³ã¹ã§æ§æãããŠããããšããããŸãã詳ããã¯ã<a href="#Varying_responses">åŸè¿°</a>ãã {{HTTPHeader("Vary")}} ããããŒã®æ
å ±ãã芧ãã ããã</p> + +<h2 id="Controlling_caching" name="Controlling_caching">ãã£ãã·ã¥ãå¶åŸ¡ãã</h2> + +<h3 id="The_Cache-control_header" name="The_Cache-control_header"><code>Cache-Control</code> ããããŒ</h3> + +<p>HTTP/1.1 ã® {{HTTPHeader("Cache-Control")}} äžè¬ããããŒã¯ããªã¯ãšã¹ãããã³ã¬ã¹ãã³ã¹ã§ãã£ãã·ã¥æ©èœã«é¢ãããã£ã¬ã¯ãã£ããæå®ããããã«äœ¿çšããŸãããã®ããããŒãæäŸããããŸããŸãªãã£ã¬ã¯ãã£ãã䜿çšããŠããã£ãã·ã¥ã®ããªã·ãŒãå®çŸ©ããŠãã ããã</p> + +<h4 id="No_cache_storage_at_all" name="No_cache_storage_at_all">ãã£ãã·ã¥ããªã</h4> + +<p>ã¯ã©ã€ã¢ã³ãã®ãªã¯ãšã¹ãããã³ãµãŒããŒã®ã¬ã¹ãã³ã¹ã«ã€ããŠããã£ãã·ã¥ã«äœãä¿åããŠã¯ãããŸããããªã¯ãšã¹ãã¯ãµãŒããŒã«éä¿¡ãããŠããªã¯ãšã¹ãããšã«æ¯åå®å
šãªã¬ã¹ãã³ã¹ãããŠã³ããŒãããŸãã</p> + +<pre class="notranslate">Cache-Control: no-store +</pre> + +<h4 id="No_caching" name="No_caching">ãã£ãã·ã¥ãããåæ€èšŒãã</h4> + +<p>ãã£ãã·ã¥ããè€è£œãæž¡ãåã«æ€èšŒã®ããããã£ãã·ã¥ã¯çæå
ã®ãµãŒããŒã«ãªã¯ãšã¹ããéä¿¡ããŸãã</p> + +<pre class="notranslate">Cache-Control: no-cache</pre> + +<h4 id="Private_and_public_caches" name="Private_and_public_caches">private ãã£ãã·ã¥ãš public ãã£ãã·ã¥</h4> + +<p>"public" ãã£ã¬ã¯ãã£ãã¯ãã©ã®ãã£ãã·ã¥ã§ãã¬ã¹ãã³ã¹ãä¿åããŠããããšã瀺ããŸããããã¯ãéåžžã¯ãã£ãã·ã¥ã§ããªã HTTP èªèšŒãã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã䌎ãããŒãžããã£ãã·ã¥ããªããã°ãªããªãæã«æçšã§ãã</p> + +<p>äžæ¹ã"private" ã¯ã¬ã¹ãã³ã¹ãã²ãšãã®ãŠãŒã¶ãŒã®ããã®ãã®ã§ãããå
±æãã£ãã·ã¥ã«ä¿åããŠã¯ãªããªãããšã瀺ããŸãããã©ãŠã¶ãŒã®ãã©ã€ããŒããã£ãã·ã¥ã¯ããã®å Žåã§ãã¬ã¹ãã³ã¹ãä¿åã§ããŸãã</p> + +<pre class="notranslate">Cache-Control: private +Cache-Control: public +</pre> + +<h4 id="Expiration" name="Expiration">æå¹æé</h4> + +<p>ãã®ããããŒã§ãã£ãšãéèŠãªãã£ã¬ã¯ãã£ããããªãœãŒã¹ãé³è
åããŠããªããšèããããæé·æéãè¡šã "<code>max-age=<seconds></code>" ã§ãã{{HTTPHeader("Expires")}} ãšã¯å¯Ÿç
§çã«ããã®ãã£ã¬ã¯ãã£ãã¯ãªã¯ãšã¹ãã®æå»ãšé¢ä¿ããããŸããå€æŽããªãäºå®ã®ã¢ããªã±ãŒã·ã§ã³ã®ãã¡ã€ã«ã«ã¯ããããŠãç©æ¥µçãªãã£ãã·ã¥ãè¡ããŸããããã¯äŸãã°ç»åãCSS ãã¡ã€ã«ãJavaScript ãã¡ã€ã«ãšãã£ãéçãªãã¡ã€ã«ãå«ãŸããŸãã</p> + +<p>詳ããã¯ãåŸè¿°ãã <a href="#Freshness">鮮床</a> ã®ã»ã¯ã·ã§ã³ãã芧ãã ããã</p> + +<pre class="notranslate">Cache-Control: max-age=31536000</pre> + +<h4 id="Validation" name="Validation">æ€èšŒ</h4> + +<p>"<code>must-revalidate</code>" ãã£ã¬ã¯ãã£ãã䜿çšãããšããã£ãã·ã¥ã¯ãªãœãŒã¹ã䜿çšããåã«é³è
åã®ç¶æ
ãæ€èšŒããªããã°ãªããããŸãæéåãã®ãªãœãŒã¹ã䜿çšããã¹ãã§ã¯ãããŸããã詳ããã¯ã<a href="#Cache_validation">ãã£ãã·ã¥ã®æ€èšŒ</a> ã®ã»ã¯ã·ã§ã³ãã芧ãã ããã</p> + +<pre class="notranslate">Cache-Control: must-revalidate</pre> + +<h3 id="The_Pragma_header" name="The_Pragma_header"><code>Pragma</code> ããããŒ</h3> + +<p>{{HTTPHeader("Pragma")}} 㯠HTTP/1.0 ã®ããããŒã§ãããHTTP ã¬ã¹ãã³ã¹ã«ç¹å®ãããªããã HTTP/1.1 ã® <code>Cache-Control</code> äžè¬ããããŒã確å®ã«çœ®ãæãããã®ã§ã¯ãããŸããããããããªã¯ãšã¹ã㧠<code>Cache-Control</code> ããããŒãã£ãŒã«ããçç¥ãããå Žå㯠<code>Cache-Control: no-cache</code> ãšåæ§ã«äœçšããŸããHTTP/1.0 ã¯ã©ã€ã¢ã³ããšã®åŸæ¹äºæçšã«éãã<code>Pragma</code> ã䜿çšããŠãã ããã</p> + +<h2 id="Freshness" name="Freshness">鮮床</h2> + +<p>ãªãœãŒã¹ããã£ãã·ã¥ã«ä¿åããããšãçè«äžã¯æ°žä¹
ã«ãã£ãã·ã¥ãããªãœãŒã¹ãæäŸããããšãã§ããŸãããã£ãã·ã¥ã¯æéã®èšæ¶é åã§ãã®ã§ãã¢ã€ãã ã¯å®æçã«èšæ¶é åããåé€ãããŸãããã®åŠçã¯<em>ãã£ãã·ã¥ã»ãšãã¯ã·ã§ã³</em>ãšåŒã°ããŸããäžæ¹ããµãŒããŒäžã§å€æŽããããªãœãŒã¹ããããããã¯ãã£ãã·ã¥ãæŽæ°ããã¹ãã§ããHTTP ã¯ã¯ã©ã€ã¢ã³ããµãŒããŒãããã³ã«ã§ããããªãœãŒã¹ãå€æŽãããšãã«ãµãŒããŒããã£ãã·ã¥ãã¯ã©ã€ã¢ã³ãã«é£çµ¡ããããšã¯ã§ããŸããããµãŒããŒã¯ããªãœãŒã¹ã®æå¹æéãäŒããªããã°ãªããŸããããã®æå¹æéã«éãããŸã§ã¯ãªãœãŒã¹ã<em>æ°é®® (fresh)</em> ã§ããããŸãæå¹æéãéãããšãªãœãŒã¹ã¯<em>é³è
å (stale)</em> ããŸãããšãã¯ã·ã§ã³ã¢ã«ãŽãªãºã ã¯ãããŠããé³è
åãããªãœãŒã¹ãããæ°é®®ãªãªãœãŒã¹ãåªéããŸããé³è
åãããªãœãŒã¹ã¯åé€ããããç¡èŠããããããªãããšã«æ³šæããŠãã ãããé³è
åãããªãœãŒã¹ãžã®ãªã¯ãšã¹ãããã£ãã·ã¥ãåãåããšãå®éã¯ããæ°é®®ã§ã¯ãªããã確èªããããã« {{HTTPHeader("If-None-Match")}} ãä»å ããŠãªã¯ãšã¹ãã転éããŸããæ°é®®ãªç¶æ
ã§ããã°ããµãŒããŒã¯èŠæ±ããããªãœãŒã¹ãéä¿¡ããã« {{HTTPStatus("304")}} (Not Modified) ããããŒãè¿ããŠã垯åãç¯çŽããŸãã</p> + +<p>å
±æãã£ãã·ã¥ã®ãããã·ãããå Žåã®åŠçäŸã以äžã«ç€ºããŸãã</p> + +<p><img alt="Show how a proxy cache acts when a doc is not cache, in the cache and fresh, in the cache and stale." src="https://mdn.mozillademos.org/files/13771/HTTPStaleness.png" style="height: 910px; width: 822px;"></p> + +<p>鮮床ã®å¯¿åœã¯ãããã€ãã®ããããŒãåºã«èšç®ãããŸãã"<code>Cache-Control: max-age=N</code>" ããããŒãæå®ãããå Žåã¯ã鮮床ã®å¯¿åœã N ã«çãããªããŸãããã®ããããŒãäžããããªãå ŽåããããããŸããããã®ãšã㯠{{HTTPHeader("Expires")}} ããããŒãäžãããããã確èªããŸãã<code>Expires</code> ããããŒãããå Žåã¯ããã®å€ãã {{HTTPHeader("Date")}} ããããŒã®å€ãæžç®ããçµæã鮮床ã®å¯¿åœã«ããŸããæåŸã«ãã©ã¡ãã®ããããŒãäžããããŠããªãå Žå㯠{{HTTPHeader("Last-Modified")}} ããããŒãåç
§ããŸãããã®ããããŒãããå Žåã¯ã<code>Date</code> ããããŒã®å€ãã <code>Last-modified</code> ããããŒã®å€ãæžç®ã㊠10 ã§å²ã£ãçµæããã£ãã·ã¥ã®å¯¿åœã«ããŸãã<br> + æå¹æéã¯ä»¥äžã®ããã«èšç®ããŸãã</p> + +<pre class="notranslate">expirationTime = responseTime + freshnessLifetime - currentAge +</pre> + +<p>ãã㧠<code>responseTime</code> ã¯ããã©ãŠã¶ãŒãã¬ã¹ãã³ã¹ãåãåã£ãæå»ã§ãã</p> + +<h3 id="Revved_resources" name="Revved_resources">Revving ãé©çšãããªãœãŒã¹</h3> + +<p>ãã£ãã·ã¥ããããªãœãŒã¹ãããå€ã䜿çšãããšããŠã§ããµã€ãã®å¿çæ§ãããã©ãŒãã³ã¹ãåäžããã§ãããããã®æé©åã®ããã«ãæå¹æéãã§ããã ãé ãæªæ¥ã«ããããšãæšå¥šãããŠããŸãããã®æ¹æ³ã¯å®æçãããã¯ããæŽæ°ããããªãœãŒã¹ã§ã䜿çšã§ããŸããããŸãã«ããæŽæ°ãããªããªãœãŒã¹ã§ã¯åé¡ããããŸãããããã¯ãã£ãã·ã¥ããããªãœãŒã¹ã®æ©æµãæ倧éã«åããŸãããæŽæ°ããããšããšãŠãé£ãããªããŸãããã®çŸè±¡ã¯ãããããã®ãŠã§ãããŒãžã«å«ãŸããããªã³ã¯ããããããæè¡äžã®ãªãœãŒã¹ã§é¡èã§ããJavaScript ã CSS ã®ãã¡ã€ã«ã¯ããŸãå€æŽãããŸããããå€æŽç¹ã¯ãã°ããåæ ãããããšãæãŸããŸãã</p> + +<p>ãŠã§ãéçºè
ã¯ãSteve Souders æ°ã <em>revving</em><sup><a href="https://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/">[1]</a></sup> ãšåŒã¶æè¡ãçºæããŸãããããŸãæŽæ°ããªããã¡ã€ã«ã¯ãç¹å®ã®æ¹æ³ã§åœåããŸãããã®æ¹æ³ãšã¯ãéåžžã¯ãã¡ã€ã«åã§ãã URL ã«ãªããžã§ã³ (ãŸãã¯ããŒãžã§ã³) çªå·ãè¿œå ããããšã§ãããã®æ¹æ³ã§ã¯ããããã®æ°ãããªããžã§ã³ã®ãªãœãŒã¹ã<em>å€æŽãããªã</em>ãªãœãŒã¹ã§ãããšã¿ãªãããŠãé垞㯠1 幎ãããã¯ãã以äžå
ã®é ãæªæ¥ãæå¹æéã«ããããšãã§ããŸããæ°ããããŒãžã§ã³ã䜿çšããããã«ãã¹ãŠã®ãªã³ã¯ãå€æŽããªããã°ãªããªãããšãããã®æ¹æ³ã®æ¬ ç¹ã§ãããŠã§ãéçºè
ã䜿çšããããŒã«ãã§ãŒã³ã«ãã£ãŠéåžžã¯æ³šæããããè¿œå ã®è€éæ§ã§ããããŸãå€åããªããªãœãŒã¹ãå€åãããšããããå€åãããªãœãŒã¹ã«ãããªãå€åããããããŸããããå€åãããªãœãŒã¹ãèªã¿èŸŒããšãã«ãã»ãã®ãªãœãŒã¹ã®æ°ããããŒãžã§ã³ãèªã¿èŸŒãŸããŸãã</p> + +<p>ãã®ææ³ã«ã¯ããããªãå©ç¹ããããŸããåæã« 2 ã€ã®ãã£ãã·ã¥æžã¿ãªãœãŒã¹ãæŽæ°ãããšãã²ãšã€ã®ãªãœãŒã¹ãæéåãã®ããŒãžã§ã³ãããã²ãšã€ã®ãªãœãŒã¹ãæ°ããããŒãžã§ã³ãšããçµã¿åããã§äœ¿çšãããããšããªããªããŸããããã¯çžäºäŸåãããªãã¡ããããããåã HTML èŠçŽ ãåç
§ããŠããããã«ãäºãã«äŸåããã£ãŠãã CSS ã¹ã¿ã€ã«ã·ãŒããš JS ã¹ã¯ãªããã䜿çšãããŠã§ããµã€ãã§ç¹ã«éèŠã§ãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13779/HTTPRevved.png"></p> + +<p>revving ãé©çšãããªãœãŒã¹ã«è¿œå ãããªããžã§ã³æ
å ±ã¯ 1.1.3 ã®ãããªäŒçµ±çãªãªããžã§ã³æååã§ããå¿
èŠã¯ãªããåçŽã«å¢å ããŠããäžçµã®çªå·ã§ãããŸããŸãããããã·ã¥å€ãæ¥ä»ãªã©ãè¡çªãé¿ããæ
å ±ã«ããããšãã§ããŸãã</p> + +<h2 id="Cache_validation" name="Cache_validation">ãã£ãã·ã¥ã®æ€èšŒ</h2> + +<p>ãã£ãã·ã¥ãããææžã®æå¹æéã«éãããšãæ€èšŒãŸãã¯åååŸãè¡ããŸãããã£ãã·ã¥ã®æ€èšŒã¯ããµãŒããŒã <em>strong validator</em> ãŸã㯠<em>weak validator</em> ãæäŸããŠããã°å®è¡ã§ããŸãã</p> + +<p>ãŠãŒã¶ãŒãåèªã¿èŸŒã¿ãã¿ã³ãæŒããšãåæ€èšŒãçºçããŸãããã£ãã·ã¥ãããã¬ã¹ãã³ã¹ã« "<code>Cache-Control: must-revalidate</code>" ããããŒãå«ãŸããŠããå Žåã¯ãéåžžã®ãã©ãŠãžã³ã°ã§ãå確èªãçºçããŸããããã²ãšã€ã®èŠå ãã<code>詳现 -> ãã£ãã·ã¥</code> èšå®ããã«ã«ããããã£ãã·ã¥ç¢ºèªã®èšå®ã§ããããã«ãææžãèªã¿èŸŒããã³ã«ç¢ºèªã匷ããèšå®é
ç®ããããŸãã</p> + +<h3 id="ETags" name="ETags">ETag</h3> + +<p>{{HTTPHeader("ETag")}} ã¬ã¹ãã³ã¹ããããŒã¯ strong validator ãšããŠäœ¿çšã§ããã<em>ãŠãŒã¶ãŒãšãŒãžã§ã³ãã«ãšã£ãŠäžéæ</em>ãªå€ã§ãããã©ãŠã¶ãŒãªã©ã® HTTP ãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ããã®æååãäœãè¡šãããããããããŸããã®å€ãäœã«ãªãããäºæž¬ããããšãã§ããŸããã<code>ETag</code> ããããŒããªãœãŒã¹ã®ã¬ã¹ãã³ã¹ã®äžéšã«å«ãŸããŠããããã¯ã©ã€ã¢ã³ãã¯ä»¥éã®ãªã¯ãšã¹ãã§ãã£ãã·ã¥æžã¿ãªãœãŒã¹ã®ç¢ºèªãè¡ãããã« {{HTTPHeader("If-None-Match")}} ãããããŒã«å«ããããšãã§ããŸãã</p> + +<p>{{HTTPHeader("Last-Modified")}} ã¬ã¹ãã³ã¹ããããŒã¯ãweak validator ãšããŠäœ¿çšã§ããŸããããã¯å解èœã 1 ç§åäœã§ãããªããããweak ã§ãããšèããããŸãã<code>Last-Modified</code> ããããŒãã¬ã¹ãã³ã¹ã«å«ãŸããŠããããã¯ã©ã€ã¢ã³ãã¯ãã£ãã·ã¥æžã¿ææžã®ç¢ºèªãè¡ãããã« {{HTTPHeader("If-Modified-Since")}} ãªã¯ãšã¹ãããããŒãéä¿¡ã§ããŸãã</p> + +<p>確èªèŠæ±ãè¡ããããšãããµãŒããŒã¯ç¢ºèªèŠæ±ãç¡èŠããŠéåžžã® {{HTTPStatus(200)}} <code>OK</code> ã¬ã¹ãã³ã¹ãè¿ããããã©ãŠã¶ãŒã«ãã£ãã·ã¥æžã¿ã®è€è£œã䜿çšããããæ瀺ããããã« {{HTTPStatus(304)}} <code>Not Modified</code> (ããã£ã¯ç©ºã«ãã) ãè¿ãããšãã§ããŸããåŸè
ã®ã¬ã¹ãã³ã¹ã§ã¯ããã£ãã·ã¥æžã¿ææžã®æå¹æéãæŽæ°ããããããŒãå«ããããšãã§ããŸãã</p> + +<h2 id="Varying_responses" name="Varying_responses">å€åããã¬ã¹ãã³ã¹</h2> + +<p>{{HTTPHeader("Vary")}} HTTP ã¬ã¹ãã³ã¹ããããŒã¯ãæäŸå
ã®ãµãŒããŒããã¬ã¹ãã³ã¹ãåŸãããã«èŠæ±ããã«ãã£ãã·ã¥æžã¿ã®ã¬ã¹ãã³ã¹ã䜿çšã§ããããå€æããããã«ã以éã®ãªã¯ãšã¹ãããããŒãã©ã®ããã«ç
§åããããå®çŸ©ããŸãã</p> + +<p><code>Vary</code> ããããŒãã£ãŒã«ããæã€ãã£ãã·ã¥æžã¿ã¬ã¹ãã³ã¹ã«åèŽå¯èœãªãªã¯ãšã¹ãããã£ãã·ã¥ãåãåã£ããšãã<code>Vary</code> ããããŒã§æå®ããããã¹ãŠã®ããããŒãã£ãŒã«ããå
ã® (ãã£ãã·ã¥æžã¿) ãªã¯ãšã¹ããšæ°ããªãªã¯ãšã¹ãã®äž¡æ¹ã§äžèŽããªããã°ããã£ãã·ã¥æžã¿ã¬ã¹ãã³ã¹ã䜿çšããŠã¯ãããŸããã</p> + +<p><img alt="The Vary header leads cache to use more HTTP headers as key for the cache." src="https://mdn.mozillademos.org/files/13769/HTTPVary.png" style="height: 817px; width: 752px;"></p> + +<p>ããã¯ãäŸãã°åçã«ã³ã³ãã³ããæäŸããå Žåã«æçšã§ãã<code>Vary: User-Agent</code> ããããŒã䜿çšãããšããã£ãã·ã¥ãµãŒããŒã¯ããŒãžããã£ãã·ã¥ããæäŸããããå€æããããã«ããŠãŒã¶ãŒãšãŒãžã§ã³ããèæ
®ããŸããã¢ãã€ã«ãŠãŒã¶ãŒåãã«å¥ã®ã³ã³ãã³ããæäŸããŠããå Žåãã¢ãã€ã«ãŠãŒã¶ãŒåãã«èª€ã£ãŠãã¹ã¯ãããçã®ãµã€ããæäŸãããŠããŸãããšãé²ãå©ãã«ãªããŸããå ããŠãGoogle ãªã©ã®æ€çŽ¢ãšã³ãžã³ãã¢ãã€ã«çã®ããŒãžãçºèŠããå©ãã«ãªãã<a href="https://ja.wikipedia.org/wiki/%E3%82%AF%E3%83%AD%E3%83%BC%E3%82%AD%E3%83%B3%E3%82%B0">ã¯ããŒãã³ã°</a> ãæå³ããŠããªããšç¥ãããããšãã§ããã§ãããã</p> + +<pre class="notranslate">Vary: User-Agent</pre> + +<p>{{HTTPHeader("User-Agent")}} ã¯ã¢ãã€ã«ã¯ã©ã€ã¢ã³ããšãã¹ã¯ãããã¯ã©ã€ã¢ã³ãã§ç°ãªã ("vary") ããã誀ã£ãŠã¢ãã€ã«çã®ã³ã³ãã³ãããã¹ã¯ããããŠãŒã¶ãŒåãã«äœ¿çšããããããã¯ãã®éãè¡ãããšããªããªãã§ãããã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="https://tools.ietf.org/html/rfc7234">RFC 7234: Hypertext Transfer Protocol (HTTP/1.1): Caching</a></li> + <li><a href="https://www.mnot.net/cache_docs">Caching Tutorial â Mark Nottingham</a></li> + <li><a href="https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching">HTTP caching â Ilya Grigorik</a></li> + <li><a href="https://redbot.org/">RedBot</a>: ãã£ãã·ã¥é¢ä¿ã®ããããŒã確èªããããŒã«</li> +</ul> diff --git a/files/ja/web/http/compression/index.html b/files/ja/web/http/compression/index.html new file mode 100644 index 0000000000..fd48194c13 --- /dev/null +++ b/files/ja/web/http/compression/index.html @@ -0,0 +1,70 @@ +--- +title: HTTP ã®å§çž® +slug: Web/HTTP/Compression +tags: + - Guide + - HTTP + - ã¬ã€ã + - å§çž® +translation_of: Web/HTTP/Compression +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><strong>å§çž®</strong>ã¯ããŠã§ããµã€ãã®ããã©ãŒãã³ã¹ãåäžãããããã®éèŠãªæ段ã§ããããã¥ã¡ã³ãã«ãã£ãŠã¯ãå¿
èŠãªåž¯åãæ倧 70% åæžããã»ã©ãµã€ãºãçž®æžããŸããé·å¹ŽãããŠã¢ã«ãŽãªãºã ã¯ããå¹ççã«ãªãããŸãã¯ã©ã€ã¢ã³ãããã³ãµãŒããŒãæ°ããªã¢ã«ãŽãªãºã ããµããŒãããŸããã</p> + +<p>å®éã®ãšãããå§çž®ã®ä»çµã¿ã¯ãã©ãŠã¶ãŒããµãŒããŒããã§ã«å®è£
ããŠããŸãã®ã§ããŠã§ãéçºè
ãå®è£
ããå¿
èŠæ§ã¯ãããŸããããããããµãŒããŒãé©åã«èšå®ãããããã«æ³šæããªããã°ãªããŸãããå§çž®ã¯ã3 çš®é¡ã®ç°ãªãã¬ãã«ã§å®æœããŸãã</p> + +<ul> + <li>å§ãã«ãäžéšã®ãã¡ã€ã«åœ¢åŒã¯ãåºæã®æé©åãããæ¹æ³ã§å§çž®ãããŸãã</li> + <li>ãããŠãäžè¬çãªæå·åã HTTP ã¬ãã«ã§è¡ããããå ŽåããããŸã (ãªãœãŒã¹ã¯ãšã³ãããŒãšã³ãã§å§çž®ãããŠè»¢éãããŸã)</li> + <li>æåŸã« HTTP ã³ãã¯ã·ã§ã³ã® 2 ã€ã®ããŒãéã§ãã³ãã¯ã·ã§ã³ã¬ãã«ã§å§çž®ãå®çŸ©ãããå ŽåããããŸãã</li> +</ul> + +<h2 id="File_format_compression" name="File_format_compression">ãã¡ã€ã«åœ¢åŒã®å§çž®</h2> + +<p>ããããã®ããŒã¿åœ¢åŒã«ã¯ã<ruby>ç¡é§ãªã¹ããŒã¹<rp> (</rp><rt><em>wasted space</em></rt><rp>) </rp></ruby>ãšåŒã°ããåé·ãªé åãå
éšã«ãããŸããããã¹ããäžè¬çã« 60% ãã®åé·æ§ãæã€ãšããŠããã®å²åã¯é³å£°ãåç»ãšãã£ãä»ã®ã¡ãã£ã¢ããã¯ããã«é«ããªããŸããããã¹ããšã¯ç°ãªãããããã®ãã®ä»ã®ã¡ãã£ã¢åœ¢åŒã¯ããŒã¿ãæ ŒçŽããããã«ããå€ãã®é åã䜿çšããã®ã§ãã¹ãã¬ãŒãžãæé©åãé åãåãæ»ãå¿
èŠæ§ã¯ããåæã«æããã«ãªããŸãããæè¡è
ã¯ç¹å®ã®çšéåãã«èšèšããããã¡ã€ã«åœ¢åŒã§äœ¿çšããããæé©åãããå§çž®ã¢ã«ãŽãªãºã ãèšèšããŸãããã¡ãã£ã¢ãã¡ã€ã«ã§äœ¿çšãããå§çž®ã¢ã«ãŽãªãºã ã¯ã倧ãã 2 ã€ã®ã«ããŽãªãŒã«åé¡ã§ããŸãã</p> + +<ul> + <li><em>å¯éå§çž®</em>ãå§çž®ã»å±éã®ãµã€ã¯ã«ã§åãåºããããŒã¿ãå€åããŸãããããã¯å
ã®ããŒã¿ã« (ãã€ãåäœã§) äžèŽããŸãã<br> + ç»åã§ã¯ <code>gif</code> ã <code>png</code> ãå¯éå§çž®ã䜿çšããŠããŸãã</li> + <li><em>éå¯éå§çž®</em>ãå§çž®ã»å±éã®ãµã€ã¯ã«ã§ããŠãŒã¶ãŒã (ã§ããã ã) æç¥ã§ããªãæ¹æ³ã§å
ã®ããŒã¿ãå€æŽããŸãã<br> + ãŠã§ãäžã®åç»åœ¢åŒã¯éå¯éã§ãã <code>jpeg</code> ç»åãéå¯éã§ãã</li> +</ul> + +<p><code>webp</code> ã®ããã«å¯éå§çž®ãšéå¯éå§çž®ã®ããããã䜿çšã§ãã圢åŒããããŸãããéåžžã¯éå¯éå§çž®ã§é«å§çž®ã»äœå§çž®ãèšå®ã§ããåœç¶ãªããããã¯å質ã®é«äœã«çµã³ã€ããŸãããµã€ãã®ããã©ãŒãã³ã¹ãé«ããã«ã¯ãæºè¶³ã§ããå質ã¬ãã«ãç¶æããªãããã§ããã ãå§çž®ããããšãçæ³ã§ããç»åã®å Žåã¯ãããŒã«ãçæããç»åã¯ãŠã§ãåãã«ååæé©åãããŠããªãå ŽåããããŸããèŠæ±ããå質ã§å¯èœãªéãå§çž®ããããŒã«ã䜿çšããããšããå§ãããŸãããã®çšéã«ç¹åãã <a href="https://www.creativebloq.com/design/image-compression-tools-1132865">å€ãã®ããŒã«</a> ããããŸãã</p> + +<p>éå¯éå§çž®ã¢ã«ãŽãªãºã ã¯äžè¬çã«ãå¯éå§çž®ããå¹çããããªããŸãã</p> + +<div class="note"> +<p>ç¹å®ã®çš®é¡ã®ãã¡ã€ã«ã¯å§çž®ãè¯å¥œã«æ©èœããŠãããããé垞㯠2 床ç®ã®å§çž®ãè¡ããŸãããå®éã®ãšããã倧ããªãã¡ã€ã«ã®å§çž®ã«ãã£ãŠåŸãããè¿œå ã®å©çããããªãŒããŒããã (ã¢ã«ãŽãªãºã ã¯äžè¬çã«ãåæã®ãµã€ãºã«è¿œå ããèŸæžãå¿
èŠã§ã) ã®ã³ã¹ããäžåãå ŽåããããŸããå§çž®æžã¿åœ¢åŒã®ãã¡ã€ã«ã§ã以äžã®2ã€ã®æè¡ã¯äœ¿çšããªãã§ãã ããã</p> +</div> + +<h2 id="End-to-end_compression" name="End-to-end_compression">ãšã³ãããŒãšã³ãã®å§çž®</h2> + +<p>ãšã³ãããŒãšã³ãã®å§çž®ã¯ããŠã§ããµã€ãã®ããã©ãŒãã³ã¹ããã£ãšãåäžãããŸãããšã³ãããŒãšã³ãã®å§çž®ã¯ããµãŒããŒã«ãã£ãŠè¡ãããã¡ãã»ãŒãžããã£ã®å§çž®ãæããŠãããå§çž®ãããããŒã¿ã¯ã¯ã©ã€ã¢ã³ãã«å°éãããŸã§å€æŽãããŸãããäžéã®ããŒãã¯ãã¹ãŠãããã£éšåã«æãã€ããªããŸãŸã«ããŸãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13801/HTTPEnco1.png" style="height: 307px; width: 955px;"></p> + +<p>çŸä»£ã®ãã¹ãŠã®ãã©ãŠã¶ãŒããµãŒããŒã¯ãã®å§çž®ããµããŒãããŠãããå¯äžåã決ããããšã¯ã䜿çšããå§çž®ã¢ã«ãŽãªãºã ã§ãããããã®ã¢ã«ãŽãªãºã ã¯ãããã¹ãã«æé©åãããŠããŸãã1990 幎代ã«å§çž®æè¡ã¯éãããŒã¹ã§é²æ©ããŠãããã€ãã®ã¢ã«ãŽãªãºã ãã䜿çšå¯èœãªéžæè¢ã«è¿œå ãããŸãããçŸåšåŠ¥åœãªã¢ã«ãŽãªãºã ã¯ããã£ãšãäžè¬ç㪠<code>gzip</code> ãšæ°ããªææŠè
ã§ãã <code>br</code> ã® 2 ã€ã ãã§ãã</p> + +<p>䜿çšããã¢ã«ãŽãªãºã ãéžæããã«ã¯ããã©ãŠã¶ãŒãšãµãŒããŒã§ <a href="/ja/docs/Web/HTTP/Content_negotiation">ããã¢ã¯ãã£ããªã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a> ãè¡ããŸãããã©ãŠã¶ãŒã¯ {{HTTPHeader("Accept-Encoding")}} ããããŒã§ããµããŒãããã¢ã«ãŽãªãºã ãåªå
床é ã«äžŠã¹ãŠéä¿¡ããŸãããµãŒããŒã¯ãã®ãã¡ã²ãšã€ãéžæããŠãã¬ã¹ãã³ã¹ã®ããã£ã®å§çž®ã«äœ¿çšããŸãããã㊠{{HTTPHeader("Content-Encoding")}} ããããŒã䜿çšããŠãéžæããã¢ã«ãŽãªãºã ããã©ãŠã¶ãŒã«äŒããŸãããšã³ã³ãŒãã£ã³ã°ã«åºã¥ããŠè¡šçŸãéžæããããã«ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã䜿çšãããšããå°ãªããšã {{HTTPHeader("Content-Encoding")}} ãå«ãã {{HTTPHeader("Vary")}} ããããŒããã¬ã¹ãã³ã¹ãšãšãã«éä¿¡ããªããã°ãªããŸããããã®æ¹æ³ã«ãã£ãŠããªãœãŒã¹ã®ããŸããŸãªè¡šçŸããã£ãã·ã¥ããããšãã§ããŸãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13811/HTTPCompression1.png" style="height: 307px; width: 771px;"></p> + +<p>å§çž®ã«ãã£ãŠããã©ãŒãã³ã¹ã倧ããåäžããŸãã®ã§ãç»åã»é³å£°ã»åç»ãšãã£ããã§ã«å§çž®ãããŠãããã®ãé€ããã¹ãŠã®ãã¡ã€ã«ã§å§çž®ãæå¹åããããšãæšå¥šããŸãã</p> + +<p>Apache ã¯å§çž®ã <a href="https://httpd.apache.org/docs/current/mod/mod_deflate.html">mod_deflate</a> ããµããŒãããŸãã nginx ã§ã¯ <a href="https://nginx.org/en/docs/http/ngx_http_gzip_module.html">ngx_http_gzip_module</a>ã IIS ã§ã¯ <code><a href="https://www.iis.net/configreference/system.webserver/httpcompression"><httpCompression></a></code> èŠçŽ ããããŸãã</p> + +<h2 id="Hop-by-hop_compression" name="Hop-by-hop_compression">ããããã€ãããã®å§çž®</h2> + +<p>ããããã€ãããã®å§çž®ã¯ãšã³ãããŒãšã³ãã®å§çž®ã«äŒŒãŠããŸãããããããµãŒããŒå
ã®ãªãœãŒã¹ã§ã¯å§çž®ãè¡ããã«ç¹å®ã®è¡šçŸåœ¢åŒãçæããŠè»¢éããŸãããã¯ã©ã€ã¢ã³ããšãµãŒããŒã®éã®ãã¹äžã«ããä»»æã® 2 ã€ã®ããŒãã®éã§ã¡ãã»ãŒãžã®ããã£ãå§çž®ããããšããæ ¹æ¬çãªéãããããŸããé£ç¶ããäžéããŒãã®éã®ã³ãã¯ã·ã§ã³ã§ã<em>ç°ãªã</em>å§çž®ãè¡ãããããšããããŸãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13807/HTTPTE1.png"></p> + +<p>ãããè¡ãããã«ã HTTP ã§ã¯ãšã³ãããŒãšã³ãã®å§çž®ã®ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã«äŒŒãŠããä»çµã¿ã䜿çšããŸãããªã¯ãšã¹ãã転éããããŒã㯠{{HTTPHeader("TE")}} ããããŒã䜿çšããŠå§çž®ã¢ã«ãŽãªãºã ãäŒããŸããçžæã®ããŒãã¯é©åãªæ¹åŒãéžæããŠå§çž®ãè¡ãã {{HTTPHeader("Transfer-Encoding")}} ããããŒã䜿çšããŠãéžæããæ¹åŒã瀺ããŸãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13809/HTTPComp2.png"></p> + +<p>å®éã¯ãããããã€ãããã®å§çž®ã¯ãµãŒããŒãã¯ã©ã€ã¢ã³ãã«ãšã£ãŠééçã§ãããããŸã䜿çšãããŸããã {{HTTPHeader("TE")}} ããã³ {{HTTPHeader("Transfer-Encoding")}} ã¯äž»ã«ãã£ã³ã¯åœ¢åŒã§ã¬ã¹ãã³ã¹ãéä¿¡ããããã«äœ¿çšãããé·ããããããªããªãœãŒã¹ã®è»¢éãéå§ããããšãã§ããŸãã</p> + +<p>ãããã¬ãã«ã§å§çž®ã {{HTTPHeader("Transfer-Encoding")}} ã䜿çšããããšã¯ ApacheãnginxãIIS ãªã©ã»ãšãã©ã®ãµãŒããŒã§ãŸãã§ãããç°¡åã«èšå®ããæ¹æ³ã¯ãããŸããããã®ãããªèšå®ã¯ãäž»ã«ãããã·ã¬ãã«ã§è¡ããŸãã</p> diff --git a/files/ja/web/http/conditional_requests/index.html b/files/ja/web/http/conditional_requests/index.html new file mode 100644 index 0000000000..9a3c57338b --- /dev/null +++ b/files/ja/web/http/conditional_requests/index.html @@ -0,0 +1,148 @@ +--- +title: HTTP æ¡ä»¶ä»ããªã¯ãšã¹ã +slug: Web/HTTP/Conditional_requests +tags: + - Conditional Requests + - Guide + - HTTP +translation_of: Web/HTTP/Conditional_requests +--- +<p>{{HTTPSidebar}}</p> + +<p class="summary">HTTP ã«ã¯<em>æ¡ä»¶ä»ããªã¯ãšã¹ã</em>ã®æŠå¿µãããã察象ãšãªããªãœãŒã¹ãš<em>æ€èšŒå</em>ã®å€ãšãæ¯èŒããããšã§ããªã¯ãšã¹ãã®çµæããæåã倱æããŸã§ããå€åããããšããããŸãããã®ãããªãªã¯ãšã¹ãã¯ããã£ãã·ã¥ã®å
容ãæ€èšŒããŠãç¡çšãªå¶åŸ¡ãé¿ããããããŠã³ããŒãã®åéã®æãªã©ã«ææžã®æŽåæ§ãæ€èšŒãããããµãŒããŒäžã®ææžãã¢ããããŒããŸãã¯å€æŽãããšãã«æŽæ°å
容ã倱ãããšãé¿ããå Žåãªã©ã«åœ¹ç«ã€ããšããããŸãã</p> + +<h2 id="Principles" name="Principles">åç</h2> + +<p>HTTP æ¡ä»¶ä»ããªã¯ãšã¹ãã¯ãç¹å®ã®ããããŒã®å€ã«å¿ããŠç°ãªãåŠçãè¡ããããªã¯ãšã¹ãã§ãããããã®ããããŒã¯åææ¡ä»¶ãå®çŸ©ããŠããããªã¯ãšã¹ãã®çµæã¯åææ¡ä»¶ã«äžèŽãããåŠãã«å¿ããŠå€ãããŸãã</p> + +<p>ãªã¯ãšã¹ãã§äœ¿çšããã¡ãœãããåææ¡ä»¶ã§äœ¿çšããããããŒäžåŒã«ãã£ãŠãããŸããŸãªåäœãå®çŸ©ãããŠããŸãã</p> + +<ul> + <li>{{HTTPMethod("GET")}} ãªã©ã®{{glossary("safe", "å®å
šãª")}}ã¡ãœããã¯ãäžè¬ã«ææžãååŸããã¡ãœããã§ãããæ¡ä»¶ä»ããªã¯ãšã¹ãã¯é¢é£ããææžã®ã¿ãè¿ä¿¡ããããã«å©çšããããšãã§ããŸããããã«ãã£ãŠã垯åãç¯çŽããŸãã</li> + <li>{{HTTPMethod("PUT")}} ãªã©ã®{{glossary("safe", "å®å
šã§ã¯ãªã")}}ã¡ãœããã¯ãäžè¬ã«ææžãã¢ããããŒãããã¡ãœããã§ãããæ¡ä»¶ä»ããªã¯ãšã¹ãã¯ææžããµãŒããŒã«æ ŒçŽãããŠãããã®ãšåããã®ã«åºã¥ãããã®ã§ããå Žåã«éã£ãŠã¢ããããŒãããããã«ããããã«å©çšããããšãã§ããŸãã</li> +</ul> + +<h2 id="Validators" name="Validators">æ€èšŒå</h2> + +<p>ãã¹ãŠã®æ¡ä»¶ããããŒã¯ããµãŒããŒã«ä¿åãããŠãããªãœãŒã¹ãç¹å®ã®ããŒãžã§ã³ã«äžèŽããã確èªãè©Šã¿ãŸãããã®ãããæ¡ä»¶ä»ããªã¯ãšã¹ãã§ã¯ãªãœãŒã¹ã®ããŒãžã§ã³ã瀺ãå¿
èŠããããŸãããªãœãŒã¹å
šäœããã€ãåäœã§æ¯èŒããããšã¯äžå¯èœã§ãããåžžã«æãŸããŠããããšãšã¯éããªãã®ã§ããªã¯ãšã¹ãã¯ããŒãžã§ã³ãèšè¿°ããå€ãéä¿¡ããŸãããã®ãããªå€ã¯<em>æ€èšŒå</em>ãšåŒã°ããäºçš®é¡ããããŸãã</p> + +<ul> + <li>ææžãæåŸã«å€æŽãããæ¥æã§ãã <em>last-modified</em> ã®æ¥æ</li> + <li><em>ãšã³ãã£ãã£ã¿ã°</em>ãŸã㯠<em>etag</em> ãšåŒã°ãããåããŒãžã§ã³ãäžæã«èå¥ããäžéæãªæååã</li> +</ul> + +<p>åããªãœãŒã¹ã®ããŒãžã§ã³ã®æ¯èŒã¯å°ã
è€éã§ããç¶æ³ã«ãã£ãŠãäºçš®é¡ã®<em>確èªæ¹æ³</em>ããããŸãã</p> + +<ul> + <li><ruby>匷ãæ€èšŒ<rp> (</rp><rt>Strong validation</rt><rp>) </rp></ruby>ã¯ãããŠã³ããŒããåéãããšããªã©ããã€ãåäœã®åäžæ§ãæ±ããããå Žåã«äœ¿çšããŸãã</li> + <li><ruby>匱ãæ€èšŒ<rp> (</rp><rt>Weak validation</rt><rp>) </rp></ruby>ã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ããäºã€ã®ãªãœãŒã¹ãåãã§ããããšã確èªããããšã ããå¿
èŠã§ããå Žåã«äœ¿çšããŸããããã¯åºåã®éããããã¿ãŒã®æ¥ä»ã®éããªã©ãå°ããªéããããå Žåãå«ã¿ãŸãã</li> +</ul> + +<p>æ€èšŒã®çš®é¡ãšäœ¿çšãããæ€èšŒåã¯ç¬ç«ããŠããŸãã {{HTTPHeader("Last-Modified")}} ãš {{HTTPHeader("ETag")}} ã¯ã©ã¡ãã®çš®é¡ã®æ€èšŒãã§ããŸããããµãŒããŒåŽã®å®è£
ã®è€éãã¯ç°ãªããŸãã HTTP ã¯æ¢å®ã§åŒ·ãæ€èšŒã䜿çšãã匱ãæ€èšŒã䜿çšãããšãã¯ãããæå®ããŸãã</p> + +<h3 id="Strong_validation" name="Strong_validation">匷ãæ€èšŒ</h3> + +<p id="sect1">匷ãæ€èšŒã¯ãæ¯èŒå¯Ÿè±¡ã®ãªãœãŒã¹ããã€ãåäœã§åäžã§ããããšãä¿èšŒããŸããããã¯äžéšã®æ¡ä»¶ããããŒã§å¿
é ããŸãä»ã®ããããŒã§ã¯æ¢å®ã®èŠä»¶ã§ãã匷ãæ€èšŒã¯ãšãŠãå³å¯ã§ããããµãŒããŒã¬ãã«ã§ä¿èšŒããããšãå°é£ã§ããå ŽåããããŸãããæã«ã¯æ§èœãç ç²ã«ããŠããããŒã¿ã倱ãããŠããªãããšãåžžã«ä¿èšŒããŸãã</p> + +<p>{{HTTPHeader("Last-Modified")}} ã§åŒ·ãæ€èšŒã®ããã®äžæãªèå¥åãæã€ããšã¯ããšãŠãå°é£ã§ããå€ãã®å ŽåããªãœãŒã¹ã® MD5 ããã·ã¥ (ãããã¯ãã®æŽŸçç©) ãæ〠{{HTTPHeader("ETag")}} ã䜿çšããŸãã</p> + +<h3 id="Weak_validation" name="Weak_validation">匱ãæ€èšŒ</h3> + +<p>匱ãæ€èšŒã¯ãå
容ãç䟡ã§ãããªãäºã€ã®ããŒãžã§ã³ã®ææžãçãããšèŠãªããããšããç¹ã§ã匷ãæ€èšŒãšç°ãªããŸããäŸãã°ããã¿ãŒã®æ¥ä»ã ãããããã¯åºåã ããç°ãªãäºã€ã®ããŒãžã¯ã匱ãæ€èšŒã§ã¯<em>åäž</em>ã§ãããšã¿ãªãããŸããã匷ãæ€èšŒã§ã¯ç°ãªããã®ãšã¿ãªãããŸãã匱ãæ€èšŒãäœãåºã etag ã®ã·ã¹ãã ãæ§ç¯ããããšã¯ãããŒãžã®ããŸããŸãªèŠçŽ ã®éèŠæ§ãç¥ãããšã䌎ãããè€éã«ãªããããããŸãããããã£ãã·ã¥ã®æ§èœãæé©åããããã«ãšãŠã圹ã«ç«ã¡ãŸãã</p> + +<h2 id="Conditional_headers" name="Conditional_headers">æ¡ä»¶ããããŒ</h2> + +<p>æ¡ä»¶ããããŒãšåŒã°ããããã€ãã® HTTP ããããŒããæ¡ä»¶ä»ããªã¯ãšã¹ãããããããŸãã</p> + +<dl> + <dt>{{HTTPHeader("If-Match")}}</dt> + <dd>é æ¹ã®ãªãœãŒã¹ã® {{HTTPHeader("ETag")}} ãšããã®ããããŒã«èŒãã etag ãçãããã°æåããŸããããã©ã«ãã§ã¯ etag ã«æ¥é èŸ <code>'W/'</code> ãã€ããŠããªãéãã匷ãæ€èšŒãè¡ããŸãã</dd> + <dt>{{HTTPHeader("If-None-Match")}}</dt> + <dd>é æ¹ã®ãªãœãŒã¹ã® {{HTTPHeader("ETag")}} ãšããã®ããããŒã«èŒããããããã® etag ãç°ãªã£ãŠããã°æåããŸããããã©ã«ãã§ã¯ etag ã«æ¥é èŸ <code>'W/'</code> ãã€ããŠããªãéãã匷ãæ€èšŒãè¡ããŸãã</dd> + <dt>{{HTTPHeader("If-Modified-Since")}}</dt> + <dd>é æ¹ã®ãªãœãŒã¹ã® {{HTTPHeader("Last-Modified")}} ã®æ¥æãããã®ããããŒã§æå®ããæ¥æããæ°ãããã°æåããŸãã</dd> + <dt>{{HTTPHeader("If-Unmodified-Since")}}</dt> + <dd>é æ¹ã®ãªãœãŒã¹ã® {{HTTPHeader("Last-Modified")}} ã®æ¥æãããã®ããããŒã§æå®ããæ¥æããéå»ãŸãã¯åäžã§ããã°æåããŸãã</dd> + <dt>{{HTTPHeader("If-Range")}}</dt> + <dd>{{HTTPHeader("If-Match")}} ã {{HTTPHeader("If-Unmodified-Since")}} ã«äŒŒãŠããŸããã etag ãŸãã¯æ¥æãã²ãšã€ããæã€ããšãã§ããŸãããæ¡ä»¶ã倱æãããšç¯å²æå®ãªã¯ãšã¹ãã倱æããŠã {{HTTPStatus("206")}} <code>Partial Content</code> ã¬ã¹ãã³ã¹ã®ä»£ããã« {{HTTPStatus("200")}} <code>OK</code> ã§ãªãœãŒã¹å
šäœãéä¿¡ããŸãã</dd> +</dl> + +<h2 id="Use_cases" name="Use_cases">䜿çšäŸ</h2> + +<h3 id="Cache_update" name="Cache_update">ãã£ãã·ã¥ã®æŽæ°</h3> + +<p>æ¡ä»¶ä»ããªã¯ãšã¹ãã®ãã£ãšãäžè¬çãªäœ¿çšäŸã¯ããã£ãã·ã¥ã®æŽæ°ã§ãããã£ãã·ã¥ã空ã§ããããããã¯ãã£ãã·ã¥ã䜿çšããªãç¶æ
ã§ã¯ {{HTTPStatus("200")}} <code>OK</code> ã¹ããŒã¿ã¹ãšå
±ã«ãèŠæ±ãããªãœãŒã¹ãéä¿¡ãããŸãã</p> + +<p><img alt="The request issued when the cache is empty triggers the resource to be downloaded, with both validator value sent as headers. The cache is then filled." src="https://mdn.mozillademos.org/files/13729/Cache1.png" style="height: 265px; width: 741px;"></p> + +<p>ãªãœãŒã¹ãšå
±ã«ãããããŒã§æ€èšŒåãéä¿¡ããŸãããã®äŸã§ã¯ {{HTTPHeader("Last-Modified")}} ãš {{HTTPHeader("ETag")}} ã®äž¡æ¹ãéä¿¡ããŠããŸãããã©ã¡ããäžæ¹ãã䜿çšããŸããããããã®æ€èšŒåã¯ãªãœãŒã¹ãšå
±ã« (ãã¹ãŠã®ããããŒã®ããã«) ãã£ãã·ã¥ãžä¿åããããã£ãã·ã¥ãé³è
åãããšãã«æ¡ä»¶ä»ããªã¯ãšã¹ããäœæããããã«äœ¿çšããŸãã</p> + +<p>ãã£ãã·ã¥ãé³è
åããŠããªããã°ãæ¡ä»¶ä»ããªã¯ãšã¹ãã¯è¡ããŸãããããããã£ãã·ã¥ãé³è
åãããšäž»ã« {{HTTPHeader("Cache-Control")}} ããããŒã«å¶åŸ¡ãããŠãã¯ã©ã€ã¢ã³ãã¯ãã£ãã·ã¥ãããå€ãçŽæ¥äœ¿çšããã{{HTTPHeader("If-Modified-Since")}} ãŸã㯠{{HTTPHeader("If-Match")}} ããããŒã«æ€èšŒåã®å€ãæå®ãã<em>æ¡ä»¶ä»ããªã¯ãšã¹ã</em>ãçºè¡ããŸãã</p> + +<p>ãªãœãŒã¹ãå€æŽãããŠããªããã°ããµãŒããŒã¯ {{HTTPStatus("304")}} <code>Not Modified</code> ã¬ã¹ãã³ã¹ãè¿ããŸããããã¯ãã£ãã·ã¥ãåã³æ°é®®ãªç¶æ
ã«ããŠãã¯ã©ã€ã¢ã³ãã¯ãã£ãã·ã¥ããããªãœãŒã¹ã䜿çšããŸããããã¯ãªãœãŒã¹ãããããæ¶è²»ããã¬ã¹ãã³ã¹ãšãªã¯ãšã¹ãã®ããåããçºçããŸãããé信網ã§ãªãœãŒã¹å
šäœãå床転éãããããå¹ççã§ãã</p> + +<p><img alt="With a stale cache, the conditional request is sent. The server can determine if the resource changed, and, as in this case, decide not to send it again as it is the same." src="https://mdn.mozillademos.org/files/13731/HTTPCache2.png" style="height: 265px; width: 741px;"></p> + +<p>ãªãœãŒã¹ãå€æŽãããå Žåã¯ããµãŒããŒã¯æ¡ä»¶ä»ãã§ã¯ãªããªã¯ãšã¹ããšåæ§ã« {{HTTPStatus("200")}}<code> OK</code> ã¬ã¹ãã³ã¹ã§æ°ããããŒãžã§ã³ã®ãªãœãŒã¹ãéä¿¡ããŸãããããŠãã¯ã©ã€ã¢ã³ãã¯æ°ãããªãœãŒã¹ã䜿çšããŸã (ãŸããããããã£ãã·ã¥ããŸã)ã</p> + +<p><img alt="In the case where the resource was changed, it is sent back as if the request wasn't conditional." src="https://mdn.mozillademos.org/files/13733/HTTPCache3.png"></p> + +<p>ãµãŒããŒåŽã§æ€èšŒåãèšå®ããããšããé€ããŠããã®ä»çµã¿ã¯ééçã§ããã©ã®ãã©ãŠã¶ãŒããŠã§ãéçºè
ãç¹å¥ãªäœæ¥ãè¡ãããšãªãããã£ãã·ã¥ã管çããŠãã®ãããªæ¡ä»¶ä»ããªã¯ãšã¹ããéä¿¡ããŸãã</p> + +<h3 id="Integrity_of_a_partial_download" name="Integrity_of_a_partial_download">éšåããŠã³ããŒãã®æŽåæ§</h3> + +<p>ãã¡ã€ã«ã®éšåããŠã³ããŒãã¯ã以åã®æäœãåéããããšãå¯èœãª HTTP ã®æ©èœã§ããããã§ã«ååŸæžã¿ã®æ
å ±ãä¿æããããšã«ãã£ãŠåž¯åãæéãç¯çŽããŸãã</p> + +<p><img alt="A download has been stopped and only partial content has been retrieved." src="https://mdn.mozillademos.org/files/16190/HTTPResume1.png" style="height: 397px; width: 764px;"></p> + +<p>éšåããŠã³ããŒãããµããŒããããµãŒããŒã¯ã{{HTTPHeader("Accept-Ranges")}} ããããŒãéä¿¡ããŠãã®ããšãç¥ãããŸãããã®ããããŒãéä¿¡ããããšãã¯ã©ã€ã¢ã³ã㯠{{HTTPHeader("Ranges")}} ããããŒã§æ¬ èœããŠããç¯å²ãéä¿¡ããããšã§ãããŠã³ããŒããåéã§ããŸãã</p> + +<p><img alt="The client resumes the requests by indicating the range he needs and preconditions checking the validators of the partially obtained request." src="https://mdn.mozillademos.org/files/13737/HTTPResume2.png"></p> + +<p>ãã®åçã¯ã·ã³ãã«ã§ãããæœåšçãªåé¡ãã²ãšã€ãããŸãã2 åã®ããŠã³ããŒãã®éã«ãªãœãŒã¹ãå€æŽããããšãååŸããç¯å²ã 2 ã€ã®ç°ãªãããŒãžã§ã³ã®ãªãœãŒã¹ã«å¯Ÿå¿ããŠããŸããæçµçãªææžãå£ããŠããŸãã§ãããã</p> + +<p>ãããé²ããããæ¡ä»¶ä»ããªã¯ãšã¹ãã䜿çšããŸããç¯å²ã«ã€ããŠãããè¡ãããã®æ¹æ³ã 2 ã€ãããŸããããæè»ãªæ¹æ³ã¯ {{HTTPHeader("If-Modified-Since")}} ãš {{HTTPHeader("If-Match")}} ã䜿çšããããšã§ãããåææ¡ä»¶ã«åããªãå Žåã¯ãµãŒããŒããšã©ãŒãè¿ããŸãããããšãã¯ã©ã€ã¢ã³ãã¯ããŠã³ããŒããå§ãããåå®è¡ããŸãã</p> + +<p><img alt="When the partially downloaded resource has been modified, the preconditions will fail and the resource will have to be downloaded again completely." src="https://mdn.mozillademos.org/files/13739/HTTPResume3.png"></p> + +<p>ãã®æ¹æ³ã§ãåäœããŸãããææžãå€æŽããããšäœåãªã¬ã¹ãã³ã¹ããªã¯ãšã¹ãã®äº€æãçºçããŸããããã¯ããã©ãŒãã³ã¹ãäœäžãããŸãã®ã§ HTTP ã«ã¯ããã®åé¡ãé¿ããããã«ç¹åããè¿œå ããããŒã§ãã {{HTTPHeader("If-Range")}} ããããŸãã</p> + +<p><img alt="The If-Range headers allows the server to directly send back the complete resource if it has been modified, no need to send a 412 error and wait for the client to re-initiate the download." src="https://mdn.mozillademos.org/files/13741/HTTPResume4.png" style="height: 263px; width: 770px;"></p> + +<p>ãã®è§£æ±ºçã¯ããå¹ççã§ãããæè»æ§ãè¥å¹²å£ããŸã (æ¡ä»¶ã§ etag ãã²ãšã€ãã䜿çšã§ããŸãã)ããã ãããã以äžã®æè»æ§ã¯ã»ãšãã©å¿
èŠãããŸããã</p> + +<h3 id="Avoiding_the_lost_update_problem_with_optimistic_locking" name="Avoiding_the_lost_update_problem_with_optimistic_locking">楜芳çããã¯ã§ãã¹ãã¢ããããŒããé¿ãã</h3> + +<p>ãªã¢ãŒãã®ææžã®<em>æŽæ°</em>ã¯ããŠã§ãã¢ããªã±ãŒã·ã§ã³ã§äžè¬çãªæäœã§ããããã¯ãã¡ã€ã«ã·ã¹ãã ããœãŒã¹ç®¡çã¢ããªã±ãŒã·ã§ã³ã§ã¯ããäžè¬çã§ããããªã¢ãŒãã«ãªãœãŒã¹ãä¿åã§ããããã«ããã«ã¯ãã®ãããªä»çµã¿ãå¿
èŠã§ããåæ§ã«ãwiki ã®ãããªäžè¬çãªãŠã§ããµã€ããä»ã® CMS ã§ãå¿
èŠã§ãã</p> + +<p>{{HTTPMethod("PUT")}} ã䜿çšããŠããã®æ©èœãå®è£
ã§ããŸããã¯ã©ã€ã¢ã³ãã¯å§ãã«å
ã®ãã¡ã€ã«ãèªã¿èŸŒãã§ãå€æŽããåŸã«ãµãŒããŒãžéä¿¡ããŸãã</p> + +<p><img alt="Updating a file with a PUT is very simple when concurrency is not involved." src="https://mdn.mozillademos.org/files/13743/HTTPLock1.png"></p> + +<p>æ®å¿µãªããã䞊è¡åŠçãèæ
®ãããšè¥å¹²ã®ééããåºãŠããŸããããã¯ã©ã€ã¢ã³ãããªãœãŒã¹ã®æ°ããªè€è£œãããŒã«ã«ã§å€æŽããŠããéã«ã第äºã®ã¯ã©ã€ã¢ã³ããåããªãœãŒã¹ãååŸããŠãã¯ã©ã€ã¢ã³ãåŽã§åãããšãè¡ããŸããããã«ããããšãŠãäžå¹žãªããšãçºçããŸããäž¡è
ããªãœãŒã¹ãåŒãæž¡ããšãæåã®ã¯ã©ã€ã¢ã³ããæž¡ããå€æŽç¹ã次ã«æž¡ããããã®ã«ãã£ãŠç Žæ£ãããŠã第äºã®ã¯ã©ã€ã¢ã³ãã¯æ°ããªå€æŽç¹ã«æ°ã¥ããŸããã誰ãåã¡åã£ããã®çµæã¯ä»è
ã«ã¯äŒãããŸããããã©ã®ã¯ã©ã€ã¢ã³ãã®å€æŽç¹ãåæ ããããã¯åŒãæž¡ãé床ã«ãã£ãŠå€ãããŸãããŸããã®é床ã¯ã¯ã©ã€ã¢ã³ãããµãŒããŒã®ããã©ãŒãã³ã¹ãããã«ã¯ã¯ã©ã€ã¢ã³ãåŽã§äººéãææžãç·šéããããã©ãŒãã³ã¹ã«äŸåããŸããåã¡åãè
ã¯ããã®æã
ã§å€ãããŸããããã¯{{glossary("race condition","競åç¶æ
")}}ã§ãããæ€åºããããã°ãé£ããäžç¢ºããªåäœããããããŸãã</p> + +<p><img alt="When several clients update the same resource in parallel, we are facing a race condition: the slowest win, and the others don't even know they lost. Problematic!" src="https://mdn.mozillademos.org/files/13749/HTTPLock2.png" style="height: 504px; width: 904px;"></p> + +<p>2 ã€ã®ã¯ã©ã€ã¢ã³ãã®çæ¹ãå°ãããããšãªãããã®åé¡ã«å¯ŸåŠããæ¹æ³ã¯ãããŸããããããããã¹ãã¢ããããŒãã競åç¶æ
ã¯é¿ããã¹ãã§ããäºæž¬å¯èœãªçµæããã¯ã©ã€ã¢ã³ããå€æŽç¹ãåŽäžããããšãã«éç¥ãåããããšãæã¿ãŸãã</p> + +<p>æ¡ä»¶ä»ããªã¯ãšã¹ãã§ã<em>楜芳çããã¯ã¢ã«ãŽãªãºã </em> (ã»ãšãã©ã® wiki ããœãŒã¹ç®¡çã·ã¹ãã ã§äœ¿çšãããŠããŸã) ãå®è£
ã§ããŸãããã®èãæ¹ã§ã¯ãã¹ãŠã®ã¯ã©ã€ã¢ã³ãã«ããªãœãŒã¹ã®è€è£œã®ååŸãèš±å¯ããŠããŒã«ã«ã§å€æŽããããšãèš±å¯ããŸãããããŠãæåã®ã¯ã©ã€ã¢ã³ããæŽæ°å
容ãéä¿¡ããããšãèš±å¯ããŠæåãããŠã以éã®å€ãããŒãžã§ã³ã«ãªã£ããªãœãŒã¹ã«åºã¥ãæŽæ°ã¯æåŠããŸãã</p> + +<p><img alt="Conditional requests allow to implement optimistic locking: now the quickest wins, and the others get an error." src="https://mdn.mozillademos.org/files/13751/HTTPLock3.png" style="height: 471px; width: 904px;"></p> + +<p>ãã㯠{{HTTPHeader("If-Match")}} ããã³ {{HTTPHeader("If-Unmodified-Since")}} ããããŒã䜿çšããŠå®è£
ããŸããetag ãå
ã®ãã¡ã€ã«ãšäžèŽããªãããããã¯ãã¡ã€ã«ãååŸãããšãããå€æŽãããŠããå Žåã¯ãå€æŽç¹ã {{HTTPStatus("412")}} <code>Precondition Failed</code> ãšã©ãŒã§æåŠãããŸãããã®ãšã©ãŒãžã®å¯ŸåŠã¯ã¯ã©ã€ã¢ã³ã次第ã§ãããä»åºŠã¯ææ°ã®ããŒãžã§ã³ã§åã³å®è¡ãããã人éã«éç¥ãããããã㯠"diff" ã衚瀺ããŠå€æŽç¹ãç¶æãããã人éãéžæã§ããããã«æ¯æŽããŸãã</p> + +<h3 id="Dealing_with_the_first_upload_of_a_resource" name="Dealing_with_the_first_upload_of_a_resource">ãªãœãŒã¹ã®æåã®ã¢ããããŒãã«å¯ŸåŠãã</h3> + +<p>ãªãœãŒã¹ã®æåã®ã¢ããããŒãã¯ãåè¿°ã®ç¶æ³ã®ç¹å¥ãªã±ãŒã¹ã§ãããªãœãŒã¹ã®æŽæ°ãšåæ§ã«ã2 ã€ã®ã¯ã©ã€ã¢ã³ããåæ (ãããã¯ã»ãŒåæ) ã«ã¢ããããŒãããããšãã競åç¶æ
ãä»®å®ããŸãããããé²ãããã«æ¡ä»¶ä»ããªã¯ãšã¹ãã䜿çšã§ããŸãããã¹ãŠã® etag ãè¡šãç¹å¥ãªå€ <code>'*'</code> ãæ〠{{HTTPHeader("If-None-Match")}} ãè¿œå ããããšã§ãããããåã®ãªã¯ãšã¹ããååšããªãå Žåã«éãããªã¯ãšã¹ããæåããŸãã</p> + +<p><img alt="Like for a regular upload, the first upload of a resource is subject to a race condition: If-None-Match can prevent it." src="https://mdn.mozillademos.org/files/13753/HTTPFirst.png" style="height: 311px; width: 895px;"></p> + +<p><code>If-None-Match</code> 㯠HTTP/1.1 (ããã³ãã以é) ã«æºæ ãããµãŒããŒã®ã¿ã§åäœããŸãããµãŒããŒã察å¿ããŠããããäžæã§ããå Žåã¯ãå§ãã«ç¢ºèªçšã® {{HTTPMethod("HEAD")}} ãªã¯ãšã¹ãããªãœãŒã¹ã«å¯ŸããŠçºè¡ããªããã°ãªããŸããã</p> + +<h2 id="Conclusion" name="Conclusion">ãŸãšã</h2> + +<p>æ¡ä»¶ä»ããªã¯ãšã¹ã㯠HTTP ã®éèŠãªæ©èœã§ãããå¹ççã§è€éãªã¢ããªã±ãŒã·ã§ã³ã®æ§ç¯ãå¯èœã«ããŸãããã£ãã·ã¥ãããŠã³ããŒãã®åéã«ã€ããŠããŠã§ããã¹ã¿ãŒã«æ±ããããäœæ¥ã¯ãµãŒããŒãé©åã«èšå®ããããšã ãã§ã (äžéšã®ç°å¢ã§ã¯æ£ãã etag ãèšå®ããããšãé£ãããããããŸãã)ããŸãããã©ãŠã¶ãŒãé©åãªæ¡ä»¶ä»ããªã¯ãšã¹ããå®è¡ããŸãã®ã§ããŠã§ãéçºè
ã«æ±ããããäœæ¥ã¯ãããŸãã</p> + +<p>äžæ¹ãããã¯ã®ä»çµã¿ã§ã¯ããŠã§ãéçºè
ãé©åãªããããŒã䌎ã£ãŠãªã¯ãšã¹ããçºè¡ããªããã°ãªããŸããããŠã§ããã¹ã¿ãŒã¯ã»ãšãã©ã®å Žåããããã®ç¢ºèªãã¢ããªã±ãŒã·ã§ã³ã«é Œãããšãã§ããã§ãããã</p> + +<p>ã©ã¡ãã«ãããæ¡ä»¶ä»ããªã¯ãšã¹ãã¯ãŠã§ãã®éèŠãªæ©èœã§ããããšã¯æããã§ãã</p> diff --git a/files/ja/web/http/configuring_servers_for_ogg_media/index.html b/files/ja/web/http/configuring_servers_for_ogg_media/index.html new file mode 100644 index 0000000000..1e787342bf --- /dev/null +++ b/files/ja/web/http/configuring_servers_for_ogg_media/index.html @@ -0,0 +1,116 @@ +--- +title: Ogg ã¡ãã£ã¢çšã®ãµãŒããŒã®èšå® +slug: Web/HTTP/Configuring_servers_for_Ogg_media +tags: + - Audio + - Media + - Ogg + - Video +translation_of: Web/HTTP/Configuring_servers_for_Ogg_media +--- +<p>{{HTTPSidebar}}</p> + +<p class="summary">HTML {{HTMLElement("audio")}} èŠçŽ ãš {{HTMLElement("video")}} èŠçŽ ã䜿çšãããšããŠãŒã¶ãŒã¯ãã©ã°ã€ã³ããã®ä»ã®ãœãããŠã§ã¢ãã€ã³ã¹ããŒã«ããå¿
èŠãªãã¡ãã£ã¢ã衚瀺ã§ããŸãããµãŒããŒã Ogg ã¡ãã£ã¢ãæ£ããé
ä¿¡ããããã«ã¯ãããã€ãèšå®ãå¿
èŠãªå ŽåããããŸãã</p> + +<h2 id="æ£ãã_MIME_ã¿ã€ãã®_Ogg_ã¡ãã£ã¢ãæäŸãã">æ£ãã MIME ã¿ã€ãã® Ogg ã¡ãã£ã¢ãæäŸãã</h2> + +<p>*.ogg and *.ogv files containing video (possibly with an audio track as well, of course), should be served with the <code>video/ogg</code> MIME type. *.oga and *.ogg files containing only audio should be served with the <code>audio/ogg</code> MIME type.</p> + +<p>If you don't know whether the Ogg file contains audio or video, you can serve it with the MIME type application/ogg, and Gecko will treat it as a video file.</p> + +<p>Most servers don't by default serve Ogg media with the correct MIME types, so you'll likely need to add the appropriate configuration for this.</p> + +<p>For Apache, you can add the following to your configuration:</p> + +<pre>AddType audio/ogg .oga +AddType video/ogg .ogv +AddType application/ogg .ogg +</pre> + +<h2 id="HTTP_1.1_byte_range_requests_ãæ£ããåŠçãã">HTTP 1.1 byte range requests ãæ£ããåŠçãã</h2> + +<p>In order to support seeking and playing back regions of the media that aren't yet downloaded, Gecko uses HTTP 1.1 byte-range requests to retrieve the media from the seek target position. In addition, Gecko uses byte-range requests to seek to the end of the media (assuming you serve the {{HTTPHeader("Content-Length")}} header) in order to determine the duration of the media.</p> + +<p>Your server should accept the {{HTTPHeader("Accept-Ranges")}}<code>: bytes</code> HTTP header if it can accept byte-range requests. It must return {{HTTPStatus("206")}}<code>: Partial content</code> to all byte range requests; otherwise, browsers can't be sure you actually support byte range requests.</p> + +<p>Your server must also return "<code>206: Partial Content</code>" for the request "<code>Range: bytes=0-</code>" as well.</p> + +<h2 id="éåžžã®ããŒãã¬ãŒã ãå«ãã">éåžžã®ããŒãã¬ãŒã ãå«ãã</h2> + +<p>When Gecko seeks through Ogg media to a specified time, it has to seek to the nearest key frame before the seek target, then download and decode the video from there until the requested target time. The farther apart your key frames are, the longer this takes, so it's helpful to include key frames at regular intervals.</p> + +<p>By default, <a class="external" href="http://v2v.cc/~j/ffmpeg2theora/"><code>ffmpeg2theora</code></a> uses one key frame every 64 frames (or about every 2 seconds at 30 frames per second), which works pretty well.</p> + +<div class="note"><strong>Note:</strong> Of course, the more key frames you use, the larger your video file is, so you may need to experiment a bit to get the right balance between file size and seek performance.</div> + +<h2 id="preload_å±æ§ã®äœ¿çšãæ€èšãã">preload å±æ§ã®äœ¿çšãæ€èšãã</h2> + +<p>The HTML {{HTMLElement("audio")}} and {{HTMLElement("video")}} elements provide the <code>preload</code> attribute, which tells Gecko to attempt to download the entire media when the page loads. Without <code>preload</code>, Gecko only downloads enough of the media to display the first video frame, and to determine the media's duration.</p> + +<p><code>preload</code> is off by default, so if getting to video is the point of your web page, your users may appreciate it if you include <code>preload</code> in your video elements.</p> + +<h2 id="å€ãããŒãžã§ã³ã®_Firefox_ã®èšå®">å€ãããŒãžã§ã³ã® Firefox ã®èšå®</h2> + +<h3 id="Serve_X-Content-Duration_headers">Serve X-Content-Duration headers</h3> + +<div class="note"> +<p><strong>Note</strong>: As of <a href="/en-US/Firefox/Releases/41">Firefox 41</a>, the <code>X-Content-Duration</code> header is no longer supported. See {{Bug(1160695)}} for more details.</p> +</div> + +<p>The Ogg format doesn't encapsulate the duration of media, so for the progress bar on the video controls to display the duration of the video, Gecko needs to determine the length of the media using other means.</p> + +<p>There are two ways Gecko can do this. The best way is to offer an <code>X-Content-Duration</code> header when serving Ogg media files. This header provides the duration of the video in seconds (<strong>not</strong> in HH:MM:SS format) as a floating-point value.</p> + +<p>For example, if the video is 1 minute and 32.6 seconds long, this header would be:</p> + +<pre>X-Content-Duration: 92.6 +</pre> + +<p>If your server provides the <code>X-Content-Duration</code> header when serving Ogg media, Gecko doesn't have to do any extra HTTP requests to seek to the end of the file to calculate its duration. This makes the entire process much more efficient as well as more accurate.</p> + +<p>As an inferior alternative, Gecko can estimate the video length based on the Content-Length. See next point.</p> + +<h3 id="Don't_use_gzipdeflate_compression">Don't use gzip/deflate compression</h3> + +<p>One common way to reduce the load on a web server is to use <a class="external" href="http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/">gzip or deflate compression</a> when serving to a supporting web browser. When Firefox requests an Ogg media, it advertises that it can handle a gzipped or deflated response; the HTTP request includes the <code>Accept-Encoding: gzip,deflate</code> header. But despite Firefox advertising that it supports gzip/deflate, you probably don't want to gzip or deflate Ogg media. If you serve an Ogg media compressed, Firefox won't be able to seek in the media, or determine its duration. Since the video/audio data in Ogg files is already compressed, gzip/deflate won't actually save you much bandwidth anyway, so you probably want to disable compression when serving Ogg files.</p> + +<p>Also, Apache servers don't send the Content-Length response header if gzip encoding is used.</p> + +<div class="note"> +<p><strong>Note:</strong> Starting in {{Gecko("2.0") }}, Gecko will no longer request gzip or deflate compression when downloading media. The above is only relevant for Firefox 3.5/3.6.</p> +</div> + +<h3 id="Getting_the_duration_of_Ogg_media">Getting the duration of Ogg media</h3> + +<p>You can use the <code>oggz-info</code> tool to get the media duration; this tool is included with the <a class="external" href="http://www.xiph.org/oggz/"><code>oggz-tools</code></a> package. The output from <code>oggz-info</code> looks like this:</p> + +<pre> $ oggz-info /g/media/bruce_vs_ironman.ogv + Content-Duration: 00:01:00.046 + + Skeleton: serialno 1976223438 + 4 packets in 3 pages, 1.3 packets/page, 27.508% Ogg overhead + Presentation-Time: 0.000 + Basetime: 0.000 + + Theora: serialno 0170995062 + 1790 packets in 1068 pages, 1.7 packets/page, 1.049% Ogg overhead + Video-Framerate: 29.983 fps + Video-Width: 640 + Video-Height: 360 + + Vorbis: serialno 0708996688 + 4531 packets in 167 pages, 27.1 packets/page, 1.408% Ogg overhead + Audio-Samplerate: 44100 Hz + Audio-Channels: 2 +</pre> + +<p>Note that you can't simply serve up the reported Content-Duration line reported by <code>oggz-info</code>, because it's reported in HH:MM:SS format. You'll need to convert it to seconds only, then serve that as your <code>X-Content-Duration</code> value. Just parse out the HH, MM, and SS into numbers, then do (HH*3600)+(MM*60)+SS to get the value you should report.</p> + +<p>It's important to note that it appears that <code>oggz-info</code> makes a read pass of the media in order to calculate its duration, so it's a good idea to store the duration value in order to avoid lengthy delays while the value is calculated for every HTTP request of your Ogg media.</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/en-US/docs/Learn/HTML/Multimedia_and_embedding/Video_and_audio_content">Video and audio content</a></li> + <li><a href="/en-US/docs/Web/HTML/Supported_media_formats">Media formats supported by the audio and video elements</a></li> +</ul> diff --git a/files/ja/web/http/connection_management_in_http_1.x/index.html b/files/ja/web/http/connection_management_in_http_1.x/index.html new file mode 100644 index 0000000000..c85e10de12 --- /dev/null +++ b/files/ja/web/http/connection_management_in_http_1.x/index.html @@ -0,0 +1,93 @@ +--- +title: HTTP/1.x ã®ã³ãã¯ã·ã§ã³ç®¡ç +slug: Web/HTTP/Connection_management_in_HTTP_1.x +tags: + - Connection Management + - Guide + - HTTP + - Networking + - Performance + - WebMechanics +translation_of: Web/HTTP/Connection_management_in_HTTP_1.x +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary">ã³ãã¯ã·ã§ã³ç®¡çã¯ã HTTP ã®éèŠãªãããã¯ã§ããã³ãã¯ã·ã§ã³ãéããã管çãããããããšã¯ããŠã§ããµã€ãããŠã§ãã¢ããªã±ãŒã·ã§ã³ã®ããã©ãŒãã³ã¹ã«å€§ããªåœ±é¿ãäžããŸããHTTP/1.x ã§ã¯<em><ruby>çåœãª<rp> (</rp><rt>short-lived</rt><rp>) </rp></ruby>ã³ãã¯ã·ã§ã³</em>ã<em><ruby>æç¶çãª<rp> (</rp><rt>persistent</rt><rp>) </rp>ã³ãã¯ã·ã§ã³</ruby></em>ã<em>HTTP ãã€ãã©ã€ã³</em>ãšãã£ãã¢ãã«ããããŸãã</p> + +<p>HTTP ã¯ãã¯ã©ã€ã¢ã³ããšãµãŒããŒã®éã®ã³ãã¯ã·ã§ã³ãæäŸãããã©ã³ã¹ããŒããããã³ã«ãããããŠã TCP ã«äŸåããŠããŸããåæã®ããã HTTP ã䜿çšããã³ãã¯ã·ã§ã³ã®å¶åŸ¡ã¢ãã«ã¯ 1 çš®é¡ã§ããããããã®ã³ãã¯ã·ã§ã³ã¯çåœã§ãããªã¯ãšã¹ãã®éä¿¡ãå¿
èŠã«ãªããã³ã«æ°ããªã³ãã¯ã·ã§ã³ãäœæããŠãåçãåãåããšã³ãã¯ã·ã§ã³ãéããŠããŸããã</p> + +<p>ãã®ã·ã³ãã«ãªã¢ãã«ã¯ãå
倩çãªããã©ãŒãã³ã¹ã®å¶çŽãæ±ããŠããŸãããããããã® TCP ã³ãã¯ã·ã§ã³ãéãåŠçã¯ããªãœãŒã¹ãæ¶è²»ããŸããããã€ãã®ã¡ãã»ãŒãžããã¯ã©ã€ã¢ã³ããšãµãŒããŒã®éã§äº€æããªããã°ãªããŸããããªã¯ãšã¹ãã®éä¿¡ãå¿
èŠã«ãªããšããããã¯ãŒã¯ã®é
延ã垯åãããã©ãŒãã³ã¹ã«åœ±é¿ãäžããŸããçŸä»£ã®ãŠã§ãããŒãžã¯ãå¿
èŠãªæ
å ±ãæäŸããããã«å€ãã®ãªã¯ãšã¹ã (1 ããŒã¹ä»¥äž) ãå¿
èŠãšããŠãããåæã®ã¢ãã«ãéå¹çã§ããããšãå®èšŒããŠããŸãã</p> + +<p>HTTP/1.1 ã§ãæ°ããªã¢ãã«ã 2 çš®é¡å°å
¥ããŸãããæç¶çãªã³ãã¯ã·ã§ã³ã¢ãã«ã¯ãé£ç¶ãããªã¯ãšã¹ãã®éã¯ã³ãã¯ã·ã§ã³ãéãç¶ããŠããããšã§ãæ°ããªã³ãã¯ã·ã§ã³ãéå§ããããã«å¿
èŠãªæéãåæžããŸãã HTTP ãã€ãã©ã€ã³ã¢ãã«ã¯ããã« 1 æ©é²ãã§ãåçãåŸ
ã£ãŠããéãè€æ°ã®é£ç¶ãããªã¯ãšã¹ããéä¿¡ããŠããããã¯ãŒã¯ã®é
延ã®å€§éšåãåæžããŸãã</p> + +<p><img alt="HTTP/1.x ã®3ã€ã®ã³ãã¯ã·ã§ã³ã¢ãã«ã«ãããããã©ãŒãã³ã¹ã®æ¯èŒ: çåœãªã³ãã¯ã·ã§ã³ãæç¶çãªã³ãã¯ã·ã§ã³ã HTTP ãã€ãã©ã€ã³" src="https://mdn.mozillademos.org/files/13727/HTTP1_x_Connections.png" style="height: 538px; width: 813px;"></p> + +<div class="note"> +<p>HTTP/2 ã§ã¯ãã³ãã¯ã·ã§ã³ã®ç®¡çã¢ãã«ãããã«è¿œå ããŸããã</p> +</div> + +<p>ç¹çãã¹ãéèŠãªãã€ã³ããšããŠã HTTP ã®ã³ãã¯ã·ã§ã³ç®¡çã¯é£æ¥ããããŒãã®éã®ã³ãã¯ã·ã§ã³ãããªãã¡<a href="/ja/docs/Web/HTTP/Headers#e2e">ãšã³ãããŒãšã³ã</a>ã§ã¯ãªã<a href="/ja/docs/Web/HTTP/Headers#hbh">ããããã€ããã</a>ã«é©çšãããããšããããŸããã¯ã©ã€ã¢ã³ããšæåã®ãããã·ã®éã§äœ¿çšããã¢ãã«ãšããããã·ãšå®å
ãµãŒã㌠(ãŸãã¯ä»»æã®äžéãããã·) ã®éã§äœ¿çšããã¢ãã«ãç°ãªãããšããããŸãã{{HTTPHeader("Connection")}} ã {{HTTPHeader("Keep-Alive")}} ãšãã£ãã³ãã¯ã·ã§ã³ã¢ãã«ã®å®çŸ©ã«ãããã HTTP ããããŒã¯ãäžéã®ããŒããå€ãå€æŽã§ãã <a href="/ja/docs/Web/HTTP/Headers#hbh">ããããã€ããã</a> ããããŒã§ãã</p> + +<p>é¢é£ãããããã¯ãšããŠã¯ã HTTP ã³ãã¯ã·ã§ã³ã®ã¢ããã°ã¬ãŒãã®æŠå¿µãã€ãŸã HTTP/1.1 ã³ãã¯ã·ã§ã³ã TLS/1.0ã WebSocketã åã¯å¹³æã® HTTP/2 ã®ãããªç°ãªããããã³ã«ã«ã¢ããã°ã¬ãŒããããããšãæããããŸãããã®<a href="/docs/Web/HTTP/Protocol_upgrade_mechanism">ãããã³ã«ã®ã¢ããã°ã¬ãŒãã¡ã«ããºã </a>ã¯ä»ã®å Žæã§ãã£ãšè©³ããææžåãããŠããŸãã</p> + +<h2 id="Short-lived_connections" name="Short-lived_connections">çåœãªã³ãã¯ã·ã§ã³</h2> + +<p><em>çåœãªã³ãã¯ã·ã§ã³</em>㯠HTTP ã®åæã®ã¢ãã«ã§ããã HTTP/1.0 ã®æ¢å®ã®ã¢ãã«ã§ããããããã® HTTP ãªã¯ãšã¹ãã¯ãèªèº«ã®ã³ãã¯ã·ã§ã³ã§å®çµããŸããããªãã¡ãå HTTP ãªã¯ãšã¹ãã®åã« TCP ã®ãã³ãã·ã§ã€ã¯ãçºçããŸãããŸããããããé£ç¶ããŸãã</p> + +<p>TCP ã®ãã³ãã·ã§ã€ã¯èªäœã¯æéããããåŠçã§ããã TCP ã®ã³ãã¯ã·ã§ã³ã¯ãã®è² è·ã«é©å¿ããŠãããããæç¶ããã³ãã¯ã·ã§ã³ã«ãã£ãŠå¹çãåäžããŸããçåœãªã³ãã¯ã·ã§ã³ã¯ TCP ã®å¹çåæ©èœã䜿çšããŠãããããŸãæ°ããªã³ãŒã«ãç¶æ
ã®ã³ãã¯ã·ã§ã³ã§éä¿¡ããããšã«åºå·ããããæé©ãªç¶æ
ãããããã©ãŒãã³ã¹ãäœäžããŸãã</p> + +<p>ãã®ã¢ãã«ã¯ HTTP/1.0 ã§äœ¿çšããæ¢å®ã®ã¢ãã«ã§ã ({{HTTPHeader("Connection")}} ããããŒãååšããªãããããã¯ããããŒã®å€ã <code>close</code> ã§ããå Žå)ã HTTP/1.1 ã§ã¯ã {{HTTPHeader("Connection")}} ããããŒã§ <code>close</code> ã®å€ãéä¿¡ãããå Žåã«éãããã®ã¢ãã«ã䜿çšããŸãã</p> + +<div class="note"> +<p>ãšãŠãå€ã (æç¶çãªã³ãã¯ã·ã§ã³ããµããŒãããŠããªã) ã·ã¹ãã ãæ±ãå Žåãé€ãããããŠãã®ã¢ãã«ã䜿çšããçç±ã¯ãããŸããã</p> +</div> + +<h2 id="Persistent_connections" name="Persistent_connections">æç¶çãªã³ãã¯ã·ã§ã³</h2> + +<p>çåœãªã³ãã¯ã·ã§ã³ã«ã¯ã倧ããªåé¡ç¹ã 2 ã€ãããŸããæ°ããã³ãã¯ã·ã§ã³ã確ç«ããããã«ããªãæéããããããšãããã³äžå±€ã® TCP ã³ãã¯ã·ã§ã³ã¯äœåºŠã䜿çšãããšã (ãŠã©ãŒã ç¶æ
ã®ã³ãã¯ã·ã§ã³) ããããã©ãŒãã³ã¹ãåäžããªãããšã§ãããããã®åé¡ãç·©åããããã HTTP/1.1 ããåãã<em>æç¶çãªã³ãã¯ã·ã§ã³</em>ã®æŠå¿µãèããããŠããŸããããããã¯ã<em>ããŒãã¢ã©ã€ãæ¥ç¶</em>ãšåŒã°ããããšããããŸãã</p> + +<p>æç¶çãªã³ãã¯ã·ã§ã³ã¯ãã°ããã®ééããããŸãŸã§ãããããã€ãã®ãªã¯ãšã¹ãã§å䜿çšã§ããŸãããã£ãŠæ°ã㪠TCP ãã³ãã·ã§ã€ã¯ã«ãããæéãç¯çŽããŠã TCP ã®ããã©ãŒãã³ã¹åäžæ©èœã掻çšããŸãããã®ã³ãã¯ã·ã§ã³ã¯ãã€ãŸã§ãéããããŸãŸã«ã¯ãªããŸãããã¢ã€ãã«ç¶æ
ã®ã³ãã¯ã·ã§ã³ã¯ãã°ããåŸã«éããããŸã (ãµãŒããŒã¯ãã³ãã¯ã·ã§ã³ãéãç¶ããŠããã¹ãæå°æéã決ããããã« {{HTTPHeader("Keep-Alive")}} ããããŒã䜿çšããã§ããã)ã</p> + +<p>æç¶çãªæ¥ç¶ã«ã¯æ¬ ç¹ããããŸããã¢ã€ãã«ç¶æ
ã§ããµãŒããŒã®ãªãœãŒã¹ãæ¶è²»ããŠãããé«è² è·ç¶æ
ã§ã¯ {{glossary("DoS attack", "DoS æ»æ")}} ãæãå¯èœæ§ããããŸãããã®å Žåãæç¶çã§ã¯ãªãæ¥ç¶ã¯ã¢ã€ãã«ç¶æ
ã«ãªããšããã«éããããŸãã®ã§ãããã©ãŒãã³ã¹ãåäžããã§ãããã</p> + +<p>HTTP/1.0 ã®æ¢å®ã®ã³ãã¯ã·ã§ã³ã¯ãæç¶çã§ã¯ãããŸããã {{HTTPHeader("Connection")}} ã <code>close</code> 以å€ã®äœããé垞㯠<code>retry-after</code> ã«èšå®ãããšãæç¶çã«ãªããŸãã</p> + +<p>HTTP/1.1 ã§ã¯æ¢å®ã§æç¶çã§ãããããããŒã¯äžèŠã«ãªããŸãã (ãã ã HTTP/1.0 ãžã®ãã©ãŒã«ããã¯ãå¿
èŠãªå Žåã®é²è¡çãšããŠãéåžžã¯ããããŒãè¿œå ããŸãã)ã</p> + +<h2 id="HTTP_pipelining" name="HTTP_pipelining">HTTP ãã€ãã©ã€ã³</h2> + +<div class="note"> +<p>HTTP ãã€ãã©ã€ã³ã¯ãçŸä»£ã®ãã©ãŠã¶ãŒã§ã¯æ¢å®ã§æå¹åãããŠããŸããã</p> + +<ul> + <li>äžå
·åããã<a href="https://ja.wikipedia.org/wiki/%E3%83%97%E3%83%AD%E3%82%AD%E3%82%B7">ãããã·</a>ããŸã äžè¬çã§ããããããã¯éçºè
ã容æã«ã¯äºèŠãããã¯èšºæã§ããªããå¥åŠãã€äžå®ããªãæåã®åå ã«ãªããŸãã</li> + <li>ãã€ãã©ã€ã³ã®æ£ããå®è£
ã¯è€éã§ãã転éãããªãœãŒã¹ã®ãµã€ãºãå¹æç㪠<a href="https://ja.wikipedia.org/wiki/%E3%83%A9%E3%82%A6%E3%83%B3%E3%83%89%E3%83%88%E3%83%AA%E3%83%83%E3%83%97%E3%82%BF%E3%82%A4%E3%83%A0">RTT</a> ããã³åž¯åãããã€ãã©ã€ã³ã«ããæ¹åã«å¯ŸããŠçŽæ¥çãªåœ±é¿åãæã¡ãŸããããããããããªããã°ãéèŠãªã¡ãã»ãŒãžãããã§ãªãã¡ãã»ãŒãžããé
ããå ŽåããããŸããéèŠãã®æŠå¿µã¯ãããŒãžã®ã¬ã€ã¢ãŠãäžã«é«ãŸããŸã!ãã£ãŠã HTTP ãã€ãã©ã€ã³ã¯ã»ãšãã©ã®å Žåã§ããããªæ¹åã«ãããªããŸããã</li> + <li>ãã€ãã©ã€ã³ã¯ã <a href="https://en.wikipedia.org/wiki/Head-of-line_blocking">HOL</a> ã®åé¡ã«å·Šå³ãããŸãã</li> +</ul> + +<p>ãããã®çç±ã«ããããã€ãã©ã€ã³ã¯ããããã¢ã«ãŽãªãºã ã§ãã<em>å€éå</em>ã«çœ®ãæããããŸããããã¡ã㯠HTTP/2 ã§äœ¿çšãããŠããŸãã</p> +</div> + +<p>æ¢å®ã§ã<a href="/ja/docs/Web/HTTP" title="HTTP">HTTP</a> ãªã¯ãšã¹ãã¯é 次çºè¡ãããŸãã次ã®ãªã¯ãšã¹ãã¯ãçŸåšã®ãªã¯ãšã¹ãã®ã¬ã¹ãã³ã¹ãå°çããŠããçºè¡ãããŸããããã¯ãããã¯ãŒã¯ã®é
延ã垯åã®å¶çŽãåããããã次ã®ãªã¯ãšã¹ãããµãŒããŒã§<em>èŠãã</em>ããã«ãªããŸã§ã«ããªãã®é
延ãçºçããå¯èœæ§ããããŸãã</p> + +<p>ãã€ãã©ã€ã³ã¯é£ç¶ãããªã¯ãšã¹ããåäžã®æç¶çãªã³ãã¯ã·ã§ã³ã§ãåçãåŸ
ããã«åŠçããŸããããã¯ãã³ãã¯ã·ã§ã³ã®é
延ãåé¿ããŸããçè«äžã¯ã2 ã€ã®ãªã¯ãšã¹ããåã TCP ã¡ãã»ãŒãžã«åããå Žåã§ãããã©ãŒãã³ã¹ãåäžããã§ããããå
žåç㪠<a href="https://ja.wikipedia.org/wiki/%E6%9C%80%E5%A4%A7%E3%82%BB%E3%82%B0%E3%83%A1%E3%83%B3%E3%83%88%E3%82%B5%E3%82%A4%E3%82%BA">MSS</a> (æ倧ã»ã°ã¡ã³ããµã€ãº) ã¯è€æ°ã®ã·ã³ãã«ããªã¯ãšã¹ããåããã«ã¯ååãªå€§ããã§ããã HTTP ãªã¯ãšã¹ãã®ãµã€ãºã®éèŠã¯å¢ãç¶ããŠããŸãã</p> + +<p>ãã€ãã©ã€ã³åã§ããªã HTTP ãªã¯ãšã¹ãããããŸãã {{glossary("idempotent","ã¹ãç")}} ãªã¡ãœããã§ãã {{HTTPMethod("GET")}}, {{HTTPMethod("HEAD")}}, {{HTTPMethod("PUT")}}, {{HTTPMethod("DELETE")}} ã ããå®å
šã«åå®è¡ã§ããŸãããããã¯å€±æããŠãããã€ãã©ã€ã³ã®å
容ãåçŽã«åå®è¡ã§ããŸãã</p> + +<p>çŸåšããã¹ãŠã® HTTP/1.1 ã«æºæ ãããããã·ããµãŒããŒã¯ãã€ãã©ã€ã³ããµããŒãããŠããã¯ãã§ãããå®éã¯å€ãã®å¶éããããŸããããŸããŸãªçç±ã§ãçŸè¡ã®ãã©ãŠã¶ãŒã¯ãã€ãã©ã€ã³ãæ¢å®ã§æå¹åããŠããŸããã</p> + +<h2 id="Domain_sharding" name="Domain_sharding">ãã¡ã€ã³ã·ã£ãŒãã£ã³ã°</h2> + +<div class="note"> +<p>ç¹å¥ã«å¿
èŠã§ããå Žåãé€ãããã®éæšå¥šã®æè¡ã¯äœ¿çšããªãã§ãã ããã代ããã«ã HTTP/2 ã«åãæ¿ããŠãã ããã HTTP/2 ã§ã¯ããã¡ã€ã³ã·ã£ãŒãã£ã³ã°ã¯æçšã§ã¯ãããŸããã HTTP/2 ã®ã³ãã¯ã·ã§ã³ã¯ã䞊è¡ããåªå
床ããªããªã¯ãšã¹ããããäžæã«æ±ãããšãã§ããŸãããŸãããã¡ã€ã³ã·ã£ãŒãã£ã³ã°ã¯ããã©ãŒãã³ã¹ã«æªåœ±é¿ãäžããŸããã»ãšãã©ã® HTTP/2 å®è£
ã§ã¯ãæçµçã«ãã¡ã€ã³ã·ã£ãŒãã£ã³ã°ã«æ»ã <a href="https://daniel.haxx.se/blog/2016/08/18/http2-connection-coalescing/">connection coalescing</a> ãšåŒã°ããæè¡ã䜿çšããŠããŸãã</p> +</div> + +<p>HTTP/1.x ã®ã³ãã¯ã·ã§ã³ã¯ãªã¯ãšã¹ããæŽçãããããšããªãé£ç¶ãããããååãªåž¯åã䜿çšã§ããªãç¶æ³ã§ã¯æé©åã§ããŸããããã®è§£æ±ºçãšããŠããã©ãŠã¶ãŒãŒã¯ããããã®ãã¡ã€ã³ã«å¯ŸããŠè€æ°ã®ã³ãã¯ã·ã§ã³ãéããŠããªã¯ãšã¹ãã䞊è¡ããŠéä¿¡ããŸããæ¢å®ã§ã¯äžåºŠã« 2 ãã 3 ã€ã®ã³ãã¯ã·ã§ã³ã§ãããçŸåšã¯äž»ã« 6 ã€ã®äžŠåããã³ãã¯ã·ã§ã³ãžå¢ããŠããŸãããã®æ°ãããã«å¢ããããšãããšããµãŒããŒåŽã§ <a href="/ja/docs/Glossary/DOS_attack">DoS</a> é²åŸ¡ãçºåããå±éºæ§ããããŸãã</p> + +<p>ãµãŒããŒããŠã§ããµã€ãããŠã§ãã¢ããªã±ãŒã·ã§ã³ã®ã¬ã¹ãã³ã¹ãæ©ããããå Žåãããå€ãã®ã³ãã¯ã·ã§ã³ãéãããããšãèããããŸããäŸãã°ããã¹ãŠã®ãªãœãŒã¹ãåããã¡ã€ã³ <code>www.example.com</code> ã§æã€ã®ã§ã¯ãªãã<code>www1.example.com</code>ã<code>www2.example.com</code>ã<code>www3.example.com</code> ãšãã£ãè€æ°ã®ãã¡ã€ã³ã«åæ£ãããããšãã§ããŸããããããã®ãã¡ã€ã³ã¯<em>åã</em>ãµãŒããŒã«åå解決ãããŠããŠã§ããã©ãŠã¶ãŒãŒã¯ãã¡ã€ã³ããšã« 6 ã€ã®ã³ãã¯ã·ã§ã³ãéããŸã (ãã®äŸã§ã¯ãã³ãã¯ã·ã§ã³æ°ã 18 ã«å¢å ããŸã)ããã®æè¡ã¯<em>ãã¡ã€ã³ã·ã£ãŒãã£ã³ã°</em>ãšåŒã°ããŸãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13783/HTTPSharding.png" style="height: 727px; width: 463px;"></p> + +<h2 id="Conclusion" name="Conclusion">ãŸãšã</h2> + +<p>æ¹è¯ãããã³ãã¯ã·ã§ã³ç®¡çã«ããã HTTP ã®ããã©ãŒãã³ã¹ã倧ããåäžã§ããŸãã HTTP/1.1 ã HTTP/1.0 ã§ã¯ãæç¶çãªã³ãã¯ã·ã§ã³ã䜿çšããŸããå°ãªããšãã³ãã¯ã·ã§ã³ãã¢ã€ãã«ç¶æ
ã«ãªããŸã§ãæè¯ã®ããã©ãŒãã³ã¹ã«ãªããŸããäžæ¹ããã€ãã©ã€ã³ã®å€±æã¯åªããã³ãã¯ã·ã§ã³ç®¡çã¢ãã«ã®èšèšãä¿ãããã㯠HTTP/2 ã«å°å
¥ãããŸããã</p> diff --git a/files/ja/web/http/content_negotiation/index.html b/files/ja/web/http/content_negotiation/index.html new file mode 100644 index 0000000000..ba1f19270e --- /dev/null +++ b/files/ja/web/http/content_negotiation/index.html @@ -0,0 +1,147 @@ +--- +title: ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ +slug: Web/HTTP/Content_negotiation +tags: + - Content Negotiation + - Content Negotiation Reference + - HTTP + - Reference + - ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ +translation_of: Web/HTTP/Content_negotiation +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><a href="/ja/docs/Glossary/HTTP">HTTP</a> ã«ãããŠ<ruby><em><strong>ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</strong></em><rp> (</rp><rt>content negotiation</rt><rp>) </rp></ruby>ã¯ãåã URL ã«ãããããŸããŸãªè¡šçŸã®ãªãœãŒã¹ãæäŸããããã«äœ¿çšããä»çµã¿ã§ããããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ã©ã®ãªãœãŒã¹ããŠãŒã¶ãŒã«ãã£ãšãé©ããŠããã (äŸãã°ã©ã®ææžã®èšèªããã©ã®ç»å圢åŒããã©ã®ã³ã³ãã³ããšã³ã³ãŒãæ¹åŒã) ãæå®ããããšãã§ããŸãã</p> + +<h2 id="Principles_of_content_negotiation" name="Principles_of_content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã®åç</h2> + +<p>ç¹å®ã®ææžã¯<ruby><em>ãªãœãŒã¹</em><rp> (</rp><rt>resource</rt><rp>) </rp></ruby>ãšåŒã°ããŸããã¯ã©ã€ã¢ã³ãããªãœãŒã¹ãååŸããããšãã¯ã URL ã䜿çšããŠãªã¯ãšã¹ãããŸãããµãŒããŒã¯ãã® URL ããæäŸãããã®ãè€æ°ã®å€å圢ããã²ãšã€éžæããããã«äœ¿çšã â ããããã®å€å圢ã¯<ruby><em>è¡šçŸ</em><rp> (</rp><rt>representation</rt><rp>) </rp></ruby>ãšåŒã°ããŸã â ç¹å®ã®è¡šçŸãã¯ã©ã€ã¢ã³ãã«è¿ããŸããããããã®è¡šçŸãå«ããªãœãŒã¹å
šäœãäžã€ã®ç¹å®ã® URL ãæã¡ãŸãããªãœãŒã¹ãåŒã³åºããããšãã«ç¹å®ã®è¡šçŸãéžæããæ¹æ³ã¯<em>ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</em>ã«ãã£ãŠæ±ºããããã¯ã©ã€ã¢ã³ããµãŒããŒã®éã§äº€æžããæ¹æ³ãããã€ããããŸãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13789/HTTPNego.png" style="height: 311px; width: 767px;"></p> + +<p>æé©ãªè¡šçŸã®æ±ºå®ã¯ã以äžã® 2 ã€ã®ä»çµã¿ã®ããããã«ãã£ãŠè¡ãããŸãã</p> + +<ul> + <li>ã¯ã©ã€ã¢ã³ãã«ããç¹å®ã® <a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a> (<em>ãµãŒããŒé§ååããŽã·ãšãŒã·ã§ã³</em> ãŸã㯠<em>ããã¢ã¯ãã£ãããŽã·ãšãŒã·ã§ã³</em>)ãããã¯ãç¹å®ã®çš®é¡ã®ãªãœãŒã¹ã§äº€æžãè¡ãæšæºçãªæ¹æ³ã§ãã</li> + <li>ãµãŒããŒã«ãã {{HTTPStatus("300")}} (Multiple Choices) ãŸã㯠{{HTTPStatus("406")}} (Not Acceptable) <a href="/ja/docs/Web/HTTP/Status">HTTP ã¬ã¹ãã³ã¹ã³ãŒã</a> (<em>ãšãŒãžã§ã³ãé§ååããŽã·ãšãŒã·ã§ã³</em> ãŸã㯠<em>ãªã¢ã¯ãã£ãããŽã·ãšãŒã·ã§ã³</em>)ãããã¯ãã©ãŒã«ããã¯æ©æ§ãšããŠäœ¿çšããŸãã</li> +</ul> + +<p>æ°å¹Žæ¥ã<a href="https://tools.ietf.org/html/rfc2295">ééçã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ (transparent content negotiation)</a> ã <code>Alternates</code> ããããŒãšãã£ãä»ã®ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ãææ¡ãããŠããŸããããããã¯æ¯æãåŸããããç Žæ£ãããŸããã</p> + +<h2 id="Server-driven_content_negotiation" name="Server-driven_content_negotiation">ãµãŒããŒé§ååã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</h2> + +<p><em>ãµãŒããŒé§ååã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</em> ãŸãã¯ããã¢ã¯ãã£ãã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã§ã¯ããã©ãŠã¶ãŒ (ãŸãã¯ä»ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ã) ã URI ãšå
±ã«ããã€ãã® HTTP ããããŒãéä¿¡ããŸãããããã®ããããŒã¯ããŠãŒã¶ãŒã«ãšã£ãŠå¥œãŸãããã®ãè¡šããŸãããµãŒããŒã§ã¯ããããæããããšããŠäœ¿çšããŠå
éšã¢ã«ãŽãªãºã ããã¯ã©ã€ã¢ã³ãã«æäŸããæåã®ã³ã³ãã³ããéžæããŸãããã®ã¢ã«ãŽãªãºã ã¯ãµãŒããŒã«ãã£ãŠç°ãªããæšæºåãããŠããŸãããäŸãšããŠã<a href="http://httpd.apache.org/docs/current/ja/content-negotiation.html#algorithm">Apache ããŽã·ãšãŒã·ã§ã³ã¢ã«ãŽãªãºã </a> ãã芧ãã ããã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13791/HTTPNegoServer.png" style="height: 380px; width: 767px;"></p> + +<p>HTTP/1.1 æšæºã§ã¯ããµãŒããŒé§ååããŽã·ãšãŒã·ã§ã³ãéå§ããæšæºããããŒã®äžèŠ§ ({{HTTPHeader("Accept")}}, {{HTTPHeader("Accept-Charset")}}, {{HTTPHeader("Accept-Encoding")}}, {{HTTPHeader("Accept-Language")}}) ãå®çŸ©ããŠããŸããå³å¯ã«èšãã° {{HTTPHeader("User-Agent")}} ã¯ãã®äžèŠ§ã«å«ãŸããŠããŸããããèŠæ±ãããªãœãŒã¹ã®ç¹å®ã®è¡šçŸãéä¿¡ããããã«äœ¿çšãããããšããããŸãããã ããããã¯ããæ
£ç¿ã§ã¯ãªããšèããããŠããŸãããµãŒããŒã¯ã©ã®ããããŒãå®éã«ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã§äœ¿çšãããã瀺ãããã« {{HTTPHeader("Vary")}} ããã㌠(ãããã¯ãããç確ãªé¢ä¿ãããã¬ã¹ãã³ã¹ããããŒ) ã䜿çšããŸããããã«ããã<a href="/ja/docs/Web/HTTP/Caching">ãã£ãã·ã¥</a> ãé©åã«æ©èœããŸãã</p> + +<p>ããã«ãããŽã·ãšãŒã·ã§ã³ã«äœ¿çšã§ããããããŒãè¿œå ããå®éšçãªææ¡ãããã<em>client hints</em> ãšåŒã°ããŠããŸãã client hints ã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ããå®è¡ããŠããããã€ã¹ãã©ã®ãããªãã®ã (äŸãã°ããã¹ã¯ãããã³ã³ãã¥ãŒã¿ãŒãã¢ãã€ã«ç«¯æ«ã) ãäŒããŸãã</p> + +<p>ãµãŒããŒé§ååã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã¯ãªãœãŒã¹ã®ç¹å®ã®è¡šçŸã決å®ããããã®ãã£ãšãäžè¬çãªæ¹æ³ã§ãããããã€ãæ¬ ç¹ããããŸã:</p> + +<ul> + <li>ãµãŒããŒã¯ããã©ãŠã¶ãŒã®ããšããã¹ãŠç¥ã£ãŠããããã§ã¯ãããŸãããClient Hints æ¡åŒµãå ããŠãããã©ãŠã¶ãŒã®æ©èœãå®å
šã«ã¯ææ¡ã§ããŸãããã¯ã©ã€ã¢ã³ããéžæãããªã¢ã¯ãã£ãã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ãšã¯ç°ãªãããµãŒããŒã®éžæã¯ãã¹ãŠè¥å¹²ç¬æçã§ãã</li> + <li>ã¯ã©ã€ã¢ã³ããæäŸããæ
å ±ã¯ããªãåé·ã§ãã (HTTP/2 ã®ããããŒå§çž®ã¯ããã®åé¡ãç·©åããŸã)ããŸããã©ã€ãã·ãŒã®ãªã¹ã¯ (HTTP ãã£ã³ã¬ãŒããªã³ãã£ã³ã°) ããããŸãã</li> + <li>æå®ããããªãœãŒã¹ã®è€æ°ã®è¡šçŸãéä¿¡ãããšãå
±æãã£ãã·ã¥ã®å¹çãäžãããŸãããŸãããµãŒããŒã®å®è£
ã¯ããè€éã«ãªããŸãã</li> +</ul> + +<h3 id="The_Accept_header" name="The_Accept_header">Accept ããããŒ</h3> + +<p>{{HTTPHeader("Accept")}} ããããŒã¯ããšãŒãžã§ã³ããåŠçããããšãæãã¡ãã£ã¢ãªãœãŒã¹ã® MIME ã¿ã€ããçŸ
åããŸããããã¯ã«ã³ãåºåã㧠MIME ã¿ã€ãã§äžŠã¹ãŠãããããããã® MIME ã¿ã€ãã¯ãå¥ã® MIME ã¿ã€ããšã®çžå¯Ÿçãªåªå
床ã瀺ããã©ã¡ãŒã¿ã§ããã¯ãªãªãã£ãã¡ã¯ã¿ãŒãšçµã³ã€ããããŠããŸãã</p> + +<p>{{HTTPHeader("Accept")}} ããããŒã¯ãã©ãŠã¶ãŒãŸãã¯ä»ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãã«ãã£ãŠå®çŸ©ããããã㯠HTML ããŒãžã»ç»åã»åç»ã»ã¹ã¯ãªãããªã©ååŸãããã®ã«ãã£ãŠå€ããå ŽåããããŸããã¢ãã¬ã¹ããŒã§æå®ããããã¥ã¡ã³ããååŸãããšããš {{ HTMLElement("img") }}, {{ HTMLElement("video") }}, {{ HTMLElement("audio") }} èŠçŽ ã§ãªã³ã¯ãããã®ãååŸãããšãã§ããã®ããããŒã¯ç°ãªããŸãããã©ãŠã¶ãŒã¯ãã®ããããŒã§ãæé©ãšæãããå€ãèªç±ã«äœ¿çšã§ããŸãã<a href="/ja/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values">äžè¬çãªãã©ãŠã¶ãŒã®æ¢å®å€</a> ã®å
æ¬çãªäžèŠ§ããããŸãã</p> + +<h3 id="The_Accept-CH_header_experimental_inline" name="The_Accept-CH_header_experimental_inline">Accept-CH ããã㌠{{experimental_inline}}</h3> + +<div class="note"> +<p>ããã¯<em>ã¯ã©ã€ã¢ã³ããã³ã (Client Hints)</em> ãšåŒã°ãã<strong>å®éšç</strong>ãªæè¡ã®äžéšã§ãããçŸåšã¯ Chrome 46 以éãå®è£
ããŠããŸãã Device-Memory ã®å€ã¯ Chrome 61 以éãå®è£
ããŠããŸãã</p> +</div> + +<p>å®éšç㪠{{HTTPHeader("Accept-CH")}} ã¯ããµãŒããŒãé©åãªãªãœãŒã¹ãéžæããããã«äœ¿çšã§ããèšå®ããŒã¿ãçŸ
åããŸããæå¹ãªå€ã¯ä»¥äžã®ãšããã§ã:</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">å€</th> + <th scope="col">æå³</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>Device-Memory</code></td> + <td>端æ«ã«æèŒãããŠãã RAM ã®ããããã®éã瀺ããŸãããã®å€ã¯ã2ã®æŽæ°ä¹ã1024ã§å²ã£ãè¿äŒŒå€ã§ããããšãã°ã512ã¡ã¬ãã€ã㯠<code>0.5</code> ãšããŠå ±åãããŸãã</td> + </tr> + <tr> + <td><code>DPR</code></td> + <td>ã¯ã©ã€ã¢ã³ãã®ããã€ã¹ãã¯ã»ã«æ¯ã瀺ããŸãã</td> + </tr> + <tr> + <td><code>Viewport-Width</code></td> + <td>ã¬ã€ã¢ãŠããã¥ãŒããŒãã®å¹
ã CSS ãã¯ã»ã«ã§ç€ºããŸãã</td> + </tr> + <tr> + <td><code>Width</code></td> + <td>ãªãœãŒã¹ã®å¹
ãç©çãã¯ã»ã«ã§ç€ºããŸã (èšãæãããšãç»åã®æ¬æ¥ã®å¹
ã§ã)ã</td> + </tr> + </tbody> +</table> + +<h3 id="The_Accept-Charset_header" name="The_Accept-Charset_header">Accept-Charset ããããŒ</h3> + +<p>{{HTTPHeader("Accept-Charset")}} ããããŒã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ããç解ããæåãšã³ã³ãŒãã£ã³ã°ãäœããããµãŒããŒã«ç€ºããŸããäŒçµ±çã«ãäŸãã°è¥¿ãšãŒããããã±ãŒã«ã§ã¯ <code>ISO-8859-1,utf-8;q=0.7,*;q=0.7</code> ã®ããã«ããã©ãŠã¶ãŒã®ããã«åãã±ãŒã«ãžããŸããŸãªå€ãèšå®ããŠããŸããã</p> + +<p>UTF-8 ãè¯å¥œã«ãµããŒããããããã«ãªããæåããšã³ã³ãŒãããæ¹æ³ãšããŠæšå¥šãããããã«ãªã£ãŠããŸãããŸãã<a href="https://www.eff.org/deeplinks/2010/01/primer-information-theory-and-privacy">èšå®ã«åºã¥ããšã³ããããŒãæžãããŠãã©ã€ãã·ãŒãä¿è·ãããã</a>ã«ããã©ãŠã¶ãŒã¯ <code>Accept-Charset</code> ããããŒãçç¥ããããã«ãªã£ãŠããŸãã Internet Explorer 8, Safari 5, Opera 11, Firefox 10, Chrome 27 ã¯ãã®ããããŒã®äœ¿çšãåããããŸããã</p> + +<h3 id="The_Accept-CH-Lifetime_header" name="The_Accept-CH-Lifetime_header">Accept-CH-Lifetime ããããŒ</h3> + +<div class="note"> +<p>ããã¯ã<strong>å®éšç</strong>ãª<em>ã¯ã©ã€ã¢ã³ããã³ã</em>ãšåŒã°ããæè¡ã®äžéšã§ããã Chrome 61 以éã§ããå©çšã§ããŸããã</p> +</div> + +<p>{{HTTPHeader("Accept-CH-Lifetime")}} ããããŒã¯ã <code>Accept-CH</code> ããããŒã® <code>Device-Memory</code> å€ãšå
±ã«äœ¿çšããã端æ«ãã¡ã¢ãªã®éããµãŒããŒãšå
±æããããšãèš±å¯ãã¹ãæéã瀺ããŸããå€ã¯ããªç§åäœã§äžãããã䜿çšã¯ä»»æã§ãã</p> + +<h3 id="The_Accept-Encoding_header" name="The_Accept-Encoding_header">Accept-Encoding ããããŒ</h3> + +<p>{{HTTPHeader("Accept-Encoding")}} ããããŒã¯ãåãå
¥ãå¯èœãª content-encoding (ãµããŒãããå§çž®æ¹åŒ) ãå®çŸ©ããŸãããã®å€ã¯ããšã³ã³ãŒãã£ã³ã°ã®åªå
床ã瀺ã Q å€ã®ãªã¹ã (äŸ: <code>br, gzip;q=0.8</code>) ã§ããæ¢å®å€ <code>identity</code> 㯠(ã»ãã«å®£èšãããŠããªããã°) åªå
床ãæäœã§ãã</p> + +<p>HTTP ã¡ãã»ãŒãžã®å§çž®ã¯ãŠã§ããµã€ãã®ããã©ãŒãã³ã¹ãåäžãããããã«ãã£ãšãæåãªæ段ã®ã²ãšã€ã§ããã転éããããŒã¿ã®ãµã€ãºãåæžããŠå©çšå¯èœãªåž¯åãæå¹æŽ»çšããŸãããã©ãŠã¶ãŒã¯åžžã«ãã®ããããŒãéä¿¡ããŸãããŸããµãŒããŒã¯ãã®ããããŒãåãå
¥ããããã«èšå®ããŠãå§çž®ãè¡ãã¹ãã§ãã</p> + +<h3 id="The_Accept-Language_header" name="The_Accept-Language_header">Accept-Language ããããŒ</h3> + +<p>{{HTTPHeader("Accept-Language")}} ããããŒã¯ããŠãŒã¶ãŒã®èšèªèšå®ã瀺ãããã«äœ¿çšããŸããããã¯ãquality factor ã䌎ãå€ã®ãªã¹ãã§ã (äŸ: <code>"de, en;q=0.7</code>")ãæ¢å®å€ã¯ãããŠãããŠãŒã¶ãŒãšãŒãžã§ã³ãã®ã°ã©ãã£ã«ã«ã€ã³ã¿ãŒãã§ã€ã¹ã®èšèªã«åŸããŸãããã»ãšãã©ã®ãã©ãŠã¶ãŒã§ã¯ç°ãªãèšèªèšå®ãé©çšã§ããŸãã</p> + +<p>å€æŽãããå€ã¯ãŠãŒã¶ãŒã®ãã£ã³ã¬ãŒããªã³ããšããŠäœ¿çšã§ããããšãã <a href="https://www.eff.org/deeplinks/2010/01/primer-information-theory-and-privacy">èšå®ã«åºã¥ããšã³ããããŒ</a> ãé«ãŸããããå€ãå€æŽããããšã¯æšå¥šãããŠããŸããããŸããŠã§ããµã€ãã¯ããã®å€ããŠãŒã¶ãŒã®æ¬åœã®åžæãåæ ããŠãããšä¿¡ããŠã¯ãããŸããããŠãŒã¶ãŒäœéšãäœäžãããå¯èœæ§ãããããããµã€ããã¶ã€ããŒã¯ãã®ããããŒã§èšèªãæ€åºããããšã«ç±å¿ã«ãªã£ãŠã¯ãããŸãã:</p> + +<ul> + <li>ãµã€ããã¶ã€ããŒã¯ããµãŒããŒãéžæããèšèªãå€ããæ段ãåžžã«æäŸããã¹ãã§ããäŸãã°ããµã€ãã§èšèªã¡ãã¥ãŒãæäŸããŸããäŸãã°ã€ã³ã¿ãŒãããã«ãã§ã§ã¯ãå€ãã®ãŠãŒã¶ãŒãšãŒãžã§ã³ã㯠<code>Accept-Language</code> ããããŒã«ããŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ã®èšèªã«é©åããæ¢å®å€ãèšå®ããŠããããŸããŠãŒã¶ãŒã¯ãããŠããã®èšå®ãå€æŽããŸãããããã¯å€æŽæ¹æ³ãç¥ããªãããããã¯å€æŽã§ããªãããã§ãã</li> + <li>ãµãŒããŒãéžæããèšèªããŠãŒã¶ãŒãäžæžããããããµã€ãã¯èšèªæ€åºã䜿çšãããæ瀺çã«æå®ãããèšèªã«åŸãã¹ãã§ããèšãæãããšããµã€ãã®å
¥ãå£ã®ããŒãžã ãããã®ããããŒã䜿çšããŠé©åãªèšèªãéžæããã¹ãã§ãã</li> +</ul> + +<h3 id="The_User-Agent_header" name="The_User-Agent_header">User-Agent ããããŒ</h3> + +<div class="note"> +<p>ãã®ããããŒãã³ã³ãã³ãã®éžæã«äœ¿çšããããšã¯çã«ããªã£ãŠããŸããããŠãŒã¶ãŒãšãŒãžã§ã³ããã©ã®æ©èœããµããŒãããŠããããå€æããããã«ãã®ããããŒãé Œãããšã¯ <a href="/ja/docs/Web/HTTP/Browser_detection_using_the_user_agent">æªãç¿æ
£ã§ãããšèããããŠããŸã</a>ã</p> +</div> + +<p>{{HTTPHeader("User-Agent")}} ããããŒã¯ããªã¯ãšã¹ããéä¿¡ãããã©ãŠã¶ãŒãæããã«ããŸãããã®æååã«ã¯ã空çœåºåãã§<em>ãããã¯ãããŒã¯ã³</em>ã<em>ã³ã¡ã³ã</em>ã®ãªã¹ããå«ãŸããã§ãããã</p> + +<p><em>ãããã¯ãããŒã¯ã³</em>㯠<code>Firefox/4.0.1</code> ã®ããã«ãå称ãã¹ã©ãã·ã¥ '<code>/</code>'ãããŒãžã§ã³çªå·ã§æ§æãããŸããããã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®å¿
èŠæ§ã«å¿ããŠãè€æ°ååšããããšããããŸãã<em>ã³ã¡ã³ã</em> ã¯ãæ¬åŒ§ã§å²ãŸããèªç±ãªæååã§ããåœç¶ãªããããã®æååå
ã§æ¬åŒ§ã䜿çšããããšã¯ã§ããŸãããã³ã¡ã³ãã®å
éšåœ¢åŒã¯æšæºåãããŠããããåŸã£ãŠåãã©ãŠã¶ãããŸããŸãªããŒã¯ã³ãã»ãã³ãã³ '<code>;</code>' åºåãã§å
¥ããŠããŸãã</p> + +<h3 id="The_Vary_response_header" name="The_Vary_response_header">Vary ã¬ã¹ãã³ã¹ããããŒ</h3> + +<p>ã¯ã©ã€ã¢ã³ããéä¿¡ããååºã® <code>Accept-*</code> ããããŒãšã¯å¯Ÿç
§çã«ã {{HTTPHeader("Vary")}} HTTP ããããŒã¯ãŠã§ããµãŒããŒãã¬ã¹ãã³ã¹ã§éä¿¡ããŸããããã¯ããµãŒããŒããµãŒããŒé§ååã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã§äœ¿çšããããããŒã®ãªã¹ãã瀺ããŸãããã®ããããŒã¯ããŽã·ãšãŒã·ã§ã³ãåçŸã§ããããã«ãå€æåºæºã®ãã£ãã·ã¥ãç¥ãããããã«å¿
èŠã§ããããã£ãã·ã¥ãæ©èœãæããããã«ãããšãšãã«ããŠãŒã¶ãŒã«èª€ã£ãã³ã³ãã³ããæäŸããããšãé²ããŸãã</p> + +<p>ç¹å¥ãªå€ '<code>*</code>' ã¯ããµãŒããŒé§ååã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã§é©åãªã³ã³ãã³ããéžã¶ããã«ãããããŒã§äžããããŠããªãæ
å ±ã䜿çšããããšãè¡šããŸãã</p> + +<p><code>Vary</code> ããããŒã¯ HTTP ããŒãžã§ã³ 1.1 ã§è¿œå ããããã£ãã·ã¥ãé©åã«åãããã«ããããã«å¿
èŠã§ãããµãŒããŒé§ååã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ãæ©èœããã«ã¯ã転éãããã³ã³ãã³ããéžæããããã«ãµãŒããŒã䜿çšããåºæºãç¥ãããã®ãã£ãã·ã¥ãå¿
èŠã§ãããã®æ¹æ³ã§ããã£ãã·ã¥ã¯ã³ã³ãã³ãéžæã®ã¢ã«ãŽãªãºã ãåçããããšãå¯èœã«ããŠããµãŒããŒãžããã«ãªã¯ãšã¹ããè¡ãããšãªãé©åãªã³ã³ãã³ããçŽæ¥æäŸã§ããã§ããããåœç¶ãªããã¯ã€ã«ãã«ãŒã '<code>*</code>' ã¯ãèåŸã«ããèŠçŽ ããã£ãã·ã¥ã§ç¥ãããšãã§ããªãããããã£ãã·ã¥ã®çæã劚ããŸãã</p> + +<h2 id="Agent-driven_negotiation" name="Agent-driven_negotiation">ãšãŒãžã§ã³ãé§ååããŽã·ãšãŒã·ã§ã³</h2> + +<p>ãµãŒããŒé§ååããŽã·ãšãŒã·ã§ã³ã«ã¯å°ã
匱ç¹ããããããŸãã¹ã±ãŒãªã³ã°ã§ããŸãããããŽã·ãšãŒã·ã§ã³ã§ã¯ãã²ãšã€ã®æ©èœã«å¯ŸããŠã²ãšã€ã®ããããŒã䜿çšããŸããäŸãã°ã¹ã¯ãªãŒã³ãµã€ãºã解å床ããŸãã¯ä»ã®å¯žæ³ã䜿çšãããå Žåã¯ãæ°ã㪠HTTP ããããŒãäœæããªããã°ãªããŸããããŸãããããŒã¯ããã¹ãŠã®ãªã¯ãšã¹ãã§éä¿¡ããªããã°ãªããŸãããããããŒãå°ãªãå Žåã¯åé¡ã«ãªãã«ããã®ã§ãããããããæãåãããçµæã¡ãã»ãŒãžãµã€ãºãããã©ãŒãã³ã¹äœäžã®åå ã«ãªããããããŸãããå€ãã®è©³çŽ°ãªããããŒãéä¿¡ãããšãšã³ããããŒãå€ãéä¿¡ãããŸãã®ã§ãHTTP ãã£ã³ã¬ãŒããªã³ãã£ã³ã°ã®å¯èœæ§ãããã«äŒŽããã©ã€ãã·ãŒã®æžå¿µãå¢å€§ããŸãã</p> + +<p>HTTP ã¯åæã®ãã¡ãããããã²ãšã€ã®ããŽã·ãšãŒã·ã§ã³æ¹æ³ã§ãã<em>ãšãŒãžã§ã³ãé§ååããŽã·ãšãŒã·ã§ã³</em>ãŸãã¯<em>ãªã¢ã¯ãã£ãããŽã·ãšãŒã·ã§ã³</em>ã䜿çšã§ããŸãããã®ããŽã·ãšãŒã·ã§ã³ã§ã¯ãããŸããªãªã¯ãšã¹ããçºçãããšãã«ããµãŒããŒã¯äœ¿çšå¯èœãªãªãœãŒã¹ãžã®ãªã³ã¯ãå«ãããŒãžãè¿ããŸãããŠãŒã¶ãŒã«ã¯ãããã®ãªãœãŒã¹ãå·®ãåºãããŠããããã䜿çšãããã®ãéžæããŸãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13795/HTTPNego3.png"></p> + +<p>æ®å¿µãªãã HTTP æšæºã§ã¯äœ¿çšå¯èœãªãªãœãŒã¹ãéžæã§ããããŒãžã®æ§åŒãå®ããŠãããããã®ããã»ã¹ã容æã«èªååã§ããªãç¶æ³ã§ãã<em>ãµãŒããŒé§ååããŽã·ãšãŒã·ã§ã³</em>ã®ãã©ãŒã«ããã¯ã®ã»ãã«ãããã®æ¹æ³ã¯ã»ãšãã©ã®å Žåã¹ã¯ãªãããç¹ã« JavaScript ã®ãªãã€ã¬ã¯ããšãã«äœ¿çšããŸããããŽã·ãšãŒã·ã§ã³åºæºã確èªããåŸãã¹ã¯ãªããããªãã€ã¬ã¯ããå®è¡ããŸãã第äºã®åé¡ç¹ã¯ãå®éã®ãªãœãŒã¹ãåãåºãããã«è€æ°ã®ãªã¯ãšã¹ããå¿
èŠã§ããããããŠãŒã¶ãŒããªãœãŒã¹ãå©çšå¯èœã«ãªãã®ãé
ããããšã§ãã</p> diff --git a/files/ja/web/http/content_negotiation/list_of_default_accept_values/index.html b/files/ja/web/http/content_negotiation/list_of_default_accept_values/index.html new file mode 100644 index 0000000000..e7e3423a19 --- /dev/null +++ b/files/ja/web/http/content_negotiation/list_of_default_accept_values/index.html @@ -0,0 +1,258 @@ +--- +title: æ¢å®ã® Accept å€ã®äžèŠ§ +slug: Web/HTTP/Content_negotiation/List_of_default_Accept_values +tags: + - Accept + - Content Negotiation + - HTTP + - Reference + - ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Content_negotiation/List_of_default_Accept_values +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary">ãã®èšäºã§ã¯ãç¹å®ã®å
¥åãšãã©ãŠã¶ãŒã®ããŒãžã§ã³ã«ããã HTTP <code><a href="/ja/docs/Web/HTTP/Headers/Accept">Accept</a></code> ããããŒã®æ¢å®å€ã«ã€ããŠèª¬æããŸãã</span></p> + +<h2 id="Default_values" name="Default_values">æ¢å®å€</h2> + +<p>ãããã¯ãæèããè¯ãæ
å ±ãåŸãããªãå Žåã«éä¿¡ãããå€ã§ãããªãããã¹ãŠã®ãã©ãŠã¶ãŒããã¹ãŠã®å Žåãã«ããŒããããã« <code>*/*</code> MIME ã¿ã€ããè¿œå ããŸããããã¯éåžžããã©ãŠã¶ã®ã¢ãã¬ã¹ããŒãä»ããŠéå§ããããªã¯ãšã¹ãããŸã㯠HTML ã® {{HTMLElement("a")}} èŠçŽ ãä»ããŠéå§ããããªã¯ãšã¹ãã«äœ¿çšãããŸãã</p> + +<table class="standard-table"> + <tbody> + <tr> + <th>User Agent</th> + <th>å€</th> + <th>åè</th> + </tr> + <tr> + <td>Firefox</td> + <td> + <p><code>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</code> (Firefox 66 以é)<br> + <br> + <code>text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8</code> (Firefox 65)<br> + <br> + <code>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</code> (ãã以å)</p> + </td> + <td>Firefox 65 ãŸãã¯ãã以åã§ã¯ããã®å€ã¯ <a class="external" href="http://kb.mozillazine.org/Network.http.accept.default" title="http://kb.mozillazine.org/Network.http.accept.default"><code>network.http.accept.default</code></a> èšå®å€ã䜿çšããŠå€æŽããããšãã§ããŸã (<a class="external" href="https://hg.mozilla.org/mozilla-central/file/tip/modules/libpref/init/all.js#l1750" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers">æ
å ±æº)</a></td> + </tr> + <tr> + <td>Safari, Chrome</td> + <td> + <p><code>text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8</code></p> + </td> + <td><a class="external" href="https://chromium.googlesource.com/chromium/src.git/+/master/services/network/loader_util.cc#24" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers">(æ
å ±æº)</a></td> + </tr> + <tr> + <td>Safari 5</td> + <td> + <p><code>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</code></p> + </td> + <td>ããã¯ä»¥åã® <code>Accept</code> ããããŒãšæ¯ã¹ãŠã <code>image/png</code> ã <code>text/html</code> ããäžã«ã©ã³ã¯ä»ãããªããªã£ãç¹ã§æ¹è¯ãããŠããŸãã</td> + </tr> + <tr> + <td>Internet Explorer 8</td> + <td><code>image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */*</code></td> + <td><a class="external" href="http://blogs.msdn.com/b/ieinternals/archive/2009/07/01/ie-and-the-accept-header.aspx" title="http://blogs.msdn.com/b/ieinternals/archive/2009/07/01/ie-and-the-accept-header.aspx">IE and the Accept Header (IEInternals' MSDN blog)</a> ãåç
§</td> + </tr> + <tr> + <td>Edge</td> + <td><code>text/html, application/xhtml+xml, image/jxr, */*</code></td> + <td></td> + </tr> + <tr> + <td>Opera</td> + <td><code>text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1</code></td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="Values_for_an_image" name="Values_for_an_image">ç»åã®å€</h2> + +<p>ãŠãŒã¶ãšãŒãžã§ã³ã㯠HTML ã® {{HTMLElement("img")}} èŠçŽ ãªã©ãéããŠç»åããªã¯ãšã¹ããããšãã«ããã°ãã°æè¿ãããã¡ãã£ã¢çš®å¥ã®ãªã¹ããèšå®ããŸãã</p> + +<table class="standard-table"> + <tbody> + <tr> + <th>User Agent</th> + <th>å€</th> + <th>åè</th> + </tr> + <tr> + <td>Firefox</td> + <td> + <p><code>image/webp,*/*</code> (since Firefox 65)<br> + <code>*/*</code> (since Firefox 47)<br> + <code>image/png,image/*;q=0.8,*/*;q=0.5</code> (before)</p> + </td> + <td>ãã®å€ã¯ <code>image.http.accept</code> èšå®å€ã䜿çšããŠå€æŽããããšãã§ããŸãã <a class="external" href="https://hg.mozilla.org/mozilla-central/file/tip/modules/libpref/init/all.js#l4735" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers"><span style="font-size: x-small;">æ
å ±æº</span></a></td> + </tr> + <tr> + <td>Safari</td> + <td><code>*/*</code></td> + <td></td> + </tr> + <tr> + <td>Chrome</td> + <td><code>image/webp,image/apng,image/*,*/*;q=0.8</code></td> + <td><a class="external" href="https://chromium.googlesource.com/chromium/src.git/+/master/content/renderer/loader/web_url_loader_impl.cc#99" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers"><span style="font-size: x-small;">æ
å ±æº</span></a></td> + </tr> + <tr> + <td>Internet Explorer 8 or earlier</td> + <td><code>*/*</code></td> + <td><a class="external" href="http://blogs.msdn.com/b/ieinternals/archive/2009/07/01/ie-and-the-accept-header.aspx" title="http://blogs.msdn.com/b/ieinternals/archive/2009/07/01/ie-and-the-accept-header.aspx">IE and the Accept Header (IEInternals' MSDN blog)</a> ãåç
§</td> + </tr> + <tr> + <td>Internet Explorer 9</td> + <td><code>image/png,image/svg+xml,image/*;q=0.8, */*;q=0.5</code></td> + <td><a class="external" href="http://blogs.msdn.com/b/fiddler/archive/2011/02/10/fiddler-is-better-with-internet-explorer-9.aspx" title="http://blogs.msdn.com/b/fiddler/archive/2011/02/10/fiddler-is-better-with-internet-explorer-9.aspx">Fiddler is better with Internet Explorer 9 (IEInternals' MSDN blog)</a> ãåç
§</td> + </tr> + </tbody> +</table> + +<h2 id="Values_for_a_video" name="Values_for_a_video">åç»ã®å€</h2> + +<p>{{HTMLElement("video")}} HTML èŠçŽ ãä»ããŠåç»ããªã¯ãšã¹ãããéãã»ãšãã©ã®ãã©ãŠã¶ã¯ç¹å®ã®å€ã䜿çšããŸãã</p> + +<table class="standard-table"> + <tbody> + <tr> + <th>User Agent</th> + <th>å€</th> + <th>åè</th> + </tr> + <tr> + <td>Firefox earlier than 3.6</td> + <td><em>no support for {{HTMLElement("video")}}</em></td> + <td></td> + </tr> + <tr> + <td>Firefox 3.6 and later</td> + <td><code>video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5</code></td> + <td><a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=489071" title="https://bugzilla.mozilla.org/show_bug.cgi?id=489071">bug 489071</a> ãåç
§ <a class="external" href="https://hg.mozilla.org/mozilla-central/file/tip/dom/html/HTMLVideoElement.cpp#l136" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers"><span style="font-size: x-small;">æ
å ±æº</span></a></td> + </tr> + <tr> + <td>Chrome</td> + <td><code>*/*</code></td> + <td><a class="external" href="https://chromium.googlesource.com/chromium/src.git/+/master/services/network/loader_util.cc#27" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers"><span style="font-size: x-small;">æ
å ±æº</span></a></td> + </tr> + <tr> + <td>Internet Explorer 8 or earlier</td> + <td><em>no support for {{HTMLElement("video")}}</em></td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="Values_for_audio_resources" name="Values_for_audio_resources">é³å£°ãªãœãŒã¹ã®å€</h2> + +<p>{{HTMLElement("audio")}} HTML èŠçŽ ãªã©ã䜿çšããŠé³å£°ãã¡ã€ã«ããªã¯ãšã¹ãããéãã»ãšãã©ã®ãã©ãŠã¶ãŒã¯ç¹å®ã®å€ã䜿çšããŸãã</p> + +<table class="standard-table"> + <tbody> + <tr> + <th>User Agent</th> + <th>å€</th> + <th>åè</th> + </tr> + <tr> + <td>Firefox 3.6 and later</td> + <td><code>audio/webm,audio/ogg,audio/wav,audio/*;q=0.9,application/ogg;q=0.7,video/*;q=0.6,*/*;q=0.5</code></td> + <td><a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=489071" title="https://bugzilla.mozilla.org/show_bug.cgi?id=489071">bug 489071</a> ãåç
§ <a class="external" href="https://hg.mozilla.org/mozilla-central/file/tip/dom/html/HTMLAudioElement.cpp#l81" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers"><span style="font-size: x-small;">æ
å ±æº</span></a></td> + </tr> + <tr> + <td>Safari, Chrome</td> + <td><code>*/*</code></td> + <td><a class="external" href="https://chromium.googlesource.com/chromium/src.git/+/master/services/network/loader_util.cc#27" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers"><span style="font-size: x-small;">æ
å ±æº</span></a></td> + </tr> + <tr> + <td>Internet Explorer 8 or earlier</td> + <td><em>no support for {{HTMLElement("audio")}}</em></td> + <td></td> + </tr> + <tr> + <td>Internet Explorer 9</td> + <td>?</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="Values_for_scripts" name="Values_for_scripts">ã¹ã¯ãªããã®å€</h2> + +<p>{{HTMLElement("script")}} HTML èŠçŽ ãªã©ãéããŠã¹ã¯ãªããããªã¯ãšã¹ãããéããã©ãŠã¶ãŒã«ãã£ãŠã¯ç¹å®ã®å€ã䜿çšããŸãã</p> + +<table class="standard-table"> + <tbody> + <tr> + <th>User Agent</th> + <th>å€</th> + <th>åè</th> + </tr> + <tr> + <td>Firefox</td> + <td><code>*/*</code></td> + <td><a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=170789" title="https://bugzilla.mozilla.org/show_bug.cgi?id=170789">bug 170789</a> ãåç
§</td> + </tr> + <tr> + <td>Safari, Chrome</td> + <td><code>*/*</code></td> + <td><a class="external" href="https://chromium.googlesource.com/chromium/src.git/+/master/services/network/loader_util.cc#27" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers"><span style="font-size: x-small;">æ
å ±æº</span></a></td> + </tr> + <tr> + <td>Internet Explorer 8 or earlier</td> + <td><code>*/*</code></td> + <td><a class="external" href="http://blogs.msdn.com/b/ieinternals/archive/2009/07/01/ie-and-the-accept-header.aspx" title="http://blogs.msdn.com/b/ieinternals/archive/2009/07/01/ie-and-the-accept-header.aspx">IE and the Accept Header (IEInternals' MSDN blog)</a> ãåç
§</td> + </tr> + <tr> + <td>Internet Explorer 9</td> + <td><code>application/javascript, */*;q=0.8</code></td> + <td><a class="external" href="http://blogs.msdn.com/b/fiddler/archive/2011/02/10/fiddler-is-better-with-internet-explorer-9.aspx" title="http://blogs.msdn.com/b/fiddler/archive/2011/02/10/fiddler-is-better-with-internet-explorer-9.aspx">Fiddler is better with Internet Explorer 9 (IEInternals' MSDN blog)</a> ãåç
§</td> + </tr> + </tbody> +</table> + +<h2 id="Values_for_a_CSS_stylesheet" name="Values_for_a_CSS_stylesheet">CSS ã¹ã¿ã€ã«ã·ãŒãã®å€</h2> + +<p><code><link rel="stylesheet"></code> HTML èŠçŽ ã䜿çšã㊠CSS ã¹ã¿ã€ã«ã·ãŒãããªã¯ãšã¹ãããéãã»ãšãã©ã®ãã©ãŠã¶ã¯ç¹å®ã®å€ã䜿çšããŸãã</p> + +<table class="standard-table"> + <tbody> + <tr> + <th>User Agent</th> + <th>å€</th> + <th>åè</th> + </tr> + <tr> + <td>Firefox 4</td> + <td><code>text/css,*/*;q=0.1</code></td> + <td><a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=170789" title="https://bugzilla.mozilla.org/show_bug.cgi?id=170789">bug 170789</a> ãåç
§ <a class="external" href="https://hg.mozilla.org/mozilla-central/file/tip/layout/style/Loader.cpp#l1548" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers"><span style="font-size: x-small;">æ
å ±æº</span></a></td> + </tr> + <tr> + <td>Internet Explorer 8 or earlier</td> + <td><code>*/*</code></td> + <td><a class="external" href="http://blogs.msdn.com/b/ieinternals/archive/2009/07/01/ie-and-the-accept-header.aspx" title="http://blogs.msdn.com/b/ieinternals/archive/2009/07/01/ie-and-the-accept-header.aspx">IE and the Accept Header (IEInternals' MSDN blog)</a> ãåç
§</td> + </tr> + <tr> + <td>Internet Explorer 9</td> + <td><code>text/css</code></td> + <td><a class="external" href="http://blogs.msdn.com/b/fiddler/archive/2011/02/10/fiddler-is-better-with-internet-explorer-9.aspx" title="http://blogs.msdn.com/b/fiddler/archive/2011/02/10/fiddler-is-better-with-internet-explorer-9.aspx">Fiddler is better with Internet Explorer 9 (IEInternals' MSDN blog)</a> ãåç
§</td> + </tr> + <tr> + <td>Safari, Chrome</td> + <td><code>text/css,*/*;q=0.1</code></td> + <td><a class="external" href="https://chromium.googlesource.com/chromium/src.git/+/master/content/renderer/loader/web_url_loader_impl.cc#98" title="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers"><span style="font-size: x-small;">æ
å ±æº</span></a></td> + </tr> + <tr> + <td>Opera 11.10</td> + <td><code>text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 </code></td> + <td></td> + </tr> + <tr> + <td>Konqueror 4.6</td> + <td><code>text/css,*/*;q=0.1</code></td> + <td></td> + </tr> + </tbody> +</table> diff --git a/files/ja/web/http/cookies/index.html b/files/ja/web/http/cookies/index.html new file mode 100644 index 0000000000..c7481c61bf --- /dev/null +++ b/files/ja/web/http/cookies/index.html @@ -0,0 +1,239 @@ +--- +title: HTTP Cookie ã®äœ¿çš +slug: Web/HTTP/Cookies +tags: + - Cookies + - Guide + - HTTP + - JavaScript + - ãŠã§ãéçº + - ã¬ã€ã + - ã¯ãã㌠+ - ãµãŒã㌠+ - ã¹ãã¬ãŒãž + - ãã©ã€ãã·ãŒ + - ãããã³ã« + - ãªã¯ãšã¹ã + - 远跡 +translation_of: Web/HTTP/Cookies +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><span class="seoSummary"><dfn>HTTP Cookie</dfn> (ãŠã§ã Cookieããã©ãŠã¶ãŒ Cookie) ã¯ããµãŒããŒããŠãŒã¶ãŒã®ãŠã§ããã©ãŠã¶ãŒã«éä¿¡ããå°ããªããŒã¿ã§ããããã©ãŠã¶ãŒã«ä¿åããããã®åŸã®ãªã¯ãšã¹ããšå
±ã«åããµãŒããŒãžè¿éãããŸãã</span>äžè¬çã«ã¯ãäºã€ã®ãªã¯ãšã¹ããåããã©ãŠã¶ãŒããéä¿¡ããããã®ã§ããããç¥ãããã«äœ¿çšãããŸããäŸãã°ããŠãŒã¶ãŒã®ãã°ã€ã³ç¶æ
ãç¶æããããšãã§ããŸããCookie ã¯ã<a href="/ja/docs/Web/HTTP/Overview#HTTP_is_stateless_but_not_sessionless">ã¹ããŒãã¬ã¹</a>㪠HTTP ãããã³ã«ã®ããã«ã¹ããŒããã«ãªæ
å ±ãèšæ¶ããŸãã</p> + +<p>Cookie ã¯äž»ã«ã以äžã® 3 ã€ã®çšéã§äœ¿çšãããŸãã</p> + +<dl> + <dt>ã»ãã·ã§ã³ç®¡ç</dt> + <dd>ãã°ã€ã³ãã·ã§ããã³ã°ã«ãŒããã²ãŒã ã®ã¹ã³ã¢ããŸãã¯ãã®ä»ã®ãµãŒããŒãèŠããŠããã¹ããã®</dd> + <dt>ããŒãœãã©ã€ãŒãŒã·ã§ã³</dt> + <dd>ãŠãŒã¶ãŒèšå®ãããŒãããã®ä»ã®èšå®</dd> + <dt>ãã©ããã³ã°</dt> + <dd>ãŠãŒã¶ãŒã®è¡åã®èšé²åã³åæ</dd> +</dl> + +<p>Cookie ã¯ãã¯ã©ã€ã¢ã³ãåŽã®æ±çšçãªèšæ¶é åãšããŠäœ¿çšãããããšããããŸããããã¯ä»ã«ã¯ã©ã€ã¢ã³ããžããŒã¿ãä¿åããæ段ããªãã£ãé ã¯åççã§ããããçŸåšã§ã¯æ°ããã¹ãã¬ãŒãž API ã䜿çšããããšãæšå¥šãããŠããŸãã Cookie ã¯ãã¹ãŠã®ãªã¯ãšã¹ãã§éä¿¡ãããã®ã§ã (ç¹ã«ã¢ãã€ã«ããŒã¿éä¿¡ã§) æ§èœãæªåãããå¯èœæ§ããããŸããã¯ã©ã€ã¢ã³ãã¹ãã¬ãŒãžåãã®æ°ãã API ãšããŠã<a href="/ja/docs/Web/API/Web_Storage_API" title="DOM Storage">Web Storage API</a> (<code>localStorage</code> ããã³ <code>sessionStorage</code>) ãš <a href="/ja/docs/Web/API/IndexedDB_API">IndexedDB</a> ããããŸãã</p> + +<div class="note"> +<p>ä¿åããã Cookie (ããã³ãŠã§ãããŒãžã䜿çšã§ããä»ã®ã¹ãã¬ãŒãž) ã確èªããã«ã¯ãéçºããŒã«ã®<a href="/ja/docs/Tools/Storage_Inspector">ã¹ãã¬ãŒãžã€ã³ã¹ãã¯ã¿ãŒ</a>ãæå¹åããŠãã¹ãã¬ãŒãžã®ããªãŒã§ Cookie ãéžæããŠãã ããã</p> +</div> + +<h2 id="Creating_cookies" name="Creating_cookies">Cookie ã®äœæ</h2> + +<p>HTTP ãªã¯ãšã¹ããåãåã£ãåŸããµãŒããŒã¯ã¬ã¹ãã³ã¹ã§ {{HTTPHeader("Set-Cookie")}} ããããŒãéä¿¡ããããšãã§ããŸããéåžž Cookie ã¯ãã©ãŠã¶ãŒã«ä¿åããããŸã Cookie ã¯åããµãŒããŒã«å¯ŸããŠè¡ããããªã¯ãšã¹ããšå
±ã« HTTP 㮠{{HTTPHeader("Cookie")}} ããããŒã®äžã§éä¿¡ãããŸããæå¹æéãæéãèšå®ããããšãã§ãããã®åŸã¯ Cookie ãéä¿¡ãããªããªããŸããç¹å®ã®ãã¡ã€ã³ããã¹ãžã®è¿œå ã®å¶çŽãèšå®ããããšãã§ããCookie ãã©ãã«éä¿¡ããããå¶éããããšãã§ããŸãã以äžã§èšåãããŠããããããŒå±æ§ã®è©³çŽ°ã«ã€ããŠã¯ã {{HTTPHeader("Set-Cookie")}} ã®ãªãã¡ã¬ã³ã¹èšäºãåç
§ããŠãã ããã</p> + +<h3 id="The_Set-Cookie_and_Cookie_headers" name="The_Set-Cookie_and_Cookie_headers"><code>Set-Cookie</code> ããããŒãš <code>Cookie</code> ããããŒ</h3> + +<p>HTTP ã® {{HTTPHeader("Set-Cookie")}} ã¬ã¹ãã³ã¹ããããŒã¯ããµãŒããŒããŠãŒã¶ãŒãšãŒãžã§ã³ããž Cookie ãéä¿¡ããããã«äœ¿çšããŸããåçŽãª Cookie ã¯æ¬¡ã®ããã«èšå®ãããŸãã</p> + +<pre class="syntaxbox notranslate">Set-Cookie: <cookie-name>=<cookie-value></pre> + +<p>ããã¯ããµãŒããŒããã¯ã©ã€ã¢ã³ããž Cookie ã®çµã¿åãããä¿åããããæ瀺ããããšãè¡šããŸãã</p> + +<pre class="notranslate">HTTP/2.0 200 OK +Content-Type: text/html +Set-Cookie: yummy_cookie=choco +Set-Cookie: tasty_cookie=strawberry + +[ããŒãžã®å
容]</pre> + +<p id="The_client_sends_back_to_the_server_its_cookies_previously_stored">ãŸãããã®ãµãŒããŒãžã®ãã®åŸã®ãã¹ãŠã®ãªã¯ãšã¹ãã«ãããŠããã©ãŠã¶ãŒã¯ä»¥åæ ŒçŽããããã¹ãŠã®ã¯ãããŒãã {{HTTPHeader("Cookie")}} ããããŒã䜿çšããŠãµãŒããŒãžéä¿¡ããŸãã</p> + +<pre class="notranslate">GET /sample_page.html HTTP/2.0 +Host: www.example.org +Cookie: yummy_cookie=choco; tasty_cookie=strawberry</pre> + +<div class="note"><strong>泚:</strong> æ§ã
ãªãµãŒããŒåŽã¢ããªã±ãŒã·ã§ã³ã«ããã <code>Set-Cookie</code> ããããŒã®äœ¿ãæ¹ã玹ä»ããŸãã + +<ul> + <li><a href="https://secure.php.net/manual/ja/function.setcookie.php">PHP</a></li> + <li><a href="https://nodejs.org/dist/latest-v8.x/docs/api/http.html#http_response_setheader_name_value">Node.JS</a></li> + <li><a href="https://docs.python.org/3/library/http.cookies.html">Python</a></li> + <li><a href="https://api.rubyonrails.org/classes/ActionDispatch/Cookies.html">Ruby on Rails</a></li> +</ul> +</div> + +<h3 id="Define_the_lifetime_of_a_cookie" name="Define_the_lifetime_of_a_cookie">Cookie ã®æç¶æéã®å®çŸ©</h3> + +<p>Cookie ã®æç¶æéã¯2éãã®æ¹æ³ã§å®çŸ©ããããšãã§ããŸãã</p> + +<ul> + <li><em>ã»ãã·ã§ã³</em> Cookie ã¯çŸåšã®ã»ãã·ã§ã³ãçµäºãããšåé€ãããŸãããã©ãŠã¶ãŒã¯ãã€ãçŸåšã®ã»ãã·ã§ã³ããçµãã£ããšèŠãªãããå®çŸ©ãããã©ãŠã¶ãŒã«ãã£ãŠã¯åèµ·åæã«<em>ã»ãã·ã§ã³ã®åŸ©å
</em>ã䜿çšãããããã»ãã·ã§ã³ã¯ãããŒãç¡æéã«æç¶ããããšããããŸãã</li> + <li><em>æç¶ç</em> Cookie ã¯ã <code>Expires</code> å±æ§ã§æå®ãããæå»ããŸã㯠<code>Max-Age</code> ã§æå®ãããæéãçµéããåŸã«åé€ãããŸãã</li> +</ul> + +<p>äŸã瀺ããŸãã</p> + +<pre class="notranslate">Set-Cookie: id=a3fWa; Expires=Wed, 31 Oct 2021 07:28:00 GMT;</pre> + +<div class="note"> +<p><strong>泚</strong>: <code>Expires</code> ã®æ¥ä»ãèšå®ããå Žåãèšå®ãããæ¥æã¯ãµãŒããŒã§ã¯ãªããCookie ãèšå®ãããã¯ã©ã€ã¢ã³ãã®æ¥æã«é¢é£ããŸãã</p> +</div> + +<p>ãµã€ãããŠãŒã¶ãŒãèªèšŒããå ŽåããŠãŒã¶ãŒãèªèšŒãããã³ã«ããã§ã«ååšããã»ãã·ã§ã³ã¯ãããŒãå«ããŠãã»ãã·ã§ã³ã¯ãããŒãåçæããŠåéããå¿
èŠããããŸãããã®ææ³ã¯ã第äžè
ããŠãŒã¶ãŒã®ã»ãã·ã§ã³ãåå©çšãã<a href="/ja/docs/Web/Security/Types_of_attacks#Session_fixation">ã»ãã·ã§ã³åºå®æ»æ</a>ãé²ãã®ã«åœ¹ç«ã¡ãŸãã</p> + +<h3 id="Restrict_access_to_cookies" name="Restrict_access_to_cookies">Cookie ãžã®ã¢ã¯ã»ã¹å¶é</h3> + +<p>ã¯ãããŒãå®å
šã«éä¿¡ãããæå³ããªã第äžè
ãã¹ã¯ãªããããã¢ã¯ã»ã¹ãããªãããã«ããã«ã¯ã <code>Secure</code> å±æ§ãš <code>HttpOnly</code> å±æ§ã®2ã€ã®æ¹æ³ããããŸãã</p> + +<p><code>Secure</code> å±æ§ãã€ããã¯ãããŒã¯ HTTPS ãããã³ã«äžã®æå·åããããªã¯ãšã¹ãã§ã®ã¿ãµãŒããŒã«éä¿¡ãããå®å
šã§ãªã HTTP ã§ã¯æ±ºããŠéä¿¡ãããªãããã{{Glossary("MitM", "äžéè
")}}æ»æè
ãç°¡åã«ã¢ã¯ã»ã¹ããããšã¯ã§ããŸããã(URL ã« <code>http:</code> ãå«ã) å®å
šã§ãªããµã€ãã¯ã <code>Secure</code> å±æ§ã䜿çšããŠã¯ãããŒãèšå®ããããšãã§ããŸããããã ãã<code>Secure</code> ã«ãã£ãŠã¯ãããŒå
ã®æ©å¯æ
å ±ãžã®ã¢ã¯ã»ã¹ããã¹ãŠé²ãããšæã£ãŠã¯ãããŸãããäŸãã°ãã¯ã©ã€ã¢ã³ãã®ããŒããã£ã¹ã¯ãžã¢ã¯ã»ã¹ããããšã§èªã¿åãããå¯èœæ§ããããŸãã</p> + +<p><code>HttpOnly</code> å±æ§ãæã€ã¯ãããŒã¯ãJavaScript ã® {{domxref("Document.cookie")}} API ã«ã¯ã¢ã¯ã»ã¹ã§ããŸããããµãŒããŒã«éä¿¡ãããã ãã§ããäŸãã°ããµãŒããŒåŽã®ã»ãã·ã§ã³ãæç¶ãããã¯ãããŒã¯ JavaScript ãå©çšããå¿
èŠã¯ãªãã®ã§ã <code>HttpOnly</code> å±æ§ãã€ããã¹ãã§ãããã®äºé²çã¯ãã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã° (<a href="/ja/docs/Web/Security/Types_of_attacks#Cross-site_scripting_(XSS)">XSS</a>) æ»æãç·©åããã®ã«åœ¹ç«ã¡ãŸãã</p> + +<p>äŸã瀺ããŸãã</p> + +<pre class="notranslate">Set-Cookie: id=a3fWa; Expires=Wed, 21 Oct 2021 07:28:00 GMT; Secure; HttpOnly</pre> + +<h3 id="Define_where_cookies_are_sent" name="Define_where_cookies_are_sent">Cookie ã®éä¿¡å
ã®å®çŸ©</h3> + +<p><code>Domain</code> ããã³ <code>Path</code> å±æ§ã¯ãCookie ã®<em>ã¹ã³ãŒã</em>ãã€ãŸã Cookie ãéä¿¡ãã察象㮠URL ãå®çŸ©ããŸãã</p> + +<h4 id="Domain_attribute" name="Domain_attribute">Domain å±æ§</h4> + +<p><code>Domain</code> å±æ§ã¯ãCookie ãåä¿¡ããããšãã§ãããã¹ããæå®ããŸããæå®ãããŠããªãå Žåã¯ãæ¢å®ã§ã¯ãããŒãèšå®ããã®ãšåã{{Glossary("origin", "ãªãªãžã³")}}ãšãªãã<em>ãµããã¡ã€ã³ã¯é€å€ãããŸã</em>ã <code>Domain</code> ãæå®ãããå Žåããµããã¡ã€ã³ã¯åžžã«å«ãŸããŸãããããã£ãŠã <code>Domain</code> ãæå®ãããšçç¥æãããå¶éãç·©åãããŸãããã ãããµããã¡ã€ã³éã§ãŠãŒã¶ãŒã«é¢ããæ
å ±ãå
±æããå Žåã¯æçšã«ãªãã§ãããã</p> + +<p>äŸãã°ã<code>Domain=mozilla.org</code> ãèšå®ãããšã<code>developer.mozilla.org</code> ã®ãããªãµããã¡ã€ã³ãå«ãŸããŸãã</p> + +<h4 id="Path_attribute" name="Path_attribute">Path å±æ§</h4> + +<p><code>Path</code> å±æ§ã¯ã <code>Cookie</code> ããããŒãéä¿¡ããããã«ãªã¯ãšã¹ãããã URL ã®äžã«å«ãå¿
èŠããã URL ã®ãã¹ã瀺ããŸãã <code>%x2F</code> ("/") ã®æåã¯ãã£ã¬ã¯ããªåºåãæåãšããŠè§£éããããµããã£ã¬ã¯ããªã«ãåæ§ã«äžèŽããŸãã</p> + +<p>äŸãã°ã<code>Path=/docs</code> ãèšå®ãããšã以äžã®ãã¹ã«äžèŽããŸãã</p> + +<ul> + <li><code>/docs</code></li> + <li><code>/docs/Web/</code></li> + <li><code>/docs/Web/HTTP</code></li> +</ul> + +<h4 id="SameSite_attribute" name="SameSite_attribute">SameSite å±æ§</h4> + +<p><code>SameSite</code> å±æ§ã«ããããµãŒããŒããªãªãžã³éãªã¯ãšã¹ã (ããã§{{Glossary("Site", "ãµã€ã")}}ã¯ç»é²å¯èœãªãã¡ã€ã³ã«ãã£ãŠå®çŸ©ãããŸã) ãšäžç·ã«ã¯ãããŒãéãã¹ãã§ã¯ãªãããšãèŠæ±ããããšãã§ããŸããããã¯ãã¯ãã¹ãµã€ããªã¯ãšã¹ããã©ãŒãžã§ãªæ»æ ({{Glossary("CSRF")}}) ã«å¯ŸããŠããããã®é²åŸ¡ãšãªããŸãã</p> + +<p>åãããšãã§ããå€ã¯ <code>Strict</code>, <code>Lax</code>, <code>None</code> ã®3ã€ã§ãã <code>Strict</code> ã§ã¯ãã¯ãããŒã¯ãããçºçãããã®ãšåããµã€ãã«å¯ŸããŠã®ã¿éä¿¡ãããŸãã <code>Lax</code> ã䌌ãŠããŸããããŠãŒã¶ãŒããªã³ã¯ããã©ããªã©ãå€éšã®ãµã€ããããã URL ã«ç§»åããå Žåã¯é€ããŸãã <code>None</code> ã¯ãµã€ãéãªã¯ãšã¹ãã®å¶éã¯ãããŸããã</p> + +<p>次ã«äŸã瀺ããŸãã</p> + +<pre class="notranslate">Set-Cookie: mykey=myvalue; SameSite=Strict</pre> + +<p><code>SameSite</code> å±æ§ã®å€ã¯å€§æåå°æåã®åºå¥ã¯ãããŸããã</p> + +<div class="blockIndicator note"> +<p>ãã©ãŠã¶ãŒã¯<a href="https://www.chromestatus.com/feature/5088147346030592">ã¯ãããŒã®æ¢å®å€ã <code>SameSite=Lax</code> ã«ãã</a>ããã«ç§»è¡ãã€ã€ãããŸãã Cookie ããªãªãžã³éã§éä¿¡ããå¿
èŠãããå Žåã¯ã <code>None</code> ãã£ã¬ã¯ãã£ãã䜿ã£ãŠ SameSite ã®å¶éã解é€ããŠãã ããã<code>None</code> ãã£ã¬ã¯ãã£ã㯠<a href="#Secure_and_HttpOnly_cookies"><code>Secure</code></a> å±æ§ãå¿
èŠãšããŸãã</p> +</div> + +<h4 id="Cookie_prefixes" name="Cookie_prefixes">Cookie ã®æ¥é èŸ</h4> + +<p>Cookie ã®ä»çµã¿ã®èšèšã§ã¯ãã¯ãããŒãå®å
šãªãªãªãžã³ã«èšå®ãããŠãããã©ãããã¯ãããŒãåœåã¯<em>ã©ãã«</em>èšå®ãããã®ãããµãŒããŒã確èªããããšãã§ããªãããã«ãªã£ãŠããŸãã</p> + +<p>ãµããã¡ã€ã³äžã«ããè匱æ§ã®ããã¢ããªã±ãŒã·ã§ã³ã <code>Domain</code> å±æ§ã䜿çšããŠã¯ãããŒãèšå®ãããšãã»ãã®ãã¹ãŠã®ãµããã¡ã€ã³ã§ã¯ãããŒã«ã¢ã¯ã»ã¹ã§ããããã«ããããšãã§ããŸãããã®ä»çµã¿ã¯<em>ã»ãã·ã§ã³åºå®</em>æ»æã§æªçšãããå¯èœæ§ããããŸããäž»ãªå¯Ÿçæ¹æ³ã¯<a href="/ja/docs/Web/Security/Types_of_attacks#Session_fixation">ã»ãã·ã§ã³åºå®å</a>ãåç
§ããŠãã ããã</p> + +<p>ãããã<a href="https://ja.wikipedia.org/wiki/%E5%A4%9A%E5%B1%A4%E9%98%B2%E5%BE%A1_(%E3%82%BB%E3%82%AD%E3%83%A5%E3%83%AA%E3%83%86%E3%82%A3)">å€å±€é²åŸ¡</a>ãšããŠã Cookie ã«é¢ããç¹å®ã®äºå®ã䞻匵ããããã« <em>Cookie ã®æ¥é èŸ</em>ã䜿ãããšãå¯èœã§ãã以äžã®äºã€ã®æ¥é èŸãå©çšå¯èœã§ãã</p> + +<dl> + <dt><code>__Host-</code></dt> + <dd>Cookie åã«ãã®æ¥é èŸãã€ããŠããå Žåã {{HTTPHeader("Set-Cookie")}} ããããŒãåãå
¥ããããã®ã¯ <code>Secure</code> å±æ§ã§æå®ãããŠãããå®å
šãªãªãªãžã³ããéä¿¡ãããŠããã <code>Domain</code> å±æ§ãå«ãã§<em>ããã</em>ã <code>Path</code> å±æ§ã <code>/</code> ã«èšå®ãããŠããå Žåã®ã¿ã§ãããã®å Žåããããã® Cookie ã¯ããã¡ã€ã³ã«ããã¯ãããŠããããšèŠãªãããšãã§ããŸãã</dd> + <dt><code>__Secure-</code></dt> + <dd>Cookie åã«ãã®æ¥é èŸãããå Žåã {{HTTPHeader("Set-Cookie")}} ãã£ã¬ã¯ãã£ããåãå
¥ããããã®ã¯ã <code>Secure</code> ã§ãããå®å
šãªãªãªãžã³ããéä¿¡ãããŠããå Žåã®ã¿ã§ãããã㯠<code>__Host-</code> æ¥é èŸããã匱ããã®ã§ãã</dd> +</dl> + +<p>ãããã®æ¥é èŸãä»ããŠããŠãå¶çŽã«é©åããŠããªãã¯ãããŒã¯ãéãããŠããã©ãŠã¶ãŒãæåŠããŸããããã«ãããä»®ã«ãµããã¡ã€ã³ã§æ¥é èŸã®ä»ãã Cookie ãäœæããå Žåããµããã¡ã€ã³ã«éå®ãããããå®å
šã«ç¡èŠããããããŸããã¢ããªã±ãŒã·ã§ã³ãµãŒããŒã¯ããŠãŒã¶ãŒãèªèšŒãããŠããããããã㯠CSRF ããŒã¯ã³ãæ£ãããã©ãããå€æãããšãã«ãç¹å®ã® Cookie åããã§ãã¯ããã ããªã®ã§ãããã¯ã»ãã·ã§ã³ã®åºå®åã«å¯Ÿããé²åŸ¡æ段ãšããŠå¹æçã«æ©èœããŸãã</p> + +<div class="note"> +<p>ã¢ããªã±ãŒã·ã§ã³ãµãŒãäžã§ã¯ããŠã§ãã¢ããªã±ãŒã·ã§ã³ã¯æ¥é èŸãå«ãå®å
šãª Cookie åããã§ãã¯<em>ããªããã°ãªããŸãã</em>ãâãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ããªã¯ãšã¹ãã® {{HTTPHeader("Cookie")}} ããããŒãéä¿¡ããåã« Cookie ããæ¥é èŸãåé€<em>ããŸãã</em>ã</p> +</div> + +<p>Cookie ã®æ¥é èŸãšãã©ãŠã¶ãŒå¯Ÿå¿ã®çŸåšã®ç¶æ
ã«ã€ããŠã¯ã <a href="/ja/docs/Web/HTTP/Headers/Set-Cookie#Cookie_prefixes">Set-Cookie ãªãã¡ã¬ã³ã¹èšäºã®æ¥é èŸã®ç¯</a>ãåç
§ããŠãã ããã</p> + +<h4 id="JavaScript_access_using_Document.cookies" name="JavaScript_access_using_Document.cookies">JavaScript ã§Document.cookies ã䜿çšããŠã¢ã¯ã»ã¹ãã</h4> + +<p>{{domxref("Document.cookie")}} ããããã£ã䜿çšããŠæ°ãã Cookie ãäœæããããšãã§ããŸããã <code>HttpOnly</code> ãã©ã°ãèšå®ãããŠããªãéããæ¢åã® Cookie ã« JavaScript ããã¢ã¯ã»ã¹ããããšãã§ããŸãã</p> + +<pre class="brush: js notranslate">document.cookie = "yummy_cookie=choco"; +document.cookie = "tasty_cookie=strawberry"; +console.log(document.cookie); +// "yummy_cookie=choco; tasty_cookie=strawberry" ããã°ã«èšé²</pre> + +<p>JavaScript ã§çæããã Cookie 㯠<code>HttpOnly</code> ãã©ã°ãå«ãããšãã§ããŸããã</p> + +<p>åŸè¿°ãã<a href="/ja/docs/Web/HTTP/Cookies#Security">ã»ãã¥ãªãã£</a>ã®ç¯ã«èšèŒãããšãããã»ãã¥ãªãã£ã®åœ±é¿ã«æ³šæããŠãã ãããJavaScript ã§äœ¿çšã§ãã Cookie ã¯ãXSS ã«ãã£ãŠçãŸããå¯èœæ§ããããŸãã</p> + +<h2 id="Security" name="Security">ã»ãã¥ãªãã£</h2> + +<div class="note"> +<p>æ
å ±ãã¯ãããŒã«ä¿åãããšãã¯ããã¹ãŠã®ã¯ãããŒã®å€ããšã³ããŠãŒã¶ãŒããèŠããå€æŽã§ããããšãç解ããŠãããŠãã ãããã¢ããªã±ãŒã·ã§ã³ã«ãã£ãŠã¯ããµãŒããŒåŽã§æ€çŽ¢ãããäžéæãªèå¥åã䜿çšãããã JSON ãŠã§ãããŒã¯ã³ã®ãããªä»£æ¿ã®èªèšŒ/æ©å¯æ§ã¡ã«ããºã ã調ã¹ãã»ããè¯ããããããŸããã</p> +</div> + +<p>ã¯ãããŒãžã®æ»æãç·©åããæ¹æ³ã«ã¯æ¬¡ã®ãããªãã®ããããŸãã</p> + +<ul> + <li><code>HttpOnly</code> å±æ§ã䜿çšããŠã JavaScript ããã¯ãããŒã®å€ã«ã¢ã¯ã»ã¹ããããšãé²ããŸãã</li> + <li>æ©å¯æ
å ± (èªèšŒã瀺ãå Žåãªã©) ã®ããã«äœ¿çšãããã¯ãããŒã¯ãæç¶æéãçãã <code>SameSite</code> å±æ§ã <code>Strict</code> ãŸã㯠<code>Lax</code> ã«èšå®ããŠãã ããã (äžèšã® <a href="#">SameSite Cookie</a> ãåç
§ã) <a href="/ja/docs/Web/HTTP/Headers/Set-Cookie#Browser_compatibility">SameSite ã«å¯Ÿå¿ããŠãããã©ãŠã¶ãŒ</a>ã§ã¯ãããã¯ãèªèšŒã¯ãããŒããªãªãžã³éãªã¯ãšã¹ããšäžç·ã«éä¿¡ãããªãããã«ããå¹æãããã®ã§ããã®ãããªãªã¯ãšã¹ãã¯ãã®ã¢ããªã±ãŒã·ã§ã³ãµãŒããŒã«å¯ŸããŠäºå®äžèªèšŒãããŠããªãããšã«ãªããŸãã</li> +</ul> + +<h2 id="Tracking_and_privacy" name="Tracking_and_privacy">ãã©ããã³ã°ãšãã©ã€ãã·ãŒ</h2> + +<h3 id="Third-party_cookies" name="Third-party_cookies">ãµãŒãããŒãã£ã® Cookie</h3> + +<p>Cookie ã¯ãã¡ã€ã³ã«é¢é£ä»ããããŸãããã®ãã¡ã€ã³ãé²èŠ§ããŠããããŒãžã®ãã¡ã€ã³ãšåãã§ããå Žåããã®ã¯ãããŒã¯ã<em>ãã¡ãŒã¹ãããŒã㣠Cookie</em> ãšåŒã°ããŸãããã¡ã€ã³ãç°ãªãå Žåã¯ã<em>ãµãŒãããŒã㣠Cookie</em> ãšåŒã³ãŸãããŠã§ãããŒãžããã¹ãã£ã³ã°ããŠãããµãŒããŒããã¡ãŒã¹ãããŒã㣠Cookie ãèšå®ããäžæ¹ã§ãããŒãžã«ã¯ä»ã®ãã¡ã€ã³ã®ãµãŒããŒã«ä¿åãããŠããç»åããã®ä»ã®ã³ã³ããŒãã³ã (äŸãã°ãåºåãããŒ) ãå«ãŸããŠããå ŽåãããããµãŒãããŒãã£ã¯ãããŒãèšå®ãããããšããããŸãããããã¯äž»ã«ãŠã§ãäžã§ã®åºåããã©ããã³ã°ã«äœ¿çšãããŸããäŸãã° <a href="https://policies.google.com/technologies/types">Google ã䜿çšããŠãã Cookie ã®çš®é¡</a>ãåç
§ããŠãã ããããµãŒãããŒãã£ã®ãµãŒããŒã¯ãè€æ°ã®ãµã€ãã«ã¢ã¯ã»ã¹ããéã«åããã©ãŠã¶ããéä¿¡ãããã¯ãããŒã«åºã¥ããŠããŠãŒã¶ãŒã®é²èŠ§å±¥æŽãç¿æ
£ã®ãããã¡ã€ã«ãæ§ç¯ããããšãã§ããŸãã Firefox ã¯æ¢å®ã§ããã©ãã«ãŒãå«ãããšãç¥ãããŠãããµãŒãããŒãã£ã®ã¯ãããŒããããã¯ããŸãããµãŒãããŒãã£ã®ã¯ãã㌠(ãŸãã¯ãã©ããã³ã°ã¯ãããŒ) ã¯ãä»ã®ãã©ãŠã¶ãŒã®èšå®ãæ¡åŒµæ©èœã«ãã£ãŠããããã¯ãããå ŽåããããŸããã¯ãããŒããããã¯ãããšãäžéšã®ãµãŒãããŒãã£è£œã³ã³ããŒãã³ã (ãœãŒã·ã£ã«ã¡ãã£ã¢ãŠã£ãžã§ãããªã©) ãæå³ããéãã«æ©èœããªããªãããšããããŸãã</p> + +<h3 id="Cookie-related_regulations" name="Cookie-related_regulations">Cookie ã«é¢ããèŠå¶</h3> + +<p>ã¯ãããŒã®äœ¿çšã察象ãšããæ³èŠå¶ã«ã¯ã以äžã®ãããªãã®ããããŸãã</p> + +<ul> + <li>EU ã® äžè¬ããŒã¿ä¿è·èŠå (GDPR)</li> + <li>EU ã® ePrivacy æ什</li> + <li>ã«ãªãã©ã«ãã¢å·æ¶è²»è
ãã©ã€ãã·ãŒæ³</li> +</ul> + +<p>ãããã®èŠå¶ã¯ããããã®ç®¡èœåºå (EUãšã«ãªãã©ã«ãã¢å·ãç¹ã«ã«ãªãã©ã«ãã¢å·ã®æ³åŸã¯ç·åå
¥ã2,500äžãã«ãè¶
ããäºæ¥äœã«ã®ã¿é©çšããããšãã泚æäºé
ããã) ã®ãŠãŒã¶ãŒãã¢ã¯ã»ã¹ãã<em>ã¯ãŒã«ãã¯ã€ã</em>ãŠã§ãäžã®ãããããµã€ãã«é©çšããããããäžççãªåºãããæã£ãŠããŸãã</p> + +<p>ãããã®èŠå¶ã®èŠä»¶ã«ã¯æ¬¡ã®ãããªãã®ããããŸãã</p> + +<ul> + <li>ãµã€ããã¯ãããŒã䜿çšããããšããŠãŒã¶ãŒã«éç¥ããã</li> + <li>ãŠãŒã¶ãŒãäžéšãŸãã¯ãã¹ãŠã®ã¯ãããŒããªããã¢ãŠãã§ããããã«ããã</li> + <li>ãŠãŒã¶ãŒãã¯ãããŒãåãåããªããŠãããµãŒãã¹ã®å€§éšåãå©çšã§ããããã«ããã</li> +</ul> + +<p>å°åã«ãã£ãŠã¯ãä»ã«ãã¯ãããŒã®äœ¿çšã管çããèŠå¶ããããããããŸããããããã®èŠå¶ãç解ãéµå®ããããšã¯ãèªåèªèº«ã®è²¬ä»»ãšãªããŸãããããã®èŠå¶ãéµå®ããã®ã«åœ¹ç«ã€ãã¯ãããŒçŠæ¢ãã³ãŒããæäŸããŠããäŒç€ŸããããŸãã</p> + +<h2 id="Other_ways_to_store_information_in_the_browser" name="Other_ways_to_store_information_in_the_browser">ãã©ãŠã¶ãŒã«æ
å ±ãæ ŒçŽããä»ã®æ¹æ³</h2> + +<p>ãã©ãŠã¶ãŒã«ããŒã¿ãä¿åããå¥ã®ã¢ãããŒããšããŠã <a href="/ja/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API">Web Storage API</a> ããããŸãã <a href="/ja/docs/Web/API/Window/sessionStorage">window.sessionStorage</a> ãš <a href="/ja/docs/Web/API/Window/localStorage">window.localStorage</a> ããããã£ã¯ã»ãã·ã§ã³ã¯ãããŒãšæç¶çã¯ãããŒã«å¯Ÿå¿ããŠããŸãããã¹ãã¬ãŒãžã®å®¹éå¶éãã¯ãããŒãã倧ããããµãŒããŒã«éä¿¡ãããããšã¯ãããŸãããããæ§é åããã倧éã®ããŒã¿ã¯ã <a href="/ja/docs/Web/API/IndexedDB_API">IndexedDB API</a> ãŸãã¯ãã®äžã«æ§ç¯ãããã©ã€ãã©ãªã䜿çšããŠä¿åããããšãã§ããŸãã</p> + +<p>ããŸã³ããã¯ãããŒãšåŒã°ãããã¯ãããŒãåé€ãããåŸã«åäœæãããããã«ããããã®ä»ã®æè¡ãäœæãããŠããŸãããããã®æè¡ã¯ããŠãŒã¶ãŒã®ãã©ã€ãã·ãŒãšãŠãŒã¶ãŒå¶åŸ¡ã®ååã«éåããããŒã¿ãã©ã€ãã·ãŒèŠå¶ã«éåããå¯èœæ§ãããããããã®æè¡ã䜿çšããŠãããŠã§ããµã€ããæ³ç責任ã«ãããããå¯èœæ§ããããŸãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Set-Cookie")}}</li> + <li>{{HTTPHeader("Cookie")}}</li> + <li>{{domxref("Document.cookie")}}</li> + <li>{{domxref("Navigator.cookieEnabled")}}</li> + <li><a href="/ja/docs/Tools/Storage_Inspector">ã¹ãã¬ãŒãžã€ã³ã¹ãã¯ã¿ãŒã䜿ã£ã Cookie ã®èª¿æ»</a></li> + <li><a class="external" href="https://tools.ietf.org/html/rfc6265">Cookie specification: RFC 6265</a></li> + <li><a href="https://en.wikipedia.org/wiki/HTTP_cookie">HTTP cookie on Wikipedia</a></li> + <li><a href="https://gdpr.eu/cookies/">Cookies, the GDPR, and the ePrivacy Directive</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsalloworiginnotmatchingorigin/index.html b/files/ja/web/http/cors/errors/corsalloworiginnotmatchingorigin/index.html new file mode 100644 index 0000000000..d8f2cfd87f --- /dev/null +++ b/files/ja/web/http/cors/errors/corsalloworiginnotmatchingorigin/index.html @@ -0,0 +1,47 @@ +--- +title: 'Reason: CORS header ''Access-Control-Allow-Origin'' does not match ''xyz''' +slug: Web/HTTP/CORS/Errors/CORSAllowOriginNotMatchingOrigin +tags: + - CORS + - CORSAllowOriginNotMatchingOrigin + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSAllowOriginNotMatchingOrigin +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: CORS header 'Access-Control-Allow-Origin' does not match 'xyz'</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœãæªãã®ã</h2> + +<p>ãªã¯ãšã¹ããäœæããŠãããªãªãžã³ãã {{HTTPHeader("Access-Control-Allow-Origin")}} ããããŒã«ãã£ãŠèš±å¯ããããªãªãžã³ã®ãããã«ãäžèŽããªãããšãè¡šããŸãã</p> + +<p>ãã®ãšã©ãŒã¯ãã¬ã¹ãã³ã¹ã«è€æ°ã® <code>Access-Control-Allow-Origin</code> ããããŒãå«ãŸããŠãããšçºçããããšããããŸãã</p> + +<p>ã³ãŒãã CORS ãªã¯ãšã¹ãã䜿çšããŠã¢ã¯ã»ã¹ããŠãããµãŒãã¹ã管çäžã«ããã®ã§ããã°ã <code>Access-Control-Allow-Origin</code> ããããŒããã®ã¢ã¯ã»ã¹å
ãå«ãããã«æ§æãããŠããããšãåã³ãã®ããããŒãã¬ã¹ãã³ã¹å
ã«1ã€ããå«ãŸããŠããªãããšã確èªããŠãã ãããããããŒèªäœã¯ã³ã³ãåºåãã§è€æ°ã®ãªãªãžã³ãåãä»ããã®ã§ãæ°ãããªãªãžã³ãè¿œå ããããšã¯é£ããã¯ãããŸããã</p> + +<p>äŸãã° Apache ã§ã¯ããµãŒããŒæ§æ (ã®äžã® <code><Directory></code>, <code><Location></code>, <code><Files></code>, <code><VirtualHost></code> ã®ãã¡é©åãªç¯) ã«æ¬¡ã®ãããªè¡ãè¿œå ããŠãã ãããæ§æã¯ãµã€ãã <code>.conf</code> ãã¡ã€ã«å㯠(äžè¬çãªåå㯠<code>httpd.conf</code> ã <code>apache.conf</code>) å㯠<code>.htaccess</code> ãã¡ã€ã«ã«ãããŸãã</p> + +<pre>Header set Access-Control-Allow-Origin '<em>origin-list</em>'</pre> + +<p>Nginx ã§ã¯ããã®ããããŒãèšå®ããã³ãã³ãã¯æ¬¡ã®éãã§ãã</p> + +<pre>add_header 'Access-Control-Allow-Origin' '<em>origin-list</em>'</pre> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> + <li><a href="https://enable-cors.org/server.html">Enable CORS: I want to add CORS support to my server</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsdidnotsucceed/index.html b/files/ja/web/http/cors/errors/corsdidnotsucceed/index.html new file mode 100644 index 0000000000..a679f1e32b --- /dev/null +++ b/files/ja/web/http/cors/errors/corsdidnotsucceed/index.html @@ -0,0 +1,46 @@ +--- +title: 'Reason: CORS request did not succeed' +slug: Web/HTTP/CORS/Errors/CORSDidNotSucceed +tags: + - CORS + - CORSDidNotSccceed + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã¯ãã¹ãªãªãžã³ + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSDidNotSucceed +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: CORS request did not succeed</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœã«å€±æããã</h2> + +<p>CORS ã䜿çšãã {{Glossary("HTTP")}} èŠæ±ãããããã¯ãŒã¯ãŸãã¯ãããã³ã«ã¬ãã«ã§ HTTP æ¥ç¶ã«å€±æããããã«å€±æããŸããããšã©ãŒã¯ CORS ã«çŽæ¥é¢é£ãããã®ã§ã¯ãªããããçš®ã®åºæ¬çãªãããã¯ãŒã¯ãšã©ãŒã§ãã</p> + +<p>å€ãã®å Žåããã©ãŠã¶ãŒã®ãã©ã°ã€ã³ (äŸãã°åºåãããã«ãŒããã©ã€ãã·ãŒä¿è·) ããªã¯ãšã¹ãããããã¯ãããšãã«çºçããŸãã</p> + +<p>ãã®ä»ã®å¯èœæ§ã®ããåå ã¯ä»¥äžã®éãã§ãã</p> + +<ul> + <li>ç¡å¹ãªè³æ Œæ
å ±ãçšã㊠<code>https</code> ã®ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããšãããšããã®ãšã©ãŒãçºçããŸãã</li> + <li><code>http</code> ã®ãªãœãŒã¹ã« <code>https</code> ã®ãªãªãžã³ã®ããŒãžããã¢ã¯ã»ã¹ããããšããå Žåãããã®ãšã©ãŒãçºçããŸãã</li> + <li>Firefox 68 ã§ã¯ã <code>https</code> ã®ããŒãžã <code>http://localhost</code> ãžã¢ã¯ã»ã¹ããããšãçŠæ¢ãããŠããŸããããã㯠<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1488740">Bug 1488740</a> ã§å€æŽãããå¯èœæ§ããããŸãã</li> + <li>ãµãŒããŒã ({{Glossary("Preflight request", "ããªãã©ã€ããªã¯ãšã¹ã")}}ã«å¿çããã®ã«) å®éã®ãªã¯ãšã¹ãã«ã¯å¿çããªãã£ãå Žåãéçºäžã® HTTP ãµãŒãã¹ãäœãããŒã¿ãè¿ããã«ç°åžžåæ¢ããå Žåãªã©ãèããããŸãã</li> +</ul> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsdisabled/index.html b/files/ja/web/http/cors/errors/corsdisabled/index.html new file mode 100644 index 0000000000..c86d2c64c2 --- /dev/null +++ b/files/ja/web/http/cors/errors/corsdisabled/index.html @@ -0,0 +1,37 @@ +--- +title: 'Reason: CORS disabled' +slug: Web/HTTP/CORS/Errors/CORSDisabled +tags: + - CORS + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - ãªãœãŒã¹ + - å
±æ + - åäžãªãªãžã³ + - ç¡å¹ +translation_of: Web/HTTP/CORS/Errors/CORSDisabled +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: CORS disabled</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœã«å€±æããã</h2> + +<p>{{Glossary("CORS")}} ã䜿ãå¿
èŠãããèŠæ±ãè¡ãããŸãããããŠãŒã¶ãŒã®ãã©ãŠã¶ãŒã§ CORS ãç¡å¹ã«ãªã£ãŠããŸãããããçºçããå Žåããã©ãŠã¶ãŒã® CORS ãæå¹ã«æ»ãå¿
èŠããããŸãã</p> + +<p>Firefox ã§ã¯ã CORS ãç¡å¹ã«ããèšå®ã¯ <code>content.cors.disable</code> ã§ããããã <code>true</code> ã«èšå®ãããš CORS ãç¡å¹ã«ãªãããã®å Žåã¯åžžã«ã CORS èŠæ±ã¯åžžã«ãã®ãšã©ãŒã§å€±æããŸãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsexternalredirectnotallowed/index.html b/files/ja/web/http/cors/errors/corsexternalredirectnotallowed/index.html new file mode 100644 index 0000000000..db4ce8efe7 --- /dev/null +++ b/files/ja/web/http/cors/errors/corsexternalredirectnotallowed/index.html @@ -0,0 +1,38 @@ +--- +title: 'Reason: CORS request external redirect not allowed' +slug: Web/HTTP/CORS/Errors/CORSExternalRedirectNotAllowed +tags: + - CORS + - CORSExternalRedirectNotAllowed + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSExternalRedirectNotAllowed +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: CORS request external redirect not allowed</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœãæªãã®ã</h2> + +<p>{{Glossary("CORS")}} ãªã¯ãšã¹ãã«å¯ŸããŠããµãŒããŒãå
ã®ãªã¯ãšã¹ããšã¯ç°ãªããªãªãžã³ã® URL ãžã®ãªãã€ã¬ã¯ããè¿çããŸãããããã㯠CORS ãªã¯ãšã¹ãã§ã¯èš±å¯ãããŠããŸããã</p> + +<p>äŸãã°ã <code>https://service.tld/fetchdata</code> ã®ããŒãžããªã¯ãšã¹ãããã HTTP ã¬ã¹ãã³ã¹ã "301 Moved Permanently" å㯠"307 Temporary Redirect" å㯠"308 Permanent Redirect" ã§ã <code>Location</code> ã <code>https://anotherservice.net/getdata</code> ã§ãã£ãå Žåããã®çç±ã§ CORS ãªã¯ãšã¹ãã倱æããŸãã</p> + +<p>åé¡ãä¿®æ£ããã«ã¯ããªãã€ã¬ã¯ãã«ãã£ãŠå ±åãããæ°ãã URL ã䜿çšããããã«ã³ãŒããæŽæ°ãããªãã€ã¬ã¯ããåé¿ããŸãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsinvalidallowheader/index.html b/files/ja/web/http/cors/errors/corsinvalidallowheader/index.html new file mode 100644 index 0000000000..2e8b34980d --- /dev/null +++ b/files/ja/web/http/cors/errors/corsinvalidallowheader/index.html @@ -0,0 +1,39 @@ +--- +title: 'Reason: invalid token âxyzâ in CORS header âAccess-Control-Allow-Headersâ' +slug: Web/HTTP/CORS/Errors/CORSInvalidAllowHeader +tags: + - CORS + - CORSInvalidAllowHeader + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSInvalidAllowHeader +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: invalid token âxyzâ in CORS header âAccess-Control-Allow-Headersâ</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœã«å€±æããã</h2> + +<p>ãµãŒããŒããéä¿¡ããã {{Glossary("CORS")}} èŠæ±ãžã®å¿çã«ãäžã€ä»¥äžã®ç¡å¹ãªããããŒåãå«ãã {{HTTPHeader("Access-Control-Allow-Headers")}} ããããŒãå«ãŸããŠããŸãã</p> + +<p><code>Access-Control-Allow-Headers</code> ããããŒã¯ã{{Glossary("preflight request", "ããªãã©ã€ãèŠæ±")}}ãžã®å¿çã®äžã§ãµãŒããŒããéä¿¡ãããŸããããã¯ã©ã® <a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a>ã CORS èŠæ±ã§èš±å¯ãããŠããããã¯ã©ã€ã¢ã³ãã«ç¥ãããŸããã¯ã©ã€ã¢ã³ãã®{{Glossary("user agent", "ãŠãŒã¶ãŒãšãŒãžã§ã³ã")}}ãããã®ããããŒã§ç€ºãããã³ã³ãã§åºåãããå€ã®äžããç解ã§ããªãããããŒãããã°ããã®ãšã©ãŒãçºçããŸãã</p> + +<p>ããã¯ã»ãšãã©ã¯ãµãŒããŒåŽã§ããä¿®æ£ã§ããªãåé¡ã§ããããµãŒããŒã®æ§æãå€æŽããŠã <code>Access-Control-Allow-Headers</code> ããããŒããç¡å¹åã¯æªç¥ã®ããããŒåãéããªãããã«ããŸããã¯ã©ã€ã¢ã³ãã§äœ¿çšããŠãããŠãŒã¶ãŒãšãŒãžã§ã³ãã® HTTP ã©ã€ãã©ãªãææ°çã§ãããã©ããããã§ãã¯ããã®ãè¯ããããããŸããã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> + <li><a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsinvalidallowmethod/index.html b/files/ja/web/http/cors/errors/corsinvalidallowmethod/index.html new file mode 100644 index 0000000000..6e40442974 --- /dev/null +++ b/files/ja/web/http/cors/errors/corsinvalidallowmethod/index.html @@ -0,0 +1,36 @@ +--- +title: 'Reason: invalid token âxyzâ in CORS header âAccess-Control-Allow-Methodsâ' +slug: Web/HTTP/CORS/Errors/CORSInvalidAllowMethod +tags: + - CORS + - CORSInvalidAllowMethod + - HTTP + - HTTPS + - console + - ãšã©ãŒ + - ãªãªãžã³é + - ã¡ãã»ãŒãž +translation_of: Web/HTTP/CORS/Errors/CORSInvalidAllowMethod +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: invalid token âxyzâ in CORS header âAccess-Control-Allow-Methodsâ</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœã«å€±æããã</h2> + +<p>ãµãŒããŒããéä¿¡ããã {{Glossary("CORS")}} èŠæ±ãžã®å¿çã«ãäžã€ä»¥äžã®ç¡å¹ãªã¡ãœããåãå«ãã {{HTTPHeader("Access-Control-Allow-Methods")}} ããããŒãå«ãŸããŠããŸãã</p> + +<p><code>Access-Control-Allow-Methods</code> ããããŒã¯ãã©ã® <a href="/ja/docs/Web/HTTP/Methods">HTTP èŠæ±ã¡ãœãã</a>ã CORS èŠæ±ã«å¯Ÿå¿ããŠããããã¯ã©ã€ã¢ã³ãã«ç¥ãããŸããããããŒã®å€ã¯ã{{HTTPMethod("GET")}}, {{HTTPMethod("POST")}}, {{HTTPMethod("HEAD")}} ã®ãã㪠HTTP ã¡ãœããåãã³ã³ãã§åºåã£ãæååã§ããã¯ã©ã€ã¢ã³ãã®{{Glossary("user agent", "ãŠãŒã¶ãŒãšãŒãžã§ã³ã")}}ãæå®ãããå€ãç解ã§ããªãå Žåããã®ãšã©ãŒãçºçããŸãã</p> + +<p>ããã¯ã»ãšãã©ã¯ãµãŒããŒåŽã§ããä¿®æ£ã§ããªãåé¡ã§ããããµãŒããŒã®æ§æãå€æŽããŠã <code>Access-Control-Allow-Methods</code> ããããŒããç¡å¹åã¯æªç¥ã®ã¡ãœããåãéããªãããã«ããŸããã¯ã©ã€ã¢ã³ãã§äœ¿çšããŠãããŠãŒã¶ãŒãšãŒãžã§ã³ãã® HTTP ã©ã€ãã©ãªãææ°çã§ãããã©ããããã§ãã¯ããã®ãè¯ããããããŸããã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> + <li><a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsmethodnotfound/index.html b/files/ja/web/http/cors/errors/corsmethodnotfound/index.html new file mode 100644 index 0000000000..3f391edcd9 --- /dev/null +++ b/files/ja/web/http/cors/errors/corsmethodnotfound/index.html @@ -0,0 +1,45 @@ +--- +title: 'Reason: Did not find method in CORS header âAccess-Control-Allow-Methodsâ' +slug: Web/HTTP/CORS/Errors/CORSMethodNotFound +tags: + - CORS + - CORSMethodNotFound + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSMethodNotFound +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: Did not find method in CORS header âAccess-Control-Allow-Methodsâ</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœãæªãã®ã</h2> + +<p>{{Glossary("CORS")}} ãªã¯ãšã¹ãã§äœ¿ãããŠãã HTTP ã¡ãœããããã¬ã¹ãã³ã¹ã® {{HTTPHeader("Access-Control-Allow-Methods")}} ããããŒã§æå®ãããã¡ãœããã®äžèŠ§ã«å«ãŸããŠããŸããããã®ããããŒã¯ã CORS ã䜿çšããŠãªã¯ãšã¹ãã§æå®ããã URL ã«ã¢ã¯ã»ã¹ããæã«äœ¿ããã HTTP ã¡ãœããã®ã³ã³ãåºåãã®ãªã¹ããæå®ããŸãããªã¯ãšã¹ããä»ã®ã¡ãœããã䜿çšããŠãããšããã®ãšã©ãŒãçºçããŸãã</p> + +<p>äŸãã°ãã¬ã¹ãã³ã¹ã«ä»¥äžã®è¡ãå«ãŸããŠãããšã</p> + +<pre>Access-Control-Allow-Methods: GET,HEAD,POST</pre> + +<p>{{HTTPMethod("PUT")}} ãªã¯ãšã¹ãã䜿ãããšãããšããªã¯ãšã¹ãã倱æãããã®ãšã©ãŒãçºçããŸãã</p> + +<p>ã³ãŒããããµãŒãã¹ã«ã¢ã¯ã»ã¹ãããšãã¯ãèš±å¯ããã HTTP ã¡ãœããã®ã¿ã䜿çšããããã«ç¢ºèªããŠãã ããã</p> + +<p><strong>ã¡ã¢:</strong> ãµãŒããŒã <code>Access-Control-Allow-methods</code> ããããŒã«ç解ã§ããªãåã¯æªå®çŸ©ã®ã¡ãœããåãå«ããå Žåãå¥ãªãšã©ãŒ <code><a href="/en-US/docs/Web/HTTP/CORS/Errors/CORSInvalidAllowMethod">Reason: invalid token âxyz' in CORS header âAccess-Control-Allow-Methodsâ</a></code> ãçºçããŸãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> + <li><a href="/ja/docs/Web/HTTP/Methods">HTTP ãªã¯ãšã¹ãã¡ãœãã</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsmissingallowcredentials/index.html b/files/ja/web/http/cors/errors/corsmissingallowcredentials/index.html new file mode 100644 index 0000000000..6c1de312ae --- /dev/null +++ b/files/ja/web/http/cors/errors/corsmissingallowcredentials/index.html @@ -0,0 +1,44 @@ +--- +title: 'Reason: expected âtrueâ in CORS header âAccess-Control-Allow-Credentialsâ' +slug: Web/HTTP/CORS/Errors/CORSMIssingAllowCredentials +tags: + - CORS + - CORSMissingAllowCredentials + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSMIssingAllowCredentials +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: expected âtrueâ in CORS header âAccess-Control-Allow-Credentialsâ</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœãæªãã®ã</h2> + +<p>{{Glossary("CORS")}} ãªã¯ãšã¹ããèªèšŒæ
å ±ã䜿çšããŠãµãŒããŒã®èš±å¯ãèŠæ±ãããŠããŸããããµãŒããŒã® {{HTTPHeader("Access-Control-Allow-Credentials")}} ããããŒã®å€ã <code>true</code> ã«èšå®ãããŠããããå©çšã§ããããã«ãªã£ãŠããŸããã</p> + +<p>ãã®åé¡ãã¯ã©ã€ã¢ã³ãåŽã§è§£æ±ºããã«ã¯ãã³ãŒããä¿®æ£ããŠèªèšŒæ
å ±ã䜿çšããã«ãªã¯ãšã¹ãããããã«ããŠãã ããã</p> + +<ul> + <li>ãªã¯ãšã¹ãã {{domxref("XMLHttpRequest")}} ãçšããŠçºè¡ãããŠããå Žåã¯ã {{domxref("XMLHttpRequest.withCredentials", "withCredentials")}} ã« <code>true</code> ãèšå®ããªããã確èªããŠãã ããã</li> + <li><a href="/ja/docs/Web/API/Server-sent_events">Server-sent event</a> ã䜿çšããŠããå Žåã¯ã {{domxref("EventSource.withCredentials")}} ã <code>false</code> (æ¢å®å€) ã§ããããšã確èªããŠãã ããã</li> + <li><a href="/en-US/docs/Web/API/Fetch_API">Fetch API</a> ã䜿çšããŠããå Žåã¯ã {{domxref("Request.credentials")}} ã <code>"omit"</code> ã§ããããšã確èªããŠãã ããã</li> +</ul> + +<p>ãµãŒããŒã®æ§æãå€æŽããŠãã®ãšã©ãŒãé€å»ããã«ã¯ããµãŒããŒã®æ§æ㧠<code>Access-Control-Allow-Credentials</code> ããããŒã®å€ã« <code>true</code> ãèšå®ãããã調æŽããŠãã ããã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsmissingallowheaderfrompreflight/index.html b/files/ja/web/http/cors/errors/corsmissingallowheaderfrompreflight/index.html new file mode 100644 index 0000000000..42e8f25f2f --- /dev/null +++ b/files/ja/web/http/cors/errors/corsmissingallowheaderfrompreflight/index.html @@ -0,0 +1,39 @@ +--- +title: >- + Reason: missing token âxyzâ in CORS header âAccess-Control-Allow-Headersâ from + CORS preflight channel +slug: Web/HTTP/CORS/Errors/CORSMissingAllowHeaderFromPreflight +tags: + - CORS + - CORSMissingAllowHeaderFromPreflight + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSMissingAllowHeaderFromPreflight +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: missing token âxyzâ in CORS header âAccess-Control-Allow-Headersâ from CORS preflight channel</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœã«å€±æããã®ã</h2> + +<p> <code>Access-Control-Allow-Headers</code> ããããŒããµãŒããŒããéä¿¡ãããã©ã®ããããŒã {{Glossary("CORS")}} èŠæ±ã«å¯Ÿå¿ããŠããããç¥ãããŸãã <code>Access-Control-Allow-Headers</code> ã®å€ã¯ã³ã³ãåºåãã®ããããŒåã®ãªã¹ãã§ã "<code>X-Custom-Information</code>" ããã®ä»ã®æšæºçãã€åºæ¬çã§ã¯ãªãããããŒå (åžžã«èš±å¯ãããŠãããã®) ãèšè¿°ããŸãã</p> + +<p>ãã®ãšã©ãŒã¯æ確ã«èš±å¯ãããŠããªãããã㌠(ããªãã¡ããµãŒããŒããéããã <code>Access-Control-Allow-Headers</code> ããããŒã§æå®ããããªã¹ãã«å«ãŸããŠããªããã®) ã®ããªãã©ã€ããªã¯ãšã¹ããè¡ãããšãããšãã«çºçããŸãããããä¿®æ£ããã«ã¯ããµãŒããŒãæå®ãããããããŒãèš±å¯ããããã«æŽæ°ãããããã®ããããŒã䜿çšããªãããã«ããå¿
èŠããããŸãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> + <li><a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsmissingalloworigin/index.html b/files/ja/web/http/cors/errors/corsmissingalloworigin/index.html new file mode 100644 index 0000000000..80e851c0dd --- /dev/null +++ b/files/ja/web/http/cors/errors/corsmissingalloworigin/index.html @@ -0,0 +1,58 @@ +--- +title: 'Reason: CORS header ''Access-Control-Allow-Origin'' missing' +slug: Web/HTTP/CORS/Errors/CORSMissingAllowOrigin +tags: + - CORS + - CORSMissingAllowOrigin + - Cross-Origin + - Error + - HTTP + - HTTPS + - Messages + - Reasons + - Security + - console + - troubleshooting +translation_of: Web/HTTP/CORS/Errors/CORSMissingAllowOrigin +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox notranslate">Reason: CORS header 'Access-Control-Allow-Origin' missing</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœãæªãã®ã</h2> + +<p>{{Glossary("CORS")}} ãªã¯ãšã¹ããžã®ã¬ã¹ãã³ã¹ãããªãœãŒã¹ãçŸåšã®ãªãªãžã³å
ã§æäœããŠããã³ã³ãã³ãã«ãã£ãŠã¢ã¯ã»ã¹ã§ãããã©ãããå€æããããã«äœ¿ããããå¿
é ã® {{HTTPHeader("Access-Control-Allow-Origin")}} ããããŒãæ¬ ããŠããŸãã</p> + +<p>ãµãŒããŒãèªåã§å¶åŸ¡ã§ããå Žåã¯ãèŠæ±ããŠãããµã€ãã®ãªãªãžã³ã <code>Access-Control-Allow-Origin</code> ããããŒã®å€ã«è¿œå ããŠãã¢ã¯ã»ã¹ãèš±å¯ãããŠãããã¡ã€ã³ã®äžèŠ§ã«è¿œå ããŠãã ããã</p> + +<p>äŸãã°ã https://amazing.site ã®ãµã€ãã CORS ã䜿çšãããªãœãŒã¹ã«ã¢ã¯ã»ã¹ã§ããããèš±å¯ããããã«ã¯ãããããŒã以äžã®ããã«ããŠãã ããã</p> + +<pre class="notranslate">Access-Control-Allow-Origin: https://amazing.site</pre> + +<p><code>*</code> ã䜿çšããããšã§ããããããµã€ãã«ã¢ã¯ã»ã¹ãèš±å¯ãããããµã€ããæ§æããããšãã§ããŸããããã¯å
¬é API ã«ã®ã¿äœ¿çšããŠãã ãããéå
¬éã® API ã«ã¯ <code>*</code> ã䜿çšããã¹ãã§ã¯ãªãã代ããã«å
·äœçãªãã¡ã€ã³ããã¡ã€ã³ã®äžèŠ§ãèšå®ããŠãã ãããå ããŠãã¯ã€ã«ãã«ãŒã㯠{{htmlattrxref("crossorigin")}} å±æ§ã <code>anonymous</code> ã«èšå®ãããèŠæ±ã«ã®ã¿åäœãããªã¯ãšã¹ãã§ã¯ Cookie ã®ãããªè³æ Œæ
å ±ã®éä¿¡ãæå¶ããŸãã</p> + +<pre class="notranslate">Access-Control-Allow-Origin: *</pre> + +<div class="warning"> +<p><strong>èŠå:</strong> ã¯ã€ã«ãã«ãŒãã䜿çšããŠãéå
¬éã® API ãžã®ã¢ã¯ã»ã¹ããã¹ãŠã®ãµã€ãã«èš±å¯ããããšã¯ãæªãèãã§ãã</p> +</div> + +<p>äœããã®ãµã€ãã CORS ãªã¯ãšã¹ãã <code>*</code> ã¯ã€ã«ãã«ãŒãã䜿çšããããš<em>ãªã</em> (ããšãã°è³æ Œæ
å ±ãæå¹ã«ããå Žå) å©çšã§ããããã«ããã«ã¯ããµãŒããŒã«ãªã¯ãšã¹ãã® <code>Origin</code> ããããŒã®å€ãèªã¿åãããã®å€ã <code>Access-Control-Allow-Origin</code> ã«èšå®ããããšã«å ããŠãäžéšã®ããããŒããªãªãžã³ã«å¿ããŠåçã«èšå®ãããããšã瀺ãããã« <code>Vary: Origin</code> ããããŒãèšå®ããå¿
èŠããããŸãã</p> + +<p>äŸãã° Apache ã§ã¯ããµãŒããŒæ§æ (ã®äžã® <code><Directory></code>, <code><Location></code>, <code><Files></code>, <code><VirtualHost></code> ã®ãã¡é©åãªç¯) ã«æ¬¡ã®ãããªè¡ãè¿œå ããŠãã ãããæ§æã¯ãµã€ãã <code>.conf</code> ãã¡ã€ã«å㯠(äžè¬çãªåå㯠<code>httpd.conf</code> ã <code>apache.conf</code>) å㯠<code>.htaccess</code> ãã¡ã€ã«ã«ãããŸãã</p> + +<pre class="notranslate">Header set Access-Control-Allow-Origin '<em>origin-list</em>'</pre> + +<p>Nginx ã§ã¯ããã®ããããŒãèšå®ããã³ãã³ãã¯æ¬¡ã®éãã§ãã</p> + +<pre class="notranslate">add_header 'Access-Control-Allow-Origin' '<em>origin-list</em>'</pre> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsmultiplealloworiginnotallowed/index.html b/files/ja/web/http/cors/errors/corsmultiplealloworiginnotallowed/index.html new file mode 100644 index 0000000000..70d3c0e7fb --- /dev/null +++ b/files/ja/web/http/cors/errors/corsmultiplealloworiginnotallowed/index.html @@ -0,0 +1,37 @@ +--- +title: 'Reason: Multiple CORS header ''Access-Control-Allow-Origin'' not allowed' +slug: Web/HTTP/CORS/Errors/CORSMultipleAllowOriginNotAllowed +tags: + - CORS + - CORSMultipleAllowOriginNotAllowed + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSMultipleAllowOriginNotAllowed +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: Multiple CORS header âAccess-Control-Allow-Originâ not allowed</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœãæªãã®ã</h2> + +<p>è€æ°ã® {{HTTPHeader("Access-Control-Allow-Origin")}} ããããŒããµãŒãããéä¿¡ãããŸãããããã¯èš±å¯ãããŠããŸããã</p> + +<p>ãµãŒããŒãžã®ã¢ã¯ã»ã¹æš©ãããã®ã§ããã°ãå®è£
ãå€æŽã㊠<code>Access-Control-Allow-Origin</code> ããããŒã§{{Glossary("origin", "ãªãªãžã³")}}ãè¿ãããã«ããŠãã ããããã©ãŠã¶ãŒã¯åäžã®ãªãªãžã³ã null ã®ã©ã¡ããã®å€ããåãä»ããªãã®ã§ããªãªãžã³ã®ãªã¹ããéãè¿ãããšã¯ã§ããŸããã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> + <li><a href="https://enable-cors.org/server.html">Enable CORS: I want to add CORS support to my server</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsnotsupportingcredentials/index.html b/files/ja/web/http/cors/errors/corsnotsupportingcredentials/index.html new file mode 100644 index 0000000000..efa77d5a10 --- /dev/null +++ b/files/ja/web/http/cors/errors/corsnotsupportingcredentials/index.html @@ -0,0 +1,46 @@ +--- +title: >- + Reason: Credential is not supported if the CORS header + âAccess-Control-Allow-Originâ is â*â +slug: Web/HTTP/CORS/Errors/CORSNotSupportingCredentials +tags: + - CORS + - CORSNotSupportingCredentials + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSNotSupportingCredentials +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: Credential is not supported if the CORS header âAccess-Control-Allow-Originâ is â*â</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœãæªãã®ã</h2> + +<p>{{Glossary("CORS")}} ãªã¯ãšã¹ããèªèšŒãã©ã°ä»ãã§è©Šã¿ãããŸãããããµãŒããŒã {{HTTPHeader("Access-Control-Allow-Origin")}} ã®å€ãšããŠã¯ã€ã«ãã«ãŒã (<code>"*"</code>) ã䜿çšããŠæ§æãããŠãããèªèšŒæ
å ±ãå©çšããããšãèš±å¯ãããŠããŸããã</p> + +<p>ãã®åé¡ãã¯ã©ã€ã¢ã³ãåŽã§ä¿®æ£ããã«ã¯ã CORS ãªã¯ãšã¹ããçºè¡ããéã«èªèšŒãã©ã°ã®å€ã確å®ã« <code>false</code> ã«ããã ãã§ãã</p> + +<ul> + <li>ãªã¯ãšã¹ãã {{domxref("XMLHttpRequest")}} ãçšããŠçºè¡ãããŠããå Žåã¯ã {{domxref("XMLHttpRequest.withCredentials", "withCredentials")}} ã« <code>true</code> ãèšå®ããªããã確èªããŠãã ããã</li> + <li><a href="/ja/docs/Web/API/Server-sent_events">Server-sent event</a> ã䜿çšããŠããå Žåã¯ã {{domxref("EventSource.withCredentials")}} ã <code>false</code> (æ¢å®å€) ã§ããããšã確èªããŠãã ããã</li> + <li><a href="/ja/docs/Web/API/Fetch_API">Fetch API</a> ã䜿çšããŠããå Žåã¯ã {{domxref("Request.credentials")}} ã <code>"omit"</code> ã§ããããšã確èªããŠãã ããã</li> +</ul> + +<p>ãµãŒããŒã®åäœã調æŽããå¿
èŠãããå Žåã¯ã <code>Access-Control-Allow-Origin</code> ã®ç»åãå€æŽããŠãã¯ã©ã€ã¢ã³ããèªã¿èŸŒãŸãããªãªãžã³ãžã®ã¢ã¯ã»ã¹ãèš±å¯ããå¿
èŠãããã§ãããã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsoriginheadernotadded/index.html b/files/ja/web/http/cors/errors/corsoriginheadernotadded/index.html new file mode 100644 index 0000000000..adf59fff6b --- /dev/null +++ b/files/ja/web/http/cors/errors/corsoriginheadernotadded/index.html @@ -0,0 +1,36 @@ +--- +title: 'Reason: CORS header âOriginâ cannot be added' +slug: Web/HTTP/CORS/Errors/CORSOriginHeaderNotAdded +tags: + - CORS + - CORSOriginHeaderNotAdded + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSOriginHeaderNotAdded +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: CORS header âOriginâ cannot be added</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœãæªãã®ã</h2> + +<p>{{Glossary("user agent", "ãŠãŒã¶ãŒãšãŒãžã§ã³ã")}}ãå¿
èŠãª {{HTTPHeader("Origin")}} ã {{Glossary("HTTP")}} ãªã¯ãšã¹ãã«è¿œå ããããšãã§ããŸããã§ããããã¹ãŠã® CORS ãªã¯ãšã¹ã㯠<code>Origin</code> ããããŒãå«ãã§ããªããã°ãªããŸããã</p> + +<p>ããã¯äŸãã°ã JavaScript ã®ã³ãŒããè€æ°ã®ãã¡ã€ã³ã®ã³ã³ãã³ãã«ã¢ã¯ã»ã¹ã§ããããé«ãæš©éã§å®è¡ãããŠããå Žåãªã©ã«èµ·ããããšããããŸãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corspreflightdidnotsucceed/index.html b/files/ja/web/http/cors/errors/corspreflightdidnotsucceed/index.html new file mode 100644 index 0000000000..830e1e9ae3 --- /dev/null +++ b/files/ja/web/http/cors/errors/corspreflightdidnotsucceed/index.html @@ -0,0 +1,39 @@ +--- +title: 'Reason: CORS preflight channel did not succeed' +slug: Web/HTTP/CORS/Errors/CORSPreflightDidNotSucceed +tags: + - CORS + - CORSPreflightDidNotSucceed + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«ã·ã¥ãŒãã£ã³ã° + - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSPreflightDidNotSucceed +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: CORS preflight channel did not succeed</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœã«å€±æããã</h2> + +<p>{{Glossary("CORS")}} ã®èŠæ±ãããªãã©ã€ããå¿
èŠãšããŠããŸãããããªãã©ã€ããå®è¡ã§ããŸããã§ããããããã©ã€ãã倱æãããšçç±ãšããŠèããããããšã¯è€æ°ãããŸãã</p> + +<ul> + <li>ãã§ã«ãµã€ãéã®èŠæ±ã§ããªãã©ã€ããè¡ãããŠãããããªãã©ã€ããåã³è¡ãããšãèš±å¯ãããŠããªããã³ãŒãã確èªããŠãäžã€ã®ã³ãã¯ã·ã§ã³ã§äžåºŠã ãããªãã©ã€ããè¡ãããã«ããŠãã ããã</li> + <li>ããªãã©ã€ãèŠæ±ã¯åã«éåžžã®ãããã¯ãŒã¯ãšã©ãŒã®é¡ã§å€±æããã</li> +</ul> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/corsrequestnothttp/index.html b/files/ja/web/http/cors/errors/corsrequestnothttp/index.html new file mode 100644 index 0000000000..33105d9d22 --- /dev/null +++ b/files/ja/web/http/cors/errors/corsrequestnothttp/index.html @@ -0,0 +1,42 @@ +--- +title: 'Reason: CORS request not HTTP' +slug: Web/HTTP/CORS/Errors/CORSRequestNotHttp +tags: + - CORS + - CORSRequestNotHttp + - HTTP + - HTTPS + - ãšã©ãŒ + - ãªãªãžã³é + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ã¡ãã»ãŒãž + - çç± +translation_of: Web/HTTP/CORS/Errors/CORSRequestNotHttp +--- +<div>{{HTTPSidebar}}</div> + +<h2 id="Reason" name="Reason">çç±</h2> + +<pre class="syntaxbox">Reason: CORS request not HTTP</pre> + +<h2 id="What_went_wrong" name="What_went_wrong">äœãæªãã®ã</h2> + +<p>{{Glossary("CORS")}} ãªã¯ãšã¹ã㯠URL ã¹ããŒã ã HTTPS ã®å Žåã®ã¿å©çšã§ããŸããããªã¯ãšã¹ãã§æå®ããã URL ãç°ãªãçš®é¡ã®ãã®ã§ããããã¯ãããŒã«ã«ãã¡ã€ã«ãæå®ãã URL ãã <code>file:///</code> ã® URL ã䜿çšããŠããå Žåã«ããèµ·ãããŸãã</p> + +<p>ãã®åé¡ãä¿®æ£ããã«ã¯ãåçŽã« CORS ã«é¢ãããªã¯ãšã¹ããçºè¡ããéã« HTTPS ã® URL ã䜿çšããããã«ããŠãã ããã</p> + +<h3 id="Firefox_68ã«ãããããŒã«ã«ãã¡ã€ã«ã»ãã¥ãªãã£">Firefox 68ã«ãããããŒã«ã«ãã¡ã€ã«ã»ãã¥ãªãã£</h3> + +<p>Firefox 67以åã§ã¯ãŠãŒã¶ã <code>file:///</code> URIãçšããŠããŒãžãéãããšããããŒãžã®ãªãªãžã³ã¯ãã®éãããããŒãžã®ãããã£ã¬ã¯ããªãšããŠå®çŸ©ãããŠããŸãããåããã£ã¬ã¯ããªããã®ãµããã£ã¬ã¯ããªã«ãããªãœãŒã¹ã¯ãCORSåäžãªãªãžã³ã«ãŒã«ãé©çšããéã«ã¯åäžãªãªãžã³ãšã¿ãªãããŠããŸããã</p> + +<p>Firefox 68以éã§ã¯ <a href="https://www.mozilla.org/en-US/security/advisories/mfsa2019-21/#CVE-2019-11730">CVE-2019-11730 </a>ã®å¯ŸçãšããŠã <code>file:///</code> URIãçšããŠéãããããŒãžã®ãªãªãžã³ã¯ãããã ãã®ãã®ãšããŠå®çŸ©ãããŸããã€ãŸããåããã£ã¬ã¯ããªããã®ãµããã£ã¬ã¯ããªã«ãããªãœãŒã¹ã¯ãCORSåäžãªãªãžã³ã«ãŒã«ãæºãããªããªããŸããããã®æ°ããªæ¯ãèãã¯ã<code>privacy.file_unique_origin</code> èšå®ãçšããŠããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> + <li><a href="/ja/docs/Learn/Common_questions/What_is_a_URL">URL ãšã¯</a></li> +</ul> diff --git a/files/ja/web/http/cors/errors/index.html b/files/ja/web/http/cors/errors/index.html new file mode 100644 index 0000000000..c7b4ce9fc3 --- /dev/null +++ b/files/ja/web/http/cors/errors/index.html @@ -0,0 +1,74 @@ +--- +title: CORS ã®ãšã©ãŒ +slug: Web/HTTP/CORS/Errors +tags: + - CORS + - HTTP + - HTTPS + - ãšã©ãŒ + - ã³ã³ãœãŒã« + - ã»ãã¥ãªã㣠+ - ãã©ãã«è§£æ±º + - ã¡ãã»ãŒãž + - åäžãªãªãžã³ +translation_of: Web/HTTP/CORS/Errors +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><ruby><a href="/ja/docs/Web/HTTP/CORS">ãªãªãžã³éãªãœãŒã¹å
±æ</a><rp> (</rp><rt>Cross-Origin Resource Sharing</rt><rp>) </rp></ruby> ({{Glossary("CORS")}}) ã¯ããµãŒããŒã<a href="/ja/docs/Web/Security/Same-origin_policy">åäžãªãªãžã³ããªã·ãŒ</a>ãç·©åããããšãã§ããæšæºã§ãã</span>äŸãã°ããµã€ããåã蟌ã¿å¯èœãªãµãŒãã¹ãæäŸããå Žåããã®ãããªå¶çŽãç·©åããå¿
èŠããããããããŸããããã®ãã㪠CORS ã®æ§æã®èšå®ã¯å¿
ãããç°¡åã§ã¯ãªããããããåéºçã§ãããããã®ããŒãžã§ã¯ããããã CORS ã®ãšã©ãŒã¡ãã»ãŒãžãšè§£æ±ºæ¹æ³ã調æ»ããŸãã</p> + +<p>CORS æ§æãæ£ããèšå®ãããŠããªããšããã©ãŠã¶ãŒã³ã³ãœãŒã«ã«ã¯ <code>"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at $somesite"</code> ã®ãããªãšã©ãŒã衚瀺ããŠããªã¯ãšã¹ãã CORS ã®ã»ãã¥ãªãã£èŠåã䟵害ããŠããããã«ãããã¯ãããããšã瀺ããŸããããã¯å¿
ãããèšå®ãã¹ãšã¯éããŸãããå®éã«ã¯ããŠãŒã¶ãŒã®ãŠã§ãã¢ããªã±ãŒã·ã§ã³ããã³ãªã¢ãŒãã®å€éšãµãŒãã¹ããã®ãªã¯ãšã¹ãããæå³çã«èš±å¯ãããŠããªãå ŽåããããŸãããããããã ãããšã³ããã€ã³ãã䜿çšå¯èœã§ããå Žåãæåããããã«ã¯ãããã°ãå¿
èŠã§ãã</p> + +<h2 id="Identifying_the_issue" name="Identifying_the_issue">åé¡ã®èå¥</h2> + +<p>CORS ã®æ§æã«é¢ããåé¡ãç解ããããã«ãã©ã®ãªã¯ãšã¹ããããªã倱æããã®ãã調ã¹ãå¿
èŠããããŸãããã®ããã«ã¯ä»¥äžã®æé ã圹ç«ã€ãããããŸããã</p> + +<ol> + <li>åé¡ã®ãŠã§ããµã€ãããŠã§ãã¢ããªãå®è¡ãã<a href="/ja/docs/Tools">éçºè
ããŒã«</a>ãéãã</li> + <li>倱æãããã©ã³ã¶ã¯ã·ã§ã³ãåçŸããŠã¿ãŠã<a href="/ja/docs/Tools/Web_Console">ã³ã³ãœãŒã«</a>㧠CORS éåãšã©ãŒã¡ãã»ãŒãžã衚瀺ããããã調ã¹ãããããã次ã®ããã«èŠããã</li> +</ol> + +<p><img alt="CORS ãšã©ãŒã衚瀺ããŠãã Firefox ã³ã³ãœãŒã«" src="https://mdn.mozillademos.org/files/16050/cors-error2.png"></p> + +<p>ãšã©ãŒã¡ãã»ãŒãžã®ããã¹ãã¯ä»¥äžã®ãããªãã®ã«ãªãã§ãããã</p> + +<pre>Cross-Origin Request Blocked: The Same Origin Policy disallows +reading the remote resource at <em>https://some-url-here</em>. (<em>Reason: +additional information here</em>).</pre> + +<div class="note"> +<p><strong>ã¡ã¢:</strong> ã»ãã¥ãªãã£äžã®çç±ããã CORS ãªã¯ãšã¹ãã§äœã倱æãããã«ã€ããŠã¯ <em>JavaScript ã³ãŒãããã¯ç¹å®ã§ããŸãã</em>ãã³ãŒãããåããããšã¯ããšã©ãŒãçºçããããšã ãã§ããäœã倱æããããç¹å®ããããã®å¯äžã®æ¹æ³ã¯ã詳现ããã©ãŠã¶ãŒã®ã³ã³ãœãŒã«ã§èŠãããšã§ãã</p> +</div> + +<h2 id="CORS_error_messages" name="CORS_error_messages">CORS ã®ãšã©ãŒã¡ãã»ãŒãž</h2> + +<p>Firefox ã®ã³ã³ãœãŒã«ã¯ã CORS ã®ããã«ãªã¯ãšã¹ãã倱æããå Žåã¯ã³ã³ãœãŒã«ã«ã¡ãã»ãŒãžã衚瀺ããŸãããšã©ãŒããã¹ãã«ã¯ãäœã倱æããã®ãã®åæãè¿œå ããããreasonãã®éšåããããŸãã reason ã®ã¡ãã»ãŒãžã¯ä»¥äžã®éãã§ããã¡ãã»ãŒãžãã¯ãªãã¯ãããšããšã©ãŒããã詳现ã«èª¬æããå¯èœãªè§£æ±ºæ¹æ³ãæäŸããèšäºãéãããšãã§ããŸãã</p> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSDisabled">Reason: CORS disabled</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSDidNotSucceed">Reason: CORS request did not succeed</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSOriginHeaderNotAdded">Reason: CORS header âOriginâ cannot be added</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSExternalRedirectNotAllowed">Reason: CORS request external redirect not allowed</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp">Reason: CORS request not http</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin">Reason: CORS header âAccess-Control-Allow-Originâ missing</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSAllowOriginNotMatchingOrigin">Reason: CORS header âAccess-Control-Allow-Originâ does not match âxyzâ</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials">Reason: Credential is not supported if the CORS header âAccess-Control-Allow-Originâ is â*â</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSMethodNotFound">Reason: Did not find method in CORS header âAccess-Control-Allow-Methodsâ</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSMissingAllowCredentials">Reason: expected âtrueâ in CORS header âAccess-Control-Allow-Credentialsâ</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSPreflightDidNotSucceed">Reason: CORS preflight channel did not succeed</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSInvalidAllowMethod">Reason: invalid token âxyzâ in CORS header âAccess-Control-Allow-Methodsâ</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSInvalidAllowHeader">Reason: invalid token âxyzâ in CORS header âAccess-Control-Allow-Headersâ</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSMissingAllowHeaderFromPreflight">Reason: missing token âxyzâ in CORS header âAccess-Control-Allow-Headersâ from CORS preflight channel</a></li> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors/CORSMultipleAllowOriginNotAllowed">Reason: Multiple CORS header âAccess-Control-Allow-Originâ not allowed</a></li> +</ul> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>çšèªé: {{Glossary("CORS")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">CORS å
¥é</a></li> + <li><a href="/ja/docs/Web/HTTP/Server-Side_Access_Control">ãµãŒããŒåŽ CORS èšå®</a></li> + <li><a href="/ja/docs/Web/HTML/CORS_enabled_image">CORS æå¹åã®ç»å</a></li> + <li><a href="/ja/docs/Web/HTML/CORS_settings_attributes">CORS ã®èšå®å±æ§</a></li> + <li><a href="https://www.test-cors.org">https://www.test-cors.org</a> â CORS ãªã¯ãšã¹ãã®è©ŠéšããŒãž</li> +</ul> diff --git a/files/ja/web/http/cors/index.html b/files/ja/web/http/cors/index.html new file mode 100644 index 0000000000..672d9acf0c --- /dev/null +++ b/files/ja/web/http/cors/index.html @@ -0,0 +1,509 @@ +--- +title: ãªãªãžã³éãªãœãŒã¹å
±æ (CORS) +slug: Web/HTTP/CORS +tags: + - AJAX + - CORS + - Fetch + - Fetch API + - HTTP + - HTTP ã¢ã¯ã»ã¹å¶åŸ¡ + - Security + - XMLHttpRequest + - 'l10n:priority' + - ãªãªãžã³éãªãœãŒã¹å
±æ + - ã»ãã¥ãªã㣠+ - åäžãªãªãžã³ããªã·ãŒ +translation_of: Web/HTTP/CORS +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><ruby><strong>ãªãªãžã³éãªãœãŒã¹å
±æ</strong><rp> (</rp><rt>Cross-Origin Resource Sharing</rt><rp>) </rp></ruby> ({{Glossary("CORS")}}) ã¯ãè¿œå ã® {{Glossary("HTTP")}} ããããŒã䜿çšããŠããã{{glossary("origin", "ãªãªãžã³")}}ã§åäœããŠãããŠã§ãã¢ããªã±ãŒã·ã§ã³ã«ãç°ãªããªãªãžã³ã«ããéžæããããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹æš©ãäžãããããã©ãŠã¶ãŒã«æ瀺ããããã®ä»çµã¿ã§ãã</span>ãŠã§ãã¢ããªã±ãŒã·ã§ã³ã¯ãèªåãšã¯ç°ãªããªãªãžã³ (ãã¡ã€ã³ããããã³ã«ãããŒãçªå·) ã«ãããªãœãŒã¹ããªã¯ãšã¹ããããšãããªãªãžã³é HTTP ãªã¯ãšã¹ããå®è¡ããŸãã</p> + +<p>ãªãªãžã³éãªã¯ãšã¹ãã®äžäŸ: <code>https://domain-a.com</code> ã§æäŸãããŠãããŠã§ãã¢ããªã±ãŒã·ã§ã³ã®ããã³ããšã³ã JavaScript ã³ãŒãã {{domxref("XMLHttpRequest")}} ã䜿çšã㊠<code>https://domain-b.com/data.json</code> ãžãªã¯ãšã¹ããè¡ãå Žåã</p> + +<p>ã»ãã¥ãªãã£äžã®çç±ããããã©ãŠã¶ãŒã¯ãã¹ã¯ãªããã«ãã£ãŠéå§ããããªãªãžã³é HTTP ãªã¯ãšã¹ããå¶éããŠããŸããäŸãã°ã <code>XMLHttpRequest</code>ã <a href="/ja/docs/Web/API/Fetch_API">Fetch API</a> ã¯<ruby><a href="/ja/docs/Web/Security/Same-origin_policy">åäžãªãªãžã³ããªã·ãŒ</a><rp> (</rp><rt>same-origin policy</rt><rp>) </rp></ruby>ã«åŸããŸããã€ãŸãããããã® API ã䜿çšãããŠã§ãã¢ããªã±ãŒã·ã§ã³ã¯ããã®ã¢ããªã±ãŒã·ã§ã³ãèªã¿èŸŒãŸããã®ãšåããªãªãžã³ã«å¯ŸããŠã®ã¿ãªãœãŒã¹ã®ãªã¯ãšã¹ããè¡ãããšãã§ãããã以å€ã®ãªãªãžã³ã®å Žåã¯æ£ãã CORS ããããŒãå«ãã§ããããšãå¿
èŠã§ãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/14295/CORS_principle.png" style="height: 643px; width: 925px;"></p> + +<p>CORS ã®ä»çµã¿ã¯ãå®å
šãªãªãªãžã³éã®ãªã¯ãšã¹ããšãã©ãŠã¶ãŒã»ãµãŒããŒéã®ããŒã¿è»¢éãæ¯æŽããŸããæè¿ã®ãã©ãŠã¶ãŒã¯ CORS ã <code>XMLHttpRequest</code> ã <a href="/ja/docs/Web/API/Fetch_API">Fetch</a> ãªã©ã® API ã§äœ¿çšããŠããªãªãžã³é HTTP ãªã¯ãšã¹ãã®ãªã¹ã¯ã®ç·©åã«åœ¹ç«ãŠãŠããŸãã</p> + +<h2 id="Who_should_read_this_article" name="Who_should_read_this_article">ãã®èšäºãèªãã¹ã人</h2> + +<p>誰ããèªãã¹ãã§ãã</p> + +<p>ãã£ãšå
·äœçã«èšãã°ããã®èšäºã¯<strong>ãŠã§ã管çè
</strong>ã<strong>ãµãŒããŒéçºè
</strong>ã<strong>ããã³ããšã³ãéçºè
</strong>åãã§ããæè¿ã®ãã©ãŠã¶ãŒã¯ããããŒãããªã·ãŒã®åŒ·å¶ãå«ãããªãªãžã³éå
±æã®ã¯ã©ã€ã¢ã³ãåŽã³ã³ããŒãã³ããæ±ããŸããããã CORS æšæºã¯ããµãŒããŒãæ°ããªãªã¯ãšã¹ãããããŒãã¬ã¹ãã³ã¹ããããŒãæ±ããªããã°ãªããªãããšã瀺ããŠããŸãããµãŒããŒéçºè
åãã«ã¯ã<a href="/ja/docs/Web/HTTP/Server-Side_Access_Control">ãµãŒããŒã®èŠ³ç¹ã«ãããªãªãžã³éå
±æ (PHP ã³ãŒãã¹ããããä»ã)</a> ã«ã€ããŠã®è°è«ãåãããŠãèªã¿ãã ããã</p> + +<h2 id="What_requests_use_CORS" name="What_requests_use_CORS">CORS ã䜿çšãããªã¯ãšã¹ããšã¯</h2> + +<p>ãã®<a class="external" href="https://fetch.spec.whatwg.org/#http-cors-protocol">ãªãªãžã³éå
±æä»æ§</a>ã¯ã以äžã®ãããªãµã€ãé HTTP ãªã¯ãšã¹ããæå¹ã«ããããšãã§ããŸãã</p> + +<ul> + <li>åè¿°ã®ããã« {{domxref("XMLHttpRequest")}} ãŸã㯠<a href="/ja/docs/Web/API/Fetch_API">Fetch API</a> ãåŒã³åºãã</li> + <li>ãŠã§ããã©ã³ã (CSS ã® <code>@font-face</code> ã§å¥ãã¡ã€ã³ã®ãã©ã³ããå©çšãããã)ã<a class="external" href="https://www.w3.org/TR/css-fonts-3/#font-fetching-requirements">ããã«ãããµãŒããŒã¯ãèš±å¯ãããŠã§ããµã€ãã®ã¿ããèªã¿èŸŒã¿ãå©çšãã§ãã TrueType ãã©ã³ããæäŸã§ããŸã</a>ã</li> + <li><a href="/ja/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL">WebGL ãã¯ã¹ãã£</a>ã</li> + <li>{{domxref("CanvasRenderingContext2D.drawImage()", "drawImage()")}} ã䜿çšããŠãã£ã³ãã¹ã«æç»ãããç»åããããªãã¬ãŒã ã</li> + <li><a href="/ja/docs/Web/CSS/CSS_Shapes/Shapes_From_Images">ç»åããçæãã CSS ã·ã§ã€ã</a>ã</li> +</ul> + +<p>ãã®èšäºã§ã¯ããªãªãžã³éãªãœãŒã¹å
±æã®å
šè¬çãªèª¬æãšäœµããŠã HTTP ããããŒã®èŠä»¶ã«ã€ããŠã説æããŸãã</p> + +<h2 id="Functional_overview" name="Functional_overview">æ©èœæŠèŠ</h2> + +<p>ãªãªãžã³éãªãœãŒã¹å
±æã®ä»æ§ã¯ããŠã§ããã©ãŠã¶ãŒããæ
å ±ãèªã¿åãããšãèš±å¯ãããŠãããªãªãžã³ããµãŒããŒãèšè¿°ããããšãã§ãããæ°ã㪠<a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a>ãè¿œå ããããšã§äœçšããŸããå ããŠä»æ§æžã§ã¯ããµãŒããŒã®æ
å ±ã«å¯äœçšãåŒãèµ·ããããšããã HTTP ã®ãªã¯ãšã¹ãã¡ãœãã (ç¹ã« {{HTTPMethod("GET")}} 以å€ã® HTTP ã¡ãœããããç¹å®ã® <a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME ã¿ã€ã</a>ã䌎ã {{HTTPMethod("POST")}}) ã®ããã«ããã©ãŠã¶ãŒã HTTP ã® {{HTTPMethod("OPTIONS")}} ãªã¯ãšã¹ãã¡ãœãããçšããŠãããããããªã¯ãšã¹ãã®ãããªãã©ã€ãã (ãµãŒããŒãã察å¿ããã¡ãœããã®äžèŠ§ãåéããããš) ãè¡ãããµãŒããŒã®ãèªå¯ãã®ããšã«å®éã®ãªã¯ãšã¹ããéä¿¡ããããšãæ瀺ããŠããŸãããµãŒããŒã¯ãªã¯ãšã¹ãæã«ãè³æ Œæ
å ±ã (<a href="/ja/docs/Web/HTTP/Cookies">Cookie</a> ã <a href="/en-US/docs/Web/HTTP/Authentication">HTTP èªèšŒ</a> ãªã©) ãéä¿¡ããã¹ãããã¯ã©ã€ã¢ã³ãã«äŒããããšãã§ããŸãã</p> + +<p>CORS ã¯æ§ã
ãªãšã©ãŒã§å€±æããããšããããŸãããã»ãã¥ãªãã£äžã®çç±ããããšã©ãŒã«ã€ã㊠<em>JavaScript ããç¥ãããšãã§ããªã</em>ããå®ããããŠããŸããã³ãŒãããã¯ãšã©ãŒãçºçãããšããããšããåãããŸãããäœãæªãã£ãã®ããå
·äœçã«ç¥ãããšãã§ããå¯äžã®æ¹æ³ã¯ããã©ãŠã¶ãŒã®ã³ã³ãœãŒã«ã§è©³çŽ°ãèŠãããšã§ãã</p> + +<p>以éã®ç¯ã§ã¯ã·ããªãªã®èª¬æã«å ãã HTTP ããããŒã®äœ¿ãæ¹ã®è©³çŽ°ãæäŸããŸãã</p> + +<h2 id="Examples_of_access_control_scenarios" name="Examples_of_access_control_scenarios">ã¢ã¯ã»ã¹å¶åŸ¡ã·ããªãªã®äŸ</h2> + +<p>ãªãªãžã³éãªãœãŒã¹å
±æãã©ã®ããã«åäœãããã説æãã3ã€ã®ã·ããªãªã瀺ããŸãããããã®äŸã¯ãã¹ãŠ {{domxref("XMLHttpRequest")}} ãçšããŠããã察å¿ããŠãããã©ãŠã¶ãŒã«ãããŠããµã€ãããŸããã§ã¢ã¯ã»ã¹ããããšãã§ããŸãã</p> + +<p>ãµãŒããŒåŽããèŠããªãªãžã³éãªãœãŒã¹å
±æã®èª¬æ (PHP ã®ã³ãŒãã¹ãããããå«ã) 㯠<a class="internal" href="/en-US/docs/Web/HTTP/Server-Side_Access_Control">Server-Side Access Control (CORS)</a> ã®èšäºã«ãããŸãã</p> + +<h3 id="Simple_requests" name="Simple_requests">åçŽãªã¯ãšã¹ã</h3> + +<p>ãªã¯ãšã¹ãã«ãã£ãŠã¯ <a href="#Preflighted_requests">CORS ããªãã©ã€ã</a>ãåŒãèµ·ãããªããã®ããããŸããããããã®èšäºã§ã¯<em>ãåçŽãªã¯ãšã¹ãã</em>ãšåŒãã§ããŸããã (CORS ãå®çŸ©ããŠãã) {{SpecName('Fetch')}} ä»æ§æžã§ã¯ãã®çšèªã䜿çšããŠããŸããã ãåçŽãªã¯ãšã¹ããã¯ã<strong>以äžã®ãã¹ãŠã®æ¡ä»¶ãæºãã</strong>ãã®ã§ãã</p> + +<ul> + <li>èš±å¯ãããŠããã¡ãœããã®ãã¡ã®äžã€ã§ããããšã + <ul> + <li>{{HTTPMethod("GET")}}</li> + <li>{{HTTPMethod("HEAD")}}</li> + <li>{{HTTPMethod("POST")}}</li> + </ul> + </li> + <li>ãŠãŒã¶ãŒãšãŒãžã§ã³ãã«ãã£ãŠèªåçã«èšå®ãããããã㌠(ããšãã° {{HTTPHeader("Connection")}}ã {{HTTPHeader("User-Agent")}}ã ãŸã㯠<a href="https://fetch.spec.whatwg.org/#forbidden-header-name">Fetch ä»æ§æžã§ãçŠæ¢ããããŒåããšããŠå®çŸ©ãããŠããããããŒ</a>) ãé€ããŠãæåã§èšå®ã§ããããããŒã¯ã <a href="https://fetch.spec.whatwg.org/#cors-safelisted-request-header">Fetch ä»æ§æžã§ãCORS ã»ãŒããªã¹ããªã¯ãšã¹ãããããŒããšããŠå®çŸ©ãããŠãã</a>以äžã®ããããŒã ãã§ãã + <ul> + <li>{{HTTPHeader("Accept")}}</li> + <li>{{HTTPHeader("Accept-Language")}}</li> + <li>{{HTTPHeader("Content-Language")}}</li> + <li>{{HTTPHeader("Content-Type")}} (äœããäžèšã®èŠä»¶ãæºãããã®)</li> + <li><code><a href="http://httpwg.org/http-extensions/client-hints.html#dpr">DPR</a></code></li> + <li>{{HTTPHeader("Downlink")}}</li> + <li><code><a href="http://httpwg.org/http-extensions/client-hints.html#save-data">Save-Data</a></code></li> + <li><code><a href="http://httpwg.org/http-extensions/client-hints.html#viewport-width">Viewport-Width</a></code></li> + <li><code><a href="http://httpwg.org/http-extensions/client-hints.html#width">Width</a></code></li> + </ul> + </li> + <li>{{HTTPHeader("Content-Type")}} ããããŒã§ã¯ä»¥äžã®å€ã®ã¿ãèš±å¯ãããŠããŸãã + <ul> + <li><code>application/x-www-form-urlencoded</code></li> + <li><code>multipart/form-data</code></li> + <li><code>text/plain</code></li> + </ul> + </li> + <li>ãªã¯ãšã¹ãã«äœ¿çšãããã©ã® {{domxref("XMLHttpRequestUpload")}} ã«ãã€ãã³ããªã¹ããŒãç»é²ãããŠããªãããšããããã¯æ£ãã {{domxref("XMLHttpRequest.upload")}} ã䜿çšããŠã¢ã¯ã»ã¹ãããŸãã</li> + <li>ãªã¯ãšã¹ãã« {{domxref("ReadableStream")}} ãªããžã§ã¯ãã䜿çšãããŠããªãããšã</li> +</ul> + +<div class="note"><strong>泚:</strong> ãããã¯ãŠã§ãã³ã³ãã³ããçºè¡å¯èœã«ãªã£ãŠãããµã€ãéãªã¯ãšã¹ããšåãçš®é¡ã®ãã®ã§ããããµãŒããŒãé©åãªããããŒãéä¿¡ããªããã°ã¬ã¹ãã³ã¹ããŒã¿ã¯éä¿¡å
ãžéãããŸãããåŸã£ãŠã¯ãã¹ãµã€ããªã¯ãšã¹ããã©ãŒãžã§ãªå¯ŸçãããŠãããµã€ãã¯ã HTTP ã¢ã¯ã»ã¹å¶éã«ã€ããŠæ°ãã«å¿é
ããããšã¯ãããŸããã</div> + +<div class="note"> +<p><strong>泚:</strong> WebKit Nightly ããã³ Safari Technology Preview ã¯ã {{HTTPHeader("Accept")}}, {{HTTPHeader("Accept-Language")}}, {{HTTPHeader("Content-Language")}} ããããŒã®å€ã«è¿œå ã®å¶éãæããŠããŸãããããã®ããããŒããæšæºå€ãã®å€ã®å Žåã WebKit/Safari ã¯ãã®ãªã¯ãšã¹ãããåçŽãªã¯ãšã¹ããã®æ¡ä»¶ã«åããšã¯å€æããŸããã WebKit/Safari ããããã®ããããŒã®ã©ã®å€ããæšæºå€ããšå€æãããã«ã€ããŠã¯ã以äžã® WebKit ã®ãã°ãé€ããŠææžåãããŠããŸããã</p> + +<ul> + <li><a href="https://bugs.webkit.org/show_bug.cgi?id=165178" rel="nofollow noreferrer">Require preflight for non-standard CORS-safelisted request headers Accept, Accept-Language, and Content-Language</a></li> + <li><a href="https://bugs.webkit.org/show_bug.cgi?id=165566" rel="nofollow noreferrer">Allow commas in Accept, Accept-Language, and Content-Language request headers for simple CORS</a></li> + <li><a href="https://bugs.webkit.org/show_bug.cgi?id=166363" rel="nofollow noreferrer">Switch to a blacklist model for restricted Accept headers in simple CORS requests</a></li> +</ul> + +<p>ããã¯ä»æ§ã®äžéšã§ã¯ãªãã®ã§ãä»ã®ãã©ãŠã¶ãŒã¯ãã®è¿œå ã®å¶éãå®è£
ããŠããŸããã</p> +</div> + +<p>äŸãã°ããã¡ã€ã³ <code class="plain">https://foo.example</code> ã«ãããŠã§ãã³ã³ãã³ãããã¡ã€ã³ <code class="plain">https://bar.other</code> ã«ããã³ã³ãã³ããåŒã³åºããããšä»®å®ããŸãã以äžã®ãããªã³ãŒãã <code>foo.example</code> å
ã® JavaScript ã§äœ¿çšããããããããŸããã</p> + +<pre class="brush: js notranslate" id="line1">const xhr = new XMLHttpRequest(); +const url = 'https://bar.other/resources/public-data/'; + +xhr.open('GET', url); +xhr.onreadystatechange = someHandler; +xhr.send(); +</pre> + +<p>ããã¯ãç¹æš©ãæ±ãããã« CORS ããããŒã䜿çšããŠãã¯ã©ã€ã¢ã³ããšãµãŒããŒã®éã§ç°¡åãªããŒã¿äº€æãè¡ããŸãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/17214/simple-req-updated.png" style="height: 490px; width: 1023px;"></p> + +<p>ãã®å Žåããã©ãŠã¶ãŒããµãŒããŒã«äœãéä¿¡ãããµãŒããŒãäœãè¿ãããèŠãŠã¿ãŸãããã</p> + +<pre class="brush: shell notranslate">GET /resources/public-data/ HTTP/1.1 +Host: bar.other +User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-us,en;q=0.5 +Accept-Encoding: gzip,deflate +Connection: keep-alive +<strong>Origin: https://foo.example</strong> +</pre> + +<p>ç¹çãã¹ããªã¯ãšã¹ãããããŒã¯ {{HTTPHeader("Origin")}} ã§ãããåŒã³åºãã <code class="plain">https://foo.example</code> ããæ¥ãããšãè¡šããŸãã</p> + +<pre class="notranslate">HTTP/1.1 200 OK +Date: Mon, 01 Dec 2008 00:23:53 GMT +Server: Apache/2 +<strong>Access-Control-Allow-Origin: *</strong> +Keep-Alive: timeout=2, max=100 +Connection: Keep-Alive +Transfer-Encoding: chunked +Content-Type: application/xml + +[âŠXML ããŒã¿âŠ]</pre> + +<p>ã¬ã¹ãã³ã¹ã§ã¯ããµãŒããŒã {{HTTPHeader("Access-Control-Allow-Origin")}} ããããŒãè¿ä¿¡ããŠããŸãã {{HTTPHeader("Origin")}} ããããŒãš {{HTTPHeader("Access-Control-Allow-Origin")}} ããããŒã®äœ¿çšã¯ãæãåçŽãªã¢ã¯ã»ã¹å¶åŸ¡ãããã³ã«ãè¡šããŠããŸãããã®å ŽåããµãŒããŒã¯ <code>Access-Control-Allow-Origin: *</code> ãè¿ããŠãããããã¯ãã®ãªãœãŒã¹ã<strong>ãã¹ãŠã®</strong>ãã¡ã€ã³ããã¢ã¯ã»ã¹ã§ããããšãæå³ããŸãã <code class="plain">https://bar.other</code> ã«ãããªãœãŒã¹ã®ææè
ãããªãœãŒã¹ãžã®å¶éã <code class="plain">https://foo.example</code> ããã®ãªã¯ãšã¹ã<em>ã®ã¿</em>ã«å¶éããããšèããŠããå Žåã¯ã以äžã®ããã«éä¿¡ããŸãã</p> + +<pre class="notranslate"><code class="plain">Access-Control-Allow-Origin: https://foo.example</code></pre> + +<p><code class="plain">https://foo.example</code> 以å€ã®ãã¡ã€ã³ã¯ãã¹ãŠããµã€ãéã®æ¹æ³ã§ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããšããµã€ãéã®æ¹æ³ã§ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããšãã§ããªããªããŸããããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãèš±å¯ããã«ã¯ã <code>Access-Control-Allow-Origin</code> ããããŒã«ããªã¯ãšã¹ãã® <code>Origin</code> ããããŒã®äžã§éä¿¡ãããå€ãå«ããŠãã ããã</p> + +<h3 id="Preflighted_requests" name="Preflighted_requests">ããªãã©ã€ããªã¯ãšã¹ã</h3> + +<p><a href="#Simple_requests">ãåçŽãªã¯ãšã¹ãã (åè¿°)</a> ãšã¯ç°ãªãããããªãã©ã€ãããªã¯ãšã¹ãã¯å§ãã« {{HTTPMethod("OPTIONS")}} ã¡ãœããã«ãã HTTP ãªã¯ãšã¹ããä»ã®ãã¡ã€ã³ã«ãããªãœãŒã¹ã«åããŠéããå®éã®ãªã¯ãšã¹ããéä¿¡ããŠãå®å
šãã©ããã確ãããŸãããµã€ãéãªã¯ãšã¹ãããŠãŒã¶ãŒããŒã¿ã«åœ±é¿ãäžããå¯èœæ§ããããããªå Žåã«ããã®ããã«ããªãã©ã€ããè¡ããŸãã</p> + +<p>以äžã¯ãããªãã©ã€ããè¡ããããªã¯ãšã¹ãã®äŸã§ãã</p> + +<pre class="brush: js notranslate" id="line1">const xhr = new XMLHttpRequest(); +xhr.open('POST', 'https://bar.other/resources/post-here/'); +xhr.setRequestHeader('X-PINGOTHER', 'pingpong'); +xhr.setRequestHeader('Content-Type', 'application/xml'); +xhr.onreadystatechange = handler; +xhr.send('<person><name>Arun</name></person>'); +</pre> + +<p>äžèšã®äŸã§ã¯ã <code>POST</code> ã§éä¿¡ãã XML ã®æ¬äœãäœæããŠããŸãããŸããæšæºå€ã® <code>X-PINGOTHER</code> HTTP ãªã¯ãšã¹ãããããŒãèšå®ããŠããŸãããã®ãããªããããŒã¯ HTTP/1.1 ãããã³ã«ã«å«ãŸããŠããŸãããããŠã§ãã¢ããªã±ãŒã·ã§ã³ã§ã¯äžè¬çã«äŸ¿å©ãªãã®ã§ãããªã¯ãšã¹ã㧠<code>Content-Type</code> ã« <code>application/xml</code> ã䜿çšããŠããããã€ã«ã¹ã¿ã ããããŒãèšå®ããŠããããããã®ãªã¯ãšã¹ãã§ã¯ããªãã©ã€ããè¡ããŸãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/17268/preflight_correct.png" style="height: 1076px; width: 1024px;"></p> + +<div class="blockIndicator note"> +<p><strong>泚</strong>: åŸè¿°ããããã«ãå®éã® <code>POST</code> ãªã¯ãšã¹ãã«ã¯ <code>Access-Control-Request-*</code> ããããŒãå«ãŸããã <code>OPTIONS</code> ãªã¯ãšã¹ãã®ã¿ã§å¿
èŠã«ãªããŸãã</p> +</div> + +<p>ã¯ã©ã€ã¢ã³ããšãµãŒããŒãšã®éã®ãããšãã®å
šå®¹ãèŠãŠã¿ãŸããããæåã®ããåãã¯<em>ããªãã©ã€ããªã¯ãšã¹ã/ã¬ã¹ãã³ã¹</em>ã§ãã</p> + +<pre class="brush: shell notranslate">OPTIONS /doc HTTP/1.1 +Host: bar.other +User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-us,en;q=0.5 +Accept-Encoding: gzip,deflate +Connection: keep-alive +Origin: http://foo.example +Access-Control-Request-Method: POST +Access-Control-Request-Headers: X-PINGOTHER, Content-Type + + +HTTP/1.1 204 No Content +Date: Mon, 01 Dec 2008 01:15:39 GMT +Server: Apache/2 +Access-Control-Allow-Origin: https://foo.example +Access-Control-Allow-Methods: POST, GET, OPTIONS +Access-Control-Allow-Headers: X-PINGOTHER, Content-Type +Access-Control-Max-Age: 86400 +Vary: Accept-Encoding, Origin +Keep-Alive: timeout=2, max=100 +Connection: Keep-Alive +</pre> + +<p>ããªãã©ã€ããªã¯ãšã¹ããå®äºããããå®éã®ãªã¯ãšã¹ããéããŸãã</p> + +<pre class="brush: shell notranslate">POST /doc HTTP/1.1 +Host: bar.other +User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-us,en;q=0.5 +Accept-Encoding: gzip,deflate +Connection: keep-alive +X-PINGOTHER: pingpong +Content-Type: text/xml; charset=UTF-8 +Referer: https://foo.example/examples/preflightInvocation.html +Content-Length: 55 +Origin: https://foo.example +Pragma: no-cache +Cache-Control: no-cache + +<person><name>Arun</name></person> + + +HTTP/1.1 200 OK +Date: Mon, 01 Dec 2008 01:15:40 GMT +Server: Apache/2 +Access-Control-Allow-Origin: https://foo.example +Vary: Accept-Encoding, Origin +Content-Encoding: gzip +Content-Length: 235 +Keep-Alive: timeout=2, max=99 +Connection: Keep-Alive +Content-Type: text/plain + +[Some XML payload] +</pre> + +<p>äžèšã®1-10è¡ç®ã¯ {{HTTPMethod("OPTIONS")}} ã¡ãœããã«ããããªãã©ã€ããè¡šããŸãããã©ãŠã¶ãŒã¯äžèšã§äœ¿çšããã JavaScript ã³ãŒãã§äœ¿çšããŠãããªã¯ãšã¹ãã®åŒæ°ã«åºã¥ããŠãããªãã©ã€ãã®éä¿¡ãå¿
èŠã§ããããšãå€æããŸããããã«ãããµãŒããŒã¯å®éã®ãªã¯ãšã¹ãã®åŒæ°ã«ãã£ãŠéããããªã¯ãšã¹ããåãå
¥ãå¯èœããã¬ã¹ãã³ã¹ã§ããŸãã OPTIONS ã¯ãµãŒããŒããä»å çãªæ
å ±ãåŸãããã«çšãã HTTP/1.1 ã®ã¡ãœããã§ããããŸã{{Glossary("safe","å®å
š")}}ãªã¡ãœãããã€ãŸããªãœãŒã¹ãå€æŽããããã«ã¯äœ¿çšã§ããªãã¡ãœããã§ãã OPTIONS ãªã¯ãšã¹ããšåãããŠãä»ã«ãªã¯ãšã¹ãããããŒã2ã€éä¿¡ããŠããããšã«æ³šæããŠãã ãã (ãããã9è¡ç®ãš10è¡ç®ã§ã)ã</p> + +<pre class="brush: none notranslate">Access-Control-Request-Method: POST +Access-Control-Request-Headers: X-PINGOTHER, Content-Type +</pre> + +<p>{{HTTPHeader("Access-Control-Request-Method")}} ããããŒã¯ãããªãã©ã€ããªã¯ãšã¹ãã®äžéšãšããŠãå®éã®ãªã¯ãšã¹ãã <code>POST</code> ãªã¯ãšã¹ãã¡ãœããã§éãããããšããµãŒããŒã«éç¥ããŸãã {{HTTPHeader("Access-Control-Request-Headers")}} ããããŒã¯ãå®éã®ãªã¯ãšã¹ãã«ã«ã¹ã¿ã ããããŒã§ãã <code>X-PINGOTHER</code> ããã³ Content-Type ãå«ãŸããããšããµãŒããŒã«éç¥ããŸããããã§ãµãŒããŒã¯ããã®ç¶æ³äžã§ãªã¯ãšã¹ãã®åãå
¥ããæãããå€æããæ©äŒããããŸãã</p> + +<p>äžèšã®13-22è¡ç®ã¯ãµãŒããŒãè¿ãã¬ã¹ãã³ã¹ã§ããããªã¯ãšã¹ãã¡ãœãã (<code>POST</code>) ãšãªã¯ãšã¹ãããã㌠(<code>X-PINGOTHER</code>) ãåãå
¥ããããããšã瀺ããŠããŸããç¹ã«ã16-19è¡ç®ãèŠãŠã¿ãŸãããã</p> + +<pre class="brush: none notranslate">Access-Control-Allow-Origin: http://foo.example +Access-Control-Allow-Methods: POST, GET, OPTIONS +Access-Control-Allow-Headers: X-PINGOTHER, Content-Type +Access-Control-Max-Age: 86400</pre> + +<p>ãµãŒããŒã¯ <code>Access-Control-Allow-Methods</code> ãè¿ããŠãããããã¯åœè©²ãªãœãŒã¹ãžã®åãåãã㧠<code>POST</code> ããã³ <code>GET</code> ãå®è¡å¯èœãªã¡ãœããã§ããããšãäŒããŸãããªãããã®ããããŒã¯ã¬ã¹ãã³ã¹ããããŒã® {{HTTPHeader("Allow")}} ãšäŒŒãŠããŸãããã¢ã¯ã»ã¹å¶åŸ¡ã§ã®ã¿äœ¿çšãããããšã«æ³šæããŠãã ããã</p> + +<p>ãŸããµãŒããŒã¯ã <code>Access-Control-Allow-Headers</code> ã <code>X-PINGOTHER</code> ã®å€ã§éä¿¡ãããããå®éã®ãªã¯ãšã¹ãã§äœ¿çšãããããããŒã§ããããšãæ¿èªããŠããŸãã <code>Access-Control-Allow-Methods</code> ãšåæ§ã«ã <code>Access-Control-Allow-Headers</code> ã¯åãå
¥ãå¯èœãªããããŒãã«ã³ãåºåãã®ãªã¹ãã§è¡šããŸãã</p> + +<p>æåŸã« <code>Access-Control-Max-Age</code> ã¯ãããªãã©ã€ããªã¯ãšã¹ããåã³éããªããŠãããããã«ãããªãã©ã€ãã®ã¬ã¹ãã³ã¹ããã£ãã·ã¥ããŠããæéãç§æ°ã§äžããŸãããã®äŸã§ã¯86400ç§ãã€ãŸã24æéã§ãããªãããã©ãŠã¶ãŒã¯åã
ã«<a href="/ja/docs/Web/HTTP/Headers/Access-Control-Max-Age">å
éšã®äžéå€</a>ãæã£ãŠããã <code>Access-Control-Max-Age</code> ãäžåã£ãå Žåã«å¶éãæããŸãã</p> + +<h4 id="Preflighted_requests_and_redirects" name="Preflighted_requests_and_redirects">ããªãã©ã€ããªã¯ãšã¹ããšãªãã€ã¬ã¯ã</h4> + +<p>å€ãã®ãã©ãŠã¶ãŒã¯çŸåšãäžèšã®ãããªããªãã©ã€ããªã¯ãšã¹ãã®ãªãã€ã¬ã¯ãã«å¯Ÿå¿ããŠããŸãããããªãã©ã€ããªã¯ãšã¹ãã«ãªãã€ã¬ã¯ããçºçãããšãå€ãã®ãã©ãŠã¶ãŒã¯ä»¥äžã®ãããªãšã©ãŒã¡ãã»ãŒãžãå ±åããŸãã</p> + +<blockquote> +<p>ãªã¯ãšã¹ããããªãã©ã€ããå¿
èŠãšãããªãªãžã³éãªã¯ãšã¹ãã§èš±å¯ãããŠããªã 'https://example.com/foo' ã«ãªãã€ã¬ã¯ããããŸããã</p> +</blockquote> + +<blockquote> +<p>ãªã¯ãšã¹ãã«ã¯ããªãã©ã€ããå¿
èŠã§ããªãªãžã³éã®ãªãã€ã¬ã¯ãã¯èš±å¯ãããŠããŸãã</p> +</blockquote> + +<p>ããšããš CORS ãããã³ã«ã¯ãã®ãããªæ¯ãèããèŠæ±ããŠããŸãããã<a href="https://github.com/whatwg/fetch/commit/0d9a4db8bc02251cc9e391543bb3c1322fb882f2">ãã®åŸã§å¿
èŠããªããšå€æŽãããŸãã</a>ãããããå€ãã®ãã©ãŠã¶ãŒã¯ãŸã å€æŽãå®è£
ããŠããããããšããšèŠæ±ãããŠããæ¯ãèãã«åŸã£ãŠããŸãã</p> + +<p>ãã©ãŠã¶ãŒãä»æ§ã«è¿œãã€ããŸã§ã以äžã®äžæ¹ãããã¯äž¡æ¹ãè¡ãããšã§ãã®å¶éãåé¿ããããšãã§ããŸãã</p> + +<ul> + <li>ãµãŒããŒåŽã®æ¯ãèããå€æŽããŠãããªãã©ã€ããçºçããªãããã«ãããããªãã€ã¬ã¯ããçºçããªãããã«ãã</li> + <li>ãªã¯ãšã¹ããããªãã©ã€ããèµ·ãããªã<a href="#Simple_requests">åçŽãªã¯ãšã¹ã</a>ãªã©ã«å€æŽãã</li> +</ul> + +<p>ãããã®å€æŽãã§ããªãå Žåã¯ã次ã®ãããªå¥ãªæ¹æ³ããããŸãã</p> + +<ol> + <li><a href="#Simple_requests">åçŽãªã¯ãšã¹ã</a>ãè¡ã (Fetch API ã® {{domxref("Response.url")}} ãŸã㯠{{domxref("XMLHttpRequest.responseURL")}} ã䜿çšããŠ)ãå®éã®ããªãã©ã€ããªã¯ãšã¹ãã転éãããå
ãç¹å®ããã</li> + <li>æåã®ã¹ãããã® <code>Response.url</code> ãŸã㯠<code>XMLHttpRequest.responseURL</code> ã§åŸã URL ã䜿çšããŠãããäžã€ã®ãªã¯ãšã¹ã (ãæ¬åœã®ããªã¯ãšã¹ã) ãè¡ãã</li> +</ol> + +<p>ãã ãããªã¯ãšã¹ãã« <code>Authorization</code> ããããŒãååšããããã«ããªãã©ã€ããåŒãèµ·ãããªã¯ãšã¹ãã®å Žåãäžèšã®æé ã䜿çšããŠå¶éãåé¿ããããšã¯ã§ããŸããããªã¯ãšã¹ããè¡ãããŠãããµãŒããŒãå¶åŸ¡ã§ããªãéãããŸã£ããåé¿ããããšã¯ã§ããŸããã</p> + +<h3 id="Requests_with_credentials" name="Requests_with_credentials">è³æ Œæ
å ±ãå«ããªã¯ãšã¹ã</h3> + +<p>{{domxref("XMLHttpRequest")}} ã <a href="/ja/docs/Web/API/Fetch_API">Fetch</a> ãš CORS ã®äž¡æ¹ã«ãã£ãŠæããã«ãªãæãèå³æ·±ãæ©èœã¯ã <a href="/ja/docs/Web/HTTP/Cookies">HTTP ã¯ãããŒ</a>ãš HTTP è³æ Œæ
å ±ã«ãã£ãŠããããè³æ Œæ
å ±ãå«ãããªã¯ãšã¹ããäœæããããšãã§ããããšã§ããæ¢å®ã§ã¯ããµã€ãéã® <code>XMLHttpRequest</code> ãŸã㯠<a href="/ja/docs/Web/API/Fetch_API">Fetch</a> ã®åŒã³åºãã«ãããŠããã©ãŠã¶ãŒã¯è³æ Œæ
å ±ãéä¿¡<strong>ããŸãã</strong>ã <code>XMLHttpRequest</code> ãªããžã§ã¯ããŸã㯠{{domxref("Request")}} ã®ã³ã³ã¹ãã©ã¯ã¿ãŒã®åŒã³åºãæã«ãç¹å®ã®ãã©ã°ãèšå®ããå¿
èŠããããŸãã</p> + +<p>以äžã®äŸã§ã¯ <code class="plain">http://foo.example</code> ããèªã¿èŸŒãŸããå
ã®ã³ã³ãã³ããã <code class="plain">http://bar.other</code> ã«ãããªãœãŒã¹ã«å¯ŸããŠã¯ãããŒãèšå®ããã·ã³ãã«ãª GET ãªã¯ãšã¹ããè¡ããŸãã foo.example ã®ã³ã³ãã³ãã¯ä»¥äžã®ãã㪠JavaScript ãå«ãã§ãããããããŸããã</p> + +<pre class="brush: js notranslate" id="line1">const invocation = new XMLHttpRequest(); +const url = 'http://bar.other/resources/credentialed-content/'; + +function callOtherDomain() { + if (invocation) { + invocation.open('GET', url, true); + invocation.withCredentials = true; + invocation.onreadystatechange = handler; + invocation.send(); + } +}</pre> + +<p>7è¡ç®ã§ãã¯ãããŒä»ãã§åŒã³åºããè¡ãããã« {{domxref("XMLHttpRequest")}} ã«èšå®ããå¿
èŠããããã©ã°ã <code>withCredentials</code> ãšããçåœå€åã®å€ã瀺ããŠããŸããæ¢å®ã§ã¯ãã¯ãããŒãªãã§åŒã³åºããè¡ãããŸããããã¯åçŽãª <code>GET</code> ãªã¯ãšã¹ããªã®ã§ããªãã©ã€ãã¯è¡ããŸãããããã©ãŠã¶ãŒã¯ {{HTTPHeader("Access-Control-Allow-Credentials")}}<code>: true</code> ããããŒãæããªãã¬ã¹ãã³ã¹ã<strong>æåŠ</strong>ãããŠã§ãã³ã³ãã³ããåŒã³åºãã¬ã¹ãã³ã¹ãäœæ<strong>ããªã</strong>ã§ãããã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/17213/cred-req-updated.png" style="height: 490px; width: 1023px;"></p> + +<p>以äžã¯ã¯ã©ã€ã¢ã³ããšãµãŒããŒãšã®éã®ãããšãã®äŸã§ãã</p> + +<pre class="brush: shell notranslate">GET /resources/credentialed-content/ HTTP/1.1 +Host: bar.other +User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-us,en;q=0.5 +Accept-Encoding: gzip,deflate +Connection: keep-alive +Referer: http://foo.example/examples/credential.html +Origin: http://foo.example +Cookie: pageAccess=2 + + +HTTP/1.1 200 OK +Date: Mon, 01 Dec 2008 01:34:52 GMT +Server: Apache/2 +Access-Control-Allow-Origin: https://foo.example +Access-Control-Allow-Credentials: true +Cache-Control: no-cache +Pragma: no-cache +Set-Cookie: pageAccess=3; expires=Wed, 31-Dec-2008 01:34:53 GMT +Vary: Accept-Encoding, Origin +Content-Encoding: gzip +Content-Length: 106 +Keep-Alive: timeout=2, max=100 +Connection: Keep-Alive +Content-Type: text/plain + + +[text/plain payload] +</pre> + +<p>10è¡ç®ã« <code class="plain">http://bar.other</code> åãã®ã¯ãããŒãå«ãŸããŠããŸãããbar.other ã {{HTTPHeader("Access-Control-Allow-Credentials")}}<code>: true</code> (17è¡ç®) ãã¬ã¹ãã³ã¹ã«å«ããªããã°ãã¬ã¹ãã³ã¹ã¯ç¡èŠãããŠã§ãã³ã³ãã³ãã§äœ¿çšã§ããŸããã</p> + +<h4 id="Credentialed_requests_and_wildcards" name="Credentialed_requests_and_wildcards">è³æ Œæ
å ±ä»ããªã¯ãšã¹ããšã¯ã€ã«ãã«ãŒã</h4> + +<p>è³æ Œæ
å ±ãå«ããªã¯ãšã¹ãã«å¯Ÿããã¬ã¹ãã³ã¹ã®æããµãŒããŒã¯ <code>Access-Control-Allow-Origin</code> ããããŒã§ "<code>*</code>" ã¯ã€ã«ãã«ãŒãã§ã¯ãªããªãªãžã³ãæå®<strong>ããªããã°ãªããŸãã</strong>ã</p> + +<p>äžèšã®äŸã®ãªã¯ãšã¹ãããããŒã¯ <code>Cookie</code> ããããŒãå«ãã§ããããã <code>Access-Control-Allow-Origin</code> ããããŒã "*" ã§ãã£ãããªã¯ãšã¹ãã¯å€±æããŸãã <code>Access-Control-Allow-Origin</code> ããããŒã®å€ã "<code>*</code>" ã¯ã€ã«ãã«ãŒãã§ã¯ãªã "<code class="plain">http://foo.example</code>" (å®éã®ãªãªãžã³) ãªã®ã§ããŠã§ãã³ã³ãã³ãã®åŒã³åºãã«å¯ŸããŠè³æ Œæ
å ±ãæèããã³ã³ãã³ããè¿ããŸãã</p> + +<p>ãªããäžèšã®äŸã®äžã«ãã <code>Set-Cookie</code> ã¬ã¹ãã³ã¹ããããŒã¯ãå°æ¥ã®ã¯ãããŒã®èšå®ãè¡ãªããŸãã倱æããå Žåã (䜿ãããŠãã API ã«ãããŸãã) äŸå€ãçºçããŸãã</p> + +<h4 id="Third-party_cookies" name="Third-party_cookies">ãµãŒãããŒãã£ãŒã®ã¯ãããŒ</h4> + +<p>CORS ã®ã¬ã¹ãã³ã¹ã«èšå®ãããã¯ãããŒã¯ããµãŒãããŒãã£ãŒã®ã¯ãããŒã«é¢ããéåžžã®ããªã·ãŒã«åŸããŸããäžèšã®äŸã§ã¯ãããŒãžã¯ <code>foo.example</code> ããèªã¿èŸŒãŸããŠããŸããã20è¡ç®ã®ã¯ãããŒã¯ <code>bar.other</code> ããéãããŠããã®ã§ããŠãŒã¶ãŒããã©ãŠã¶ãŒã§ãµãŒãããŒãã£ãŒã®ã¯ãããŒããã¹ãŠæåŠããããèšå®ããŠããå Žåã¯ä¿åãããŸããã</p> + +<h2 id="The_HTTP_response_headers" name="The_HTTP_response_headers">HTTP ã¬ã¹ãã³ã¹ããããŒ</h2> + +<p>ããã§ã¯ãªãªãžã³éãªãœãŒã¹å
±æã®ä»æ§æžã§å®çŸ©ãããŠãããã¢ã¯ã»ã¹å¶åŸ¡ã®ããã«ãµãŒããŒãè¿ã HTTP ã¬ã¹ãã³ã¹ããããŒãæ²èŒããŸããåã®ç« ã§ã¯ããããã®å®éã®åäœã®æŠèŠã説æããŸããã</p> + +<h3 id="Access-Control-Allow-Origin">Access-Control-Allow-Origin</h3> + +<p>è¿åŽããããªãœãŒã¹ã«ã¯ã以äžã®ãããªæ§æã§1ã€ã® {{HTTPHeader("Access-Control-Allow-Origin")}} ããããŒãã€ãããšããããŸãã</p> + +<pre class="brush: none notranslate">Access-Control-Allow-Origin: <origin> | * +</pre> + +<p><code>Access-Control-Allow-Origin</code> ã¯ããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãèš±å¯ãããªãªãžã³ããã©ãŠã¶ãŒã«äŒããããã®åäžã®ãªãªãžã³ããŸã㯠â è³æ Œæ
å ±ã<strong>å«ãŸãªã</strong>ãªã¯ãšã¹ãã«ãããŠã¯ â ã©ã®ãªãªãžã³ã«ããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãèš±å¯ããããšããã©ãŠã¶ãŒã«äŒããã¯ã€ã«ãã«ãŒã "<code>*</code>" ã®ã©ã¡ãããæå®ããããšãã§ããŸãã</p> + +<p>äŸãã°ã <code>https://mozilla.org</code> ã®ãªãªãžã³ããã®ã³ãŒãã«ãªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãèš±å¯ããã«ã¯ã次ã®ããã«æå®ããŸãã</p> + +<pre class="brush: none notranslate">Access-Control-Allow-Origin: https://mozilla.org +Vary: Origin</pre> + +<p>ãµãŒããŒãã¯ã€ã«ãã«ãŒã "<code>*</code>" ã§ã¯ãªã (ãã¯ã€ããªã¹ãã®äžéšãšããŠãªã¯ãšã¹ããããªãªãžã³ã«åºã¥ããŠåçã«å€æŽãããå¯èœæ§ããã) åäžã®ãªãªãžã³ãæå®ããå Žåã¯ããµãŒããŒã¯ {{HTTPHeader("Vary")}} ã¬ã¹ãã³ã¹ããããŒã« <code>Origin</code> ãå«ããŠããµãŒããŒã®ã¬ã¹ãã³ã¹ã {{HTTPHeader("Origin")}} ãªã¯ãšã¹ãããããŒã®å€ã«ãã£ãŠå€åããããšãã¯ã©ã€ã¢ã³ãã«ç€ºããŠãã ããã</p> + +<h3 id="Access-Control-Expose-Headers">Access-Control-Expose-Headers</h3> + +<p>{{HTTPHeader("Access-Control-Expose-Headers")}} ããããŒã¯ããã©ãŠã¶ãŒãã¢ã¯ã»ã¹ãèš±å¯ããããµãŒããŒã®ãã¯ã€ããªã¹ãã«ããããããŒã瀺ãããšãã§ããŸãã</p> + +<pre class="brush: none notranslate">Access-Control-Expose-Headers: <header-name>[, <header-name>]* +</pre> + +<p>äŸãã°ã以äžã®ããã«ãªããŸãã</p> + +<pre class="brush: none notranslate">Access-Control-Expose-Headers: X-My-Custom-Header, X-Another-Custom-Header +</pre> + +<p>ããã¯ããã©ãŠã¶ãŒã«å¯Ÿã㊠<code>X-My-Custom-Header</code> ããã³ <code>X-Another-Custom-Header</code> ããããŒãèš±å¯ããŸãã</p> + +<h3 id="Access-Control-Max-Age">Access-Control-Max-Age</h3> + +<p>ãã®ããããŒã¯ããªãã©ã€ããªã¯ãšã¹ãã®çµæããã£ãã·ã¥ããŠããæéã瀺ããŸããããªãã©ã€ããªã¯ãšã¹ãã®äŸã¯ãååºã®äŸãã芧ãã ããã</p> + +<pre class="brush: none notranslate">Access-Control-Max-Age: <delta-seconds> +</pre> + +<p><code>delta-seconds</code> åŒæ°ã¯ãçµæããã£ãã·ã¥ããŠããæéãç§åäœã§ç€ºããŸãã</p> + +<h3 id="Access-Control-Allow-Credentials">Access-Control-Allow-Credentials</h3> + +<p>{{HTTPHeader("Access-Control-Allow-Credentials")}} 㯠<code>credentials</code> ãã©ã°ãçã§ãããšãã«ããªã¯ãšã¹ããžã®ã¬ã¹ãã³ã¹ãé瀺ããŠãããåŠãã瀺ããŸããããªãã©ã€ããªã¯ãšã¹ãã®ã¬ã¹ãã³ã¹ã®äžéšãšããŠçšãããããšãã¯ãå®éã®ãªã¯ãšã¹ãã§è³æ Œæ
å ±ã䜿çšããŠãããåŠãã瀺ããŸããåçŽãª <code>GET</code> ãªã¯ãšã¹ãã¯ããªãã©ã€ããè¡ããŸããã®ã§ããªãœãŒã¹ãžã®ãªã¯ãšã¹ããè³æ Œæ
å ±ä»ãã§è¡ãããå Žåã«ãªãœãŒã¹ãšå
±ã«ãã®ããããŒãè¿ããªããã°ãã¬ã¹ãã³ã¹ã¯ãã©ãŠã¶ãŒã«ãã£ãŠç¡èŠããããŠã§ãã³ã³ãã³ãã«è¿ããªãããšã«æ³šæããŠãã ããã</p> + +<pre class="brush: none notranslate">Access-Control-Allow-Credentials: true +</pre> + +<p><a class="internal" href="#Requests_with_credentials">è³æ Œæ
å ±ä»ãã®ãªã¯ãšã¹ã</a>ã¯åã«èª¬æãããšããã§ãã</p> + +<h3 id="Access-Control-Allow-Methods">Access-Control-Allow-Methods</h3> + +<p>{{HTTPHeader("Access-Control-Allow-Methods")}} ããããŒã¯ããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹æã«èš±å¯ããã¡ãœãããæå®ããŸããããã¯ããªãã©ã€ããªã¯ãšã¹ãã®ã¬ã¹ãã³ã¹ã§çšããããŸãããªã¯ãšã¹ãã®ããªãã©ã€ããè¡ãæ¡ä»¶ã«ã€ããŠã¯åè¿°ã®ãšããã§ãã</p> + +<pre class="brush: none notranslate">Access-Control-Allow-Methods: <method>[, <method>]* +</pre> + +<p>ãã©ãŠã¶ãŒã«ãã®ããããŒãéä¿¡ããäŸãå«ããããªãã©ã€ããªã¯ãšã¹ãã®äŸã¯ <a class="internal" href="#Preflighted_requests">åè¿°ã®ãšããã§ã</a>ã</p> + +<h3 id="Access-Control-Allow-Headers">Access-Control-Allow-Headers</h3> + +<p>{{HTTPHeader("Access-Control-Allow-Headers")}} ããããŒã¯ãå®éã®ãªã¯ãšã¹ãã§ã©ã® HTTP ããããŒã䜿çšã§ãããã瀺ãããã«ã<a class="internal" href="#Preflighted_requests">ããªãã©ã€ããªã¯ãšã¹ã</a>ã®ã¬ã¹ãã³ã¹ã§äœ¿çšããŸãã</p> + +<pre class="brush: none notranslate">Access-Control-Allow-Headers: <header-name>[, <header-name>]* +</pre> + +<h2 id="The_HTTP_request_headers" name="The_HTTP_request_headers">HTTP ãªã¯ãšã¹ãããããŒ</h2> + +<p>ãã®ç¯ã§ã¯ã HTTP ãªã¯ãšã¹ããçºè¡ããéããªãªãžã³éãªãœãŒã¹å
±ææ©èœãå©çšããããã«ã¯ã©ã€ã¢ã³ãã䜿çšã§ããããããŒã®äžèŠ§ãæ²èŒããŸãããªãããããã®ããããŒã¯ãµãŒããŒã®åŒã³åºãæã«èšå®ãããŸãããµã€ãé {{domxref("XMLHttpRequest")}} ã®æ©èœã䜿çšããéçºè
ã¯ããªãªãžã³éãªãœãŒã¹å
±æã®ããããŒãããã°ã©ã ã§èšå®ããå¿
èŠã¯ãããŸããã</p> + +<h3 id="Origin">Origin</h3> + +<p>{{HTTPHeader("Origin")}} ããããŒã¯ãµã€ãéã®ã¢ã¯ã»ã¹ãªã¯ãšã¹ããããªãã©ã€ããªã¯ãšã¹ãã®ãªãªãžã³ã瀺ããŸãã</p> + +<pre class="brush: none notranslate">Origin: <origin> +</pre> + +<p>origin ã¯ããªã¯ãšã¹ããéå§ãããµãŒããŒã瀺ã URI ã§ããããã«ãã¹æ
å ±ã¯å«ããããµãŒããŒåã ãã«ããŸãã</p> + +<div class="note"><strong>泚:</strong> <code>origin</code> ã®å€ã¯ <code>null</code> ãŸã㯠URI ã«ããããšãã§ããŸãã</div> + +<p>ãã¹ãŠã®ã¢ã¯ã»ã¹å¶åŸ¡ãªã¯ãšã¹ãã«ãããŠã {{HTTPHeader("Origin")}} ããããŒã¯<strong>åžžã«</strong>éä¿¡ãããããšã«æ³šæããŠãã ããã</p> + +<h3 id="Access-Control-Request-Method">Access-Control-Request-Method</h3> + +<p>{{HTTPHeader("Access-Control-Request-Method")}} ã¯ããªãã©ã€ããªã¯ãšã¹ããçºä¿¡ããéã«ãå®éã®ãªã¯ãšã¹ããè¡ãéã«äœ¿çšãã HTTP ã¡ãœããããµãŒããŒã«ç¥ãããããã«äœ¿çšããŸãã</p> + +<pre class="brush: none notranslate">Access-Control-Request-Method: <method> +</pre> + +<p>䜿çšäŸã¯<a class="internal" href="#Preflighted_requests">ååºã®ãšããã§ã</a>ã</p> + +<h3 id="Access-Control-Request-Headers">Access-Control-Request-Headers</h3> + +<p>{{HTTPHeader("Access-Control-Request-Headers")}} ããããŒã¯ãããªãã©ã€ããªã¯ãšã¹ããçºä¿¡ããéã«ãå®éã®ãªã¯ãšã¹ããè¡ãéã«äœ¿çšãã HTTP ããããŒããµãŒããŒã«ç¥ãããããã«äœ¿çšããŸãã</p> + +<pre class="brush: none notranslate">Access-Control-Request-Headers: <field-name>[, <field-name>]* +</pre> + +<p>䜿çšäŸã¯ <a class="internal" href="#Preflighted_requests">ååºã®ãšããã§ã</a>ã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + <tr> + <td>{{SpecName('Fetch', '#cors-protocol', 'CORS')}}</td> + <td>{{Spec2('Fetch')}}</td> + <td><a href="https://www.w3.org/TR/cors/">W3C CORS</a> ä»æ§æžã眮ãæããæ°ããå®çŸ©ã§ãã</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Access-Control-Allow-Origin")}}</p> + +<h3 id="Compatibility_notes" name="Compatibility_notes">äºææ§ã®ã¡ã¢</h3> + +<p>Internet Explorer 8 ããã³ 9 㯠XDomainRequest ãªããžã§ã¯ã㧠CORS ãæäŸããŠããŸãããå®å
šãªå®è£
㯠IE 10 ã§è¡ã£ãŠããŸãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/CORS/Errors">CORS ã®ãšã©ãŒ</a></li> + <li><a href="https://enable-cors.org/server.html">Enable CORS: I want to add CORS support to my server</a></li> + <li>{{domxref("XMLHttpRequest")}}</li> + <li><a href="/ja/docs/Web/API/Fetch_API">Fetch API</a></li> + <li><a href="https://httptoolkit.tech/will-it-cors">Will it CORS?</a> - an interactive CORS explainer & generator</li> + <li><a href="https://www.telerik.com/blogs/using-cors-with-all-modern-browsers">Using CORS with All (Modern) Browsers</a></li> + <li><a href="https://alfilatov.com/posts/run-chrome-without-cors/">How to run Chrome browser without CORS</a></li> + <li><a href="https://stackoverflow.com/questions/43871637/no-access-control-allow-origin-header-is-present-on-the-requested-resource-whe/43881141#43881141">Stack Overflow ã®ããããåé¡ã解決ããããã® âhow toâ æ
å ±</a> + <ul> + <li>CORS ã®ããªãã©ã€ããé²æ¢ããæ¹æ³</li> + <li>CORS ãããã·ã䜿çšããŠ<em>ãAccess-Control-Allow-Origin ããããŒã®æ¬ èœã</em>ãåé¿ããæ¹æ³</li> + <li><em>ãAccess-Control-Allow-Origin ããããŒãã¯ã€ã«ãã«ãŒããæ±ããªãã</em>ããšãä¿®æ£ããæ¹æ³</li> + </ul> + </li> +</ul> diff --git a/files/ja/web/http/cross-origin_resource_policy_(corp)/index.html b/files/ja/web/http/cross-origin_resource_policy_(corp)/index.html new file mode 100644 index 0000000000..28beb9dd4e --- /dev/null +++ b/files/ja/web/http/cross-origin_resource_policy_(corp)/index.html @@ -0,0 +1,87 @@ +--- +title: Cross-Origin Resource Policy (CORP) +slug: Web/HTTP/Cross-Origin_Resource_Policy_(CORP) +tags: + - HTTP + - Reference + - Security +translation_of: Web/HTTP/Cross-Origin_Resource_Policy_(CORP) +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><strong>ã¯ãã¹ãªãªãžã³ãªãœãŒã¹ããªã·ãŒ</strong>㯠{{HTTPHeader("Cross-Origin-Resource-Policy")}} ããããŒã«ãã£ãŠèšå®ãããããªã·ãŒã§ããŠã§ããµã€ããã¢ããªã±ãŒã·ã§ã³ãä»ã®ãªãªãžã³ãã (<code><script></code> ã <code><img></code> ãªã©ã®èŠçŽ ã䜿çšããŠçºè¡ããã) ç¹å®ã®ãªã¯ãšã¹ãã«å¯Ÿããä¿è·ããªããã€ã³ããããšã§ã <a href="https://ja.wikipedia.org/wiki/Spectre">Spectre</a> ã®ãããªææ©çãªãµã€ããã£ãã«æ»æããã¯ãã¹ãµã€ãã¹ã¯ãªããã€ã³ã¯ã«ãŒãžã§ã³æ»æãç·©åããããšãã§ããŸãã</p> + +<p class="summary">CORP ã¯æ¢å®ã§ {{Glossary("same-origin policy")}} ãè¶
ããä¿è·ã®è¿œå ã¬ã€ã€ãŒã§ããã¯ãã¹ãªãªãžã³ãªãœãŒã¹ããªã·ãŒã¯ãæ¢å®ã§ã¯ãã¹ãªãªãžã³ã®èªã¿èŸŒã¿ãä¿è·ããã¡ã«ããºã ã§ããã <a href="https://fetch.spec.whatwg.org/#corb">ã¯ãã¹ãªãªãžã³ãªãœãŒã¹ããããã³ã°</a> (CORB)ãè£å®ããŸãã</p> + +<div class="blockIndicator note"> +<p>ãã®ããªã·ãŒã¯ãæ¢å®ã§ CORS ã»ãŒããªã¹ãã¡ãœããïŒããããŒã«å¯ŸããŠçºè¡ãããã<a href="https://fetch.spec.whatwg.org/#concept-request-mode"><samp>no-cors</samp></a> ãªã¯ãšã¹ãã«å¯ŸããŠã®ã¿æå¹ã§ãã</p> +</div> + +<p>ãã®ããªã·ãŒã¯<em><a href="/en-US/docs/Glossary/Response_header">ã¬ã¹ãã³ã¹ããããŒ</a></em>ãä»ããŠè¡šçŸããããããå®éã®ãªã¯ãšã¹ãã¯é²æ¢ãããŸããããããããã©ãŠã¶ãŒã¯å¿çæ¬æãåé€ããããšã§<em>çµæ</em>ãæŒæŽ©ããã®ãé²ããŸãã</p> + +<h2 id="History" name="History">æŽå²</h2> + +<p>ã³ã³ã»ãã㯠2012 幎ã«ïŒ<samp>From-Origin</samp>ãšããŠïŒå
ã
ææ¡ãããŸãããã2018 幎㮠Q2 ã«<a href="https://github.com/whatwg/fetch/issues/687">åææ¡ãããŠ</a> Safari ãš Chromium ã«å®è£
ãããŸããã</p> + +<p>2018幎ã®ååã«ã<em>Meltdown</em> ãš <em>Spectre</em> ãšããŠç¥ããã 2 ã€ã®ãµã€ããã£ãã«ããŒããŠã§ã¢è匱æ§ãå
¬è¡šãããŸãããããã©ãŒãã³ã¹ãæ¹åããããã«èšèšãããææ©çå®è¡æ©èœã®äžéšãšããŠçãã競åç¶æ
ã«ããããããã®è匱æ§ã¯æ©å¯æ§ã®é«ãããŒã¿ãæŒæŽ©ããããšãã§ããŸãã</p> + +<p>ãããåã㊠Chromium 㯠<a href="https://fetch.spec.whatwg.org/#corb">Cross-Origin Read Blocking</a> ãå®è£
ããŸãããããã«ãããã¯ãã¹ãªãªãžã³ã®èªã¿èŸŒã¿ã«å¯ŸããŠãªãœãŒã¹ïŒ<samp>Content-Type</samp> ã HTMLãJSONãXMLïŒãèªåçã«ä¿è·ããŸããã¢ããªã±ãŒã·ã§ã³ã <a href="/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options"><code>no-sniff</code> ãã£ã¬ã¯ãã£ã</a>ãæž¡ããŠããªãå ŽåãChromium 㯠<samp>Content-Type</samp> ãæšæž¬ããããšè©Šã¿ãŠããšã«ããä¿è·ãé©çšããŸãã</p> + +<p>ã¯ãã¹ãªãªãžã³ãªãœãŒã¹ããªã·ãŒã¯<em>ã©ã®ãããª</em>ãªãœãŒã¹ã§ãä¿è·ããããšãã§ãããªããã€ã³ã®ã¬ã¹ãã³ã¹ããããŒã§ãããã©ãŠã¶ãŒã MIME ã¿ã€ããå
ãåããå¿
èŠã¯ãããŸããã</p> + +<h2 id="Usage" name="Usage">䜿çšæ¹æ³</h2> + +<div class="note"> +<p><strong>泚æ:</strong> <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1074261">Chrome ã®ãã°</a>ãåå ã§ãã¯ãã¹ãªãªãžã³ãªãœãŒã¹ããªã·ãŒã PDF ã®æç»ãç Žå£ãã蚪åè
ã PDF ã® 1 ããŒãžç®ä»¥éãèªããªãå¯èœæ§ããããŸããæ¬çªç°å¢ã§ã¯ãã®ããããŒã®ä»æ§ã«ã¯æ³šæããŠãã ããã</p> +</div> + +<p>ãŠã§ãã¢ããªã±ãŒã·ã§ã³ã¯ã次㮠3 ã€ã®å€ã®äžãã 1 ã€åãåãããšãã§ãã {{HTTPHeader("Cross-Origin-Resource-Policy")}} ã® HTTP ã¬ã¹ãã³ã¹ããããŒãä»ããŠã¯ãã¹ãªãªãžã³ãªãœãŒã¹ããªã·ãŒãèšå®ããŸãã</p> + +<dl> + <dt>same-site</dt> + <dd> + <p>åã <em>{{Glossary("Site")}}</em> ããã®ãªã¯ãšã¹ãã®ã¿ãªãœãŒã¹ãèªã¿èŸŒããŸãã</p> + + <div class="blockIndicator warning"> + <p><strong>èŠå:</strong> ããã¯{{Glossary("origin", "ãªãªãžã³")}}ãããå®å
šæ§ãäœããã®ã§ãã<a href="https://html.spec.whatwg.org/multipage/origin.html#same-site">2ã€ã®ãªãªãžã³ãåããµã€ãã§ãããã©ããããã§ãã¯ããã¢ã«ãŽãªãºã </a>㯠HTML æšæºã§å®çŸ©ãããŠããã<em>ç»é²å¯èœãªãã¡ã€ã³</em>ããã§ãã¯ããŸãã</p> + </div> + </dd> + <dt>same-origin</dt> + <dd>åã <em>{{Glossary("origin")}}</em> (ããªãã¡ãã¹ããŒã + ãã¹ã + ããŒã) ããã®ãªã¯ãšã¹ãã®ã¿ãªãœãŒã¹ãèªã¿èŸŒããŸãã</dd> + <dt>cross-origin</dt> + <dd>ãããªã <em>{{Glossary("origin")}}</em> (same-site ãš cross-site äž¡æ¹) ããã®ãªã¯ãšã¹ãã§ããªãœãŒã¹ãèªã¿èŸŒããŸãã</dd> +</dl> + +<pre class="notranslate">Cross-Origin-Resource-Policy: same-site | same-origin | cross-origin</pre> + +<p>ã¯ãã¹ãªãªãžã³ãªãœãŒã¹ããªã·ãŒãã§ãã¯ã®éã«ãããããŒãèšå®ãããŠããå Žåããã©ãŠã¶ãŒã¯ç°ãªããªãªãžã³ããµã€ãããçºè¡ããã <code>no-cors</code> ãªã¯ãšã¹ããæåŠããŸãã</p> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("http.headers.Cross-Origin-Resource-Policy")}}</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + <tr> + <td>{{SpecName("Fetch", '#cross-origin-resource-policy-header')}}</td> + <td>{{Spec2("Fetch", '#cross-origin-resource-policy-header')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Cross-Origin-Resource-Policy")}} HTTP Header</li> + <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1459573">Bugzilla bug 1459573</a></li> +</ul> diff --git a/files/ja/web/http/csp/index.html b/files/ja/web/http/csp/index.html new file mode 100644 index 0000000000..39e2d14c0c --- /dev/null +++ b/files/ja/web/http/csp/index.html @@ -0,0 +1,197 @@ +--- +title: ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒ (CSP) +slug: Web/HTTP/CSP +tags: + - CSP + - Content Security Policy + - Reference + - Security + - ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒ + - ã»ãã¥ãªã㣠+translation_of: Web/HTTP/CSP +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><strong>ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒ</strong> ({{Glossary("CSP")}}) ã¯ãã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã° ({{Glossary("XSS")}}) ãããŒã¿ã€ã³ãžã§ã¯ã·ã§ã³æ»æãªã©ã®ãããªãç¹å®ã®çš®é¡ã®æ»æãæ€ç¥ãã圱é¿ã軜æžããããã«è¿œå ã§ããã»ãã¥ãªãã£ã¬ã€ã€ãŒã§ãããããã®æ»æã¯ããŒã¿ã®çªåãããµã€ãã®æ¹ããããã«ãŠã§ã¢ã®æ¡æ£ã«è³ããŸã§ãæ§ã
ãªç®çã«çšããããŸãã</p> + +<p>CSP ã¯å®å
šãªåŸæ¹äºææ§ãä¿ã£ãŠèšèšãããŠããŸã (ãã ãã CSP 2 ã«ã€ããŠã¯åŸæ¹äºææ§ããªãç¹ããããæ瀺çã«èšè¿°ãããŠããŸãã詳现ã¯<a href="https://www.w3.org/TR/CSP2">ãã¡ã</a>ã® 1.1 ç« ãåç
§ããŠãã ãã)ããã®ããã CSP ã«æªå¯Ÿå¿ã®ãã©ãŠã¶ãŒã§ã CSP å®è£
æžã®ãµãŒããŒãšéä¿¡ã§ããéããŸãåæ§ã§ãã CSP æªå¯Ÿå¿ã®ãã©ãŠã¶ãŒã¯åã« CSP ãç¡èŠãããŠã§ãã³ã³ãã³ãã«ã¯ãããŸã§éãæšæºã®åäžãªãªãžã³ããªã·ãŒãé©çšããŸãã CSP ããããŒãéä¿¡ããªããµãŒããŒã«å¯ŸããŠãããã©ãŠã¶ãŒã¯åæ§ã«æšæºã® <a href="/ja/docs/Web/Security/Same-origin_policy">åäžãªãªãžã³ããªã·ãŒ</a> ãé©çšããŸãã</p> + +<p>CSP ãæå¹ã«ããã«ã¯ããŠã§ããµãŒããŒãã {{HTTPHeader("Content-Security-Policy")}} HTTP ããããŒãè¿ãããã«èšå®ããå¿
èŠããããŸã (<code>X-Content-Security-Policy</code> ããããŒã«é¢ããèšè¿°ãæã
ãããŸãããããã¯å€ãããŒãžã§ã³ã®ãã®ã§ãããä»æ¥ãã®ããããŒãæå®ããå¿
èŠã¯ãããŸãã)ã</p> + +<p>ä»ã«ãã {{HTMLElement("meta")}} èŠçŽ ãçšããŠããªã·ãŒãæå®ããããšãå¯èœã§ãã äŸãã°: <code><meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src https://*; child-src 'none';"></code></p> + +<h2 id="Threats" name="Threats">è
åš</h2> + +<h3 id="Mitigating_cross_site_scripting" name="Mitigating_cross_site_scripting">ã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã°ã®è»œæž</h3> + +<p>CSP ã®ç¬¬äžã®ç®ç㯠XSS æ»æã®è»œæžãšå ±åã§ãã XSS æ»æãšã¯ããµãŒããŒããååŸããã³ã³ãã³ãããã©ãŠã¶ãŒãä¿¡é Œããæ§è³ªãæªçšããæ»æã§ãããã©ãŠã¶ãŒã¯ã³ã³ãã³ãã®éä¿¡å
ãä¿¡é Œãããããããšãå®éã®éä¿¡å
ãèŠããäžãšã¯ç°ãªã£ãŠãããšããŠããæªæããã¹ã¯ãªããã被害è
ã®ãã©ãŠã¶ãŒäžã§å®è¡ãããŠããŸããŸãã</p> + +<p>ãµãŒããŒç®¡çè
ã CSP ãå©çšããå Žåãå®è¡ãèš±å¯ããã¹ã¯ãªããã®æ£ãããã¡ã€ã³ããã©ãŠã¶ãŒã«åããŠæå®ããããšã«ããã XSS ã®çºçããç®æãåæžã»æ ¹çµ¶ããããšãã§ããŸãã CSP ããµããŒããããã©ãŠã¶ãŒã¯ããµãŒããŒããæå®ãããèš±å¯ãªã¹ãã«èŒã£ãŠãããã¡ã€ã³ã®ã¹ã¯ãªããã®ã¿å®è¡ããä»ã®ã¹ã¯ãªããã¯ãã¹ãŠç¡èŠããŸã (ã€ã³ã©ã€ã³ã¹ã¯ãªããã HTML å±æ§å€ã®ã€ãã³ããã³ãã©ãç¡èŠãã察象ã«å«ãŸããŸã)ã</p> + +<p>究極çãªé²è¡çãšããŠãã¹ã¯ãªããã決ããŠå®è¡ãããããªããµã€ãã¯ãã¹ã¯ãªããã®å®è¡ãå
šé¢çã«æåŠããããšãå¯èœã§ãã</p> + +<h3 id="Mitigating_packet_sniffing_attacks" name="Mitigating_packet_sniffing_attacks">ãã±ããçèŽæ»æã®è»œæž</h3> + +<p>ååŸããã³ã³ãã³ãã®ãã¡ã€ã³ãå¶éããããšã«å ããŠããµãŒããŒã¯éä¿¡ã«äœ¿ããããã³ã«ãæå®ããããšãå¯èœã§ããäŸãã°ã (ã»ãã¥ãªãã£ã®èŠ³ç¹ããã¯ãããçæ³çã§ãã) ãã¹ãŠã®ã³ã³ãã³ãã HTTPS ã§ååŸãããããã«ãµãŒããŒããæå®ããããšãåºæ¥ãŸããããŒã¿éä¿¡ã«ãããã»ãã¥ãªãã£æŠç¥ãå®å
šãªãã®ãšããã«ã¯ãHTTPS éä¿¡ã匷å¶ããã ãã§ã¯ãªãããã¹ãŠã® <a href="https://developer.mozilla.org/ja/docs/Web/HTTP/Cookies">Cookie ã« secure ãã©ã°</a> ãä»ããããHTTP ããŒãžãã察å¿ãã HTTPS ããŒãžãžã®èªåãªãã€ã¬ã¯ããæŽåããããšãå¿
èŠã§ãããŸãããã©ãŠã¶ãŒãæå·åãããéä¿¡è·¯ã®ã¿ãçšããŠãµã€ãã«æ¥ç¶ããããšãä¿èšŒããããã{{HTTPHeader("Strict-Transport-Security")}} HTTP ããããŒãå©çšããããšãå¯èœã§ãã</p> + +<h2 id="Using_CSP" name="Using_CSP">CSP ã®é©çš</h2> + +<p>ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒãé©çšããã«ã¯ã該åœãããŠã§ãããŒãžã«ã€ã㊠{{HTTPHeader("Content-Security-Policy")}} HTTP ããããŒãè¿ãããã«ãããã®å€ã«ã¯ãŠãŒã¶ãšãŒãžã§ã³ãã«èªã¿èŸŒãŸããããªãœãŒã¹ã®æ
å ±ãæå®ããŸããäŸãã°ãç»åã®ã¢ããããŒãã»è¡šç€ºãè¡ãããŒãžã®å Žåãç»åã®åºå
ã¯ä»»æã®å Žæã§æ§ããŸãããããã©ãŒã ã® action å±æ§å€ã¯ç¹å®ã®ãšã³ããã€ã³ãã«å¶éããå¿
èŠããããŸããã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒãé©åã«èšèšããã°ãã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã°æ»æã«å¯Ÿããèæ§ãé«ããããšãã§ããŸãããã®èšäºã§ã¯ãé©åãªããããŒã®äœææ¹æ³ãšèšè¿°äŸã玹ä»ããŸãã</p> + +<h3 id="Specifying_your_policy" name="Specifying_your_policy">ããªã·ãŒã®èšå®</h3> + +<p>ããªã·ãŒã®èšå®ã«ã¯ {{HTTPHeader("Content-Security-Policy")}} HTTP ããããŒã以äžã®ããã«çšããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy: <em>policy</em></pre> + +<p><code>policy</code> ã®ç®æã«ã¯ãé©çšãããã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒãè¡šããã£ã¬ã¯ãã£ãããæ§æãããæååãå
¥ããŸãã</p> + +<h3 id="Writing_a_policy" name="Writing_a_policy">ããªã·ãŒã®èšè¿°</h3> + +<p>ããªã·ãŒã¯ããªã·ãŒãã£ã¬ã¯ãã£ããåæããããšã§è¡šçŸããŸãããã®ããªã·ãŒãã£ã¬ã¯ãã£ãã¯ãç¹å®ã®çš®é¡ã®ãªãœãŒã¹ããããªã·ãŒã®é©çšç¯å²ãããããè¡šããã®ã§ããããªã·ãŒã«ã¯ {{CSP("default-src")}} ãã£ã¬ã¯ãã£ããæå®ããã¹ãã§ãããããã®ãã£ã¬ã¯ãã£ãã¯ãããªã·ãŒã«ã€ããŠç¹ã«æå®ã®ãªããªãœãŒã¹ã«å¯Ÿãããã©ãŒã«ããã¯ã®åœ¹ç®ãæãããŸã (äžèŠ§ã«ã€ããŠã¯ {{CSP("default-src")}} ã®èª¬æãåç
§ããŠãã ãã)ããŸããã€ã³ã©ã€ã³ã¹ã¯ãªããã <code>eval()</code> ã®å®è¡ãé²ãã«ã¯ {{CSP("default-src")}} ã {{CSP("script-src")}} ãæå®ããå¿
èŠããããŸããããã«ã{{HTMLElement("style")}} èŠçŽ ã <code>style</code> å±æ§ã«ããã€ã³ã©ã€ã³ã¹ã¿ã€ã«ã®é©çšãé²ãã«ã¯ {{CSP("default-src")}} ã {{CSP("style-src")}} ã®æå®ãå¿
èŠãšãªããŸãã</p> + +<h2 id="Examples_Common_use_cases" name="Examples_Common_use_cases">äžè¬çãªé©çšäŸ</h2> + +<p>ãã®ç« ã§ã¯ãäžè¬çãªã»ãã¥ãªãã£ããªã·ãŒã®é©çšäŸã瀺ããŸãã</p> + +<h3 id="Example_1" name="Example_1">äŸ 1</h3> + +<p>ãµã€ã管çè
ãããã¹ãŠã®ã³ã³ãã³ãããµã€ãèªèº«ã®ãã¡ã€ã³ (ãµããã¡ã€ã³ãé€ã) ããååŸããããå Žåã</p> + +<pre class="syntaxbox">Content-Security-Policy: default-src 'self'</pre> + +<h3 id="Example_2" name="Example_2">äŸ 2</h3> + +<p>ãµã€ã管çè
ããä¿¡é Œããããã¡ã€ã³ãšãã®ãã¹ãŠã®ãµããã¡ã€ã³ããã®ã³ã³ãã³ããèš±å¯ãããå Žå (CSPãã»ããããããã¡ã€ã³ãšåäžãšã¯éããªã)ã</p> + +<pre class="syntaxbox">Content-Security-Policy: default-src 'self' *.trusted.com</pre> + +<h3 id="Example_3" name="Example_3">äŸ 3</h3> + +<p>ãµã€ã管çè
ããŠã§ãã¢ããªã®ãŠãŒã¶ãŒã«ãä»»æã®ãã¡ã€ã³ããã®ç»åèªã¿èŸŒã¿ãèš±å¯ãããå Žåããã ããé³å£°ãåç»ã¯ä¿¡é Œãããé
ä¿¡å
ããã®ãã®ã ãã«å¶éãããã¹ãŠã®ã¹ã¯ãªããã¯ãä¿¡é Œãããã³ãŒãããã¹ãããç¹å®ã®ãµãŒããŒã®ã¿ã«å¶éããã</p> + +<pre class="syntaxbox">Content-Security-Policy: default-src 'self'; img-src *; media-src media1.com media2.com; script-src userscripts.example.com</pre> + +<p>ãã®äŸã§ã¯ãã³ã³ãã³ãã®ããã©ã«ãèšå®ãšããŠããã¥ã¡ã³ãèªèº«ã®ãã¹ãã®ã¿ãèš±å¯ããŠããŸããã以äžã®äŸå€ãèªããŠããŸãã</p> + +<ul> + <li>ç»åã¯ä»»æã®å Žæããèªã¿èŸŒãŸããŸã (ã¯ã€ã«ãã«ãŒã "*" ã«ããæå®ã«æ³šæ)ã</li> + <li>ã¡ãã£ã¢ã¯ media1.com ãš media2.com ã®ãã®ã ããèš±å¯ãããŸã (ãã ããµããã¡ã€ã³ã¯èš±å¯ãããŸãã)ã</li> + <li>å®è¡å¯èœãªã¹ã¯ãªãã㯠userscripts.example.com ã®ãã®ã ãèš±å¯ãããŸãã</li> +</ul> + +<h3 id="Example_4" name="Example_4">äŸ 4</h3> + +<p>ãµã€ã管çè
ããªã³ã©ã€ã³ãã³ãã³ã°ã®ãŠã§ããµã€ãã«ã€ããŠããªã¯ãšã¹ãæã®çèŽæ»æãé²ãããããã¹ãŠã®ã³ã³ãã³ãã TLS ã§èªã¿èŸŒãããã«ãããå Žåã</p> + +<pre class="syntaxbox">Content-Security-Policy: default-src https://onlinebanking.jumbobank.com</pre> + +<p>ãã®äŸã§ã¯ããã¡ã€ã³ãåäžãªãªãžã³ onlinebanking.jumbobank.com ã®ã¿ã«å¶éãããã€ããã¥ã¡ã³ããžã®ã¢ã¯ã»ã¹ã HTTPS ã®ã¿ã«å¶éããŠããŸãã</p> + +<h3 id="Example_5" name="Example_5">äŸ 5</h3> + +<p>ãµã€ã管çè
ããŠã§ãã¡ãŒã«ãµã€ãã«ã€ããŠãã¡ãŒã«å
ã® HTML ãèš±å¯ããä»»æã®ãã¡ã€ã³ããç»åã®èªã¿èŸŒã¿ãèš±å¯ããããJavaScript ãä»ã«å±éºæ§ã®ããã³ã³ãã³ãã¯èš±å¯ããããªãå Žåã</p> + +<pre class="syntaxbox">Content-Security-Policy: default-src 'self' *.mailsite.com; img-src *</pre> + +<p>ãã®äŸã§ã¯ã {{CSP("script-src")}} ãæå®ããŠããªãããšã«æ³šæããŠãã ããããã® CSP ãé©çšãããµã€ãã¯ãã¹ã¯ãªããã«é¢ã㊠{{CSP("default-src")}} ãã£ã¬ã¯ãã£ãã®èšå®ãé©çšããŸããã€ãŸããã¹ã¯ãªããã¯å
ã®ãµãŒããŒã®ãã®ã ãèªã¿èŸŒãŸããŸãã</p> + +<h2 id="Testing_your_policy" name="Testing_your_policy">ããªã·ãŒã®ãã¹ã</h2> + +<p>æ¬çªç°å¢ãžã®é©çšãã¹ã ãŒãºã«è¡ããããCSP 㯠report-only ã¢ãŒãã§åäœãããããšãå¯èœã§ãããã®ã¢ãŒãã®å Žåãããªã·ãŒã«ãããããã¯ã¯è¡ããããæå®ãã URI ãžããªã·ãŒéåã®å
容ãå ±åãããŸãããŸããæ°ããããªã·ãŒãæ¬çªç°å¢ã«é©çšããåã«è©Šéšéçšããéã«ã report-only ã¢ãŒãã¯å©çšã§ããŸãã</p> + +<p>ããªã·ãŒã report-only ã¢ãŒãã§åäœãããã«ã¯ã以äžã®ããã«ããªã·ãŒã {{HTTPHeader("Content-Security-Policy-Report-Only")}} HTTP ããããŒã«æå®ããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy-Report-Only: <em>policy</em> </pre> + +<p>åãã¬ã¹ãã³ã¹äžã« {{HTTPHeader("Content-Security-Policy-Report-Only")}} ããããŒãš {{HTTPHeader("Content-Security-Policy")}} ããããŒãååšããå Žåãã©ã¡ãã®ããªã·ãŒãèæ
®ãããŸãã<code>Content-Security-Policy</code> ããããŒã«æå®ããããªã·ãŒã«ã€ããŠã¯ãããã¯ãè¡ããã<code>Content-Security-Policy-Report-Only</code> ããããŒã«æå®ããããªã·ãŒã¯å ±åã®ã¿ãè¡ãããŸãã</p> + +<h2 id="Enabling_reporting" name="Enabling_reporting">å ±åæ©èœã®å©çš</h2> + +<p>æ¢å®ã§ã¯ãéåå
容ã¯å ±åãããŸãããéåå
容ã®å ±åæ©èœãæå¹ã«ããã«ã¯ {{CSP("report-uri")}} ããªã·ãŒãã£ã¬ã¯ãã£ããæå®ããå ±åå
ã® URI ã 1 ã€ä»¥äžæå®ããå¿
èŠããããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy: default-src 'self'; report-uri http://reportcollector.example.com/collector.cgi</pre> + +<p>URI ãæå®ãããå ±åãåãåããµãŒããŒãç«ã¡äžããŸããåä¿¡ããå
容ã¯é©åã«æããã©ããªæ¹æ³ã§ãä¿åã»åŠçããããšãã§ããŸãã</p> + +<h2 id="Violation_report_syntax" name="Violation_report_syntax">éåå
容ã®å ±åã®æ§æ</h2> + +<p>éåå
容ã¯ä»¥äžã®ããŒã¿ãå«ãã JSON ãªããžã§ã¯ãã§éä¿¡ãããŸãã</p> + +<dl> + <dt><code>blocked-uri</code></dt> + <dd>ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒã«ãã£ãŠèªã¿èŸŒã¿ããããã¯ããããªãœãŒã¹ã® URIããããã¯ããã URI ã <code>document-uri</code> ãšã¯ç°ãªããªãªãžã³ã ã£ãå Žåããããã¯ããã URI ã¯ã¹ããŒã ã»ãã¹ãã»ããŒãã®ã¿ãå«ãããã«åãè©°ããããŸãã</dd> +</dl> + +<dl> + <dt><code>disposition</code></dt> + <dd><code>"enforce"</code> ãŸã㯠<code>"report"</code> ã®ããããã§ã {{HTTPHeader("Content-Security-Policy-Report-Only")}} ããããŒã <code>Content-Security-Policy</code> ããããŒã®ã©ã¡ãã䜿ãããŠãããã§æ±ºãŸãã</dd> + <dt><code>document-uri</code></dt> + <dd>éåãçããããã¥ã¡ã³ãã® URIã</dd> + <dt><code>effective-directive</code></dt> + <dd>å®è¡ã«ããéåãèµ·ããããã£ã¬ã¯ãã£ãã§ãã</dd> + <dt><code>original-policy</code></dt> + <dd><code>Content-Security-Policy</code> HTTP ããããŒã«å
ã
æå®ãããŠããããªã·ãŒã</dd> + <dt><code>referrer</code></dt> + <dd>éåãçããããã¥ã¡ã³ãã®ãªãã¡ã©ãŒã</dd> + <dt><code>script-sample</code></dt> + <dd>éåãèµ·ãããã€ã³ã©ã€ã³ã¹ã¯ãªãããã€ãã³ããã³ãã©ãŒãã¹ã¿ã€ã«ã®æåã® 40 æåã</dd> + <dt><code>status-code</code></dt> + <dd>ã°ããŒãã«ãªããžã§ã¯ããåæåããããªãœãŒã¹ã® HTTP ã¹ããŒã¿ã¹ã³ãŒãã</dd> + <dt><code>violated-directive</code></dt> + <dd>éåããããªã·ãŒã»ã¯ã·ã§ã³ã®ååã</dd> +</dl> + +<h2 id="Sample_violation_report" name="Sample_violation_report">éåå ±åã®äŸ</h2> + +<p><code>http://example.com/signup.html</code> ãšããããŒãžãäŸã«èããŸããããã§ã¯æ¬¡ã®ãããªããªã·ãŒãæå®ããŠããã<code>cdn.example.com</code> ã®ã¹ã¿ã€ã«ã·ãŒãã®ã¿ãèš±å¯ããŠããŸãã</p> + +<div> +<pre class="syntaxbox">Content-Security-Policy: default-src 'none'; style-src cdn.example.com; report-uri /_/csp-reports</pre> +</div> + +<p><code>signup.html</code> ã®å
容ã¯æ¬¡ã®éãã§ãã</p> + +<pre class="brush: html"><!DOCTYPE html> +<html> + <head> + <title>Sign Up</title> + <link rel="stylesheet" href="css/style.css"> + </head> + <body> + ... Content ... + </body> +</html></pre> + +<p>ééããããããšã«ãæ°ä»ãã§ããããïŒã¹ã¿ã€ã«ã·ãŒãã®èªã¿èŸŒã¿ã¯ <code>cdn.example.com</code> ããã®ã¿ã«å¶éãããŠããŸãããå®éã«ã¯èªèº«ã®ãã¡ã€ã³ (<code>http://example.com</code>) ããèªã¿èŸŒãããšããŠããŸãããã®ããã¥ã¡ã³ããé²èŠ§ããéã«ã¯ã次ã®ãããªéåå
容ã <code>http://example.com/_/csp-reports</code> ãž POST ãªã¯ãšã¹ãã§éä¿¡ãããŸãã</p> + +<pre>{ + "csp-report": { + "document-uri": "http://example.com/signup.html", + "referrer": "", + "blocked-uri": "http://example.com/css/style.css", + "violated-directive": "style-src cdn.example.com", + "original-policy": "default-src 'none'; style-src cdn.example.com; report-uri /_/csp-reports" + } +}</pre> + +<p>ã芧ã®éãã<code>blocked-uri</code> ã«ã¯éåã®åå ãšãªã£ããªãœãŒã¹ã®ãã«ãã¹ãèšé²ãããŠããŸãããã ããå¿
ããã«ãã¹ãèšé²ããããšã¯éããŸãããäŸãã°ã <code>signup.html</code> ã <code>http://anothercdn.example.com/stylesheet.css</code> ãã CSS ãèªã¿èŸŒãããšããå Žåã<code>blocked-uri</code> ã«ã¯ãã«ãã¹ã§ã¯ãªããªãªãžã³ã®ã¿ (<code>http://anothercdn.example.com</code>) ãèšé²ãããŸãããã®äžèŠäžæè°ãªæå㯠CSP ã®ä»æ§æžã« <a href="http://www.w3.org/TR/CSP/#violation-reports">説æãããŠããŸã</a>ãæçã«èšããšããã®æåã¯ã¯ãã¹ãªãªãžã³ã®ãªãœãŒã¹ã«é¢ããæ©å¯æ
å ±ã®æŒãããé²ãããã«èŠå®ãããŠããŸãã</p> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp")}}</p> + +<p>äžéšã®ããŒãžã§ã³ã® Safari ã«ã¯ãã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒããããŒãèšå®ãããŠã㊠Same Origin ããããŒããªããšããã©ãŠã¶ãŒãèªåèªèº«ã§ãã¹ããããã³ã³ãã³ãããªããµã€ãã³ã³ãã³ãããããã¯ããã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒããã®ã³ã³ãã³ããèš±å¯ããŠããªããšãã誀ã£ãå ±åããããšããé¡èãªéäºæããããŸãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} ããããŒ</li> + <li>HTTP ã® {{HTTPHeader("Content-Security-Policy-Report-Only")}} ããããŒ</li> + <li><a href="/ja/docs/Mozilla/Add-ons/WebExtensions/Content_Security_Policy">WebExtensions ã®ã³ã³ãã³ãã»ãã¥ãªãã£</a></li> + <li><a href="/ja/docs/Web/HTTP/Headers/Content-Security-Policy#CSP_in_workers">ãŠã§ãã¯ãŒã«ãŒã§ã® CSP</a></li> + <li><a href="/ja/docs/Web/Privacy">ãã©ã€ãã·ãŒãèš±å¯ãæ
å ±ã»ãã¥ãªãã£</a></li> + <li><a href="https://github.com/google/csp-evaluator">CSP Evaluator</a> - Evaluate your Content Security Policy</li> +</ul> diff --git a/files/ja/web/http/feature_policy/index.html b/files/ja/web/http/feature_policy/index.html new file mode 100644 index 0000000000..0a3329d34b --- /dev/null +++ b/files/ja/web/http/feature_policy/index.html @@ -0,0 +1,165 @@ +--- +title: Feature Policy +slug: Web/HTTP/Feature_Policy +tags: + - Feature-Policy + - HTTP + - Reference + - ã»ãã¥ãªã㣠+ - ããã㌠+ - æ©èœããªã·ãŒ +translation_of: Web/HTTP/Feature_Policy +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><span class="seoSummary">æ©èœããªã·ãŒã§ããŠã§ãéçºè
ã¯ãã©ãŠã¶ãŒã®ç¹å®ã®æ©èœã API ãæå¹åãç¡å¹åããããåäœãå€æŽãããããããšãã§ããŸããããã¯{{Glossary("CSP", "ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒ")}}ã«äŒŒãŠããŸãããã»ãã¥ãªãã£ã®åäœã§ã¯ãªãæ©èœã®å¶åŸ¡ãè¡ããã®ã§ãã</span></p> + +<div class="note"> +<p><code>Feature-Policy</code> ããããŒã¯ä»æ§æžã§ <code>Permissions-Policy</code> ã«æ¹åãããã®ã§ããã®èšäºããã®ãã¡ãå€æŽãåæ ããããã«æŽæ°ãããŸãã</p> +</div> + +<h2 id="In_a_nutshell" name="In_a_nutshell">æŠèŠ</h2> + +<p>æ©èœããªã·ãŒã¯ããŠã§ããµã€ãå
šäœã§ã©ã®æ©èœã䜿çšãããã (ãŸãã¯äœ¿çšãããªãã) ãæ瀺çã«å®£èšããä»çµã¿ãæäŸããŸããããã«ããã䜿çšå¯èœãªæ©èœãå¶éããããšã«ãã£ãŠãã³ãŒãããŒã¹ãæãšãšãã«é²åã â ãµãŒãããŒãã£ãŒã®ã³ã³ãã³ããããå®å
šã«æ§æããå Žåãšåæ§ã« â ãã¹ããã©ã¯ãã£ã¹ãç¶æããããšãã§ããŸãã</p> + +<p>æ©èœããªã·ãŒã§ã¯ããã©ãŠã¶ãŒããŠã§ããµã€ãå
šäœã§äœ¿çšãããŠããç¹å®ã®æ©èœãå®æœããããã®äžé£ã®ãããªã·ãŒããéžæããŸãããããã®ããªã·ãŒã¯ããµã€ããã¢ã¯ã»ã¹ã§ãã API ãå¶éããããç¹å®ã®æ©èœã«ã€ããŠãã©ãŠã¶ãŒã®æ¢å®ã®åäœãå€æŽãããããããšãã§ããŸãã</p> + +<p>æ©èœããªã·ãŒã§è¡ãããšãã§ãããã®ã®äŸã§ãã</p> + +<ul> + <li>ã¢ãã€ã«ç°å¢ã§ãµãŒãããŒãã£ã®åç»ã®èªååçã®æ¢å®ã®åäœãå€æŽããã</li> + <li>ã«ã¡ã©ããã€ã¯ãªã©ã®æ³šæãå¿
èŠãª API ããµã€ãã䜿çšããããšãå¶éããã</li> + <li>iframe ãã<a href="/ja/docs/Web/API/Fullscreen_API">å
šç»é¢ API</a> ãå©çšã§ããããã«ããã</li> + <li><a href="/ja/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest">åæ XHR</a> ã {{domxref("document.write()")}} ã®ãããªå€ã API ã®äœ¿çšããããã¯ããã</li> + <li>ç»åãæ£ãã倧ããã§ããããã¥ãŒããŒãã«å¯ŸããŠå€§ããããªãããšã確èªããã</li> +</ul> + +<h2 id="Concepts_and_usage" name="Concepts_and_usage">æŠå¿µãšäœ¿ãæ¹</h2> + +<p>æ©èœããªã·ãŒã䜿çšãããšãæäžäœããŒãžãšåã蟌ã¿ãã¬ãŒã ã®äž¡æ¹ã§ãã©ã®ãªãªãžã³ãã©ã®æ©èœã䜿çšã§ããããå¶åŸ¡ã§ããŸããåºæ¬çã«ã¯ãåæ©èœãèš±å¯ããããªãªãžã³ã®äžèŠ§ã§ããããªã·ãŒãèšè¿°ããŸããæ©èœããªã·ãŒã«ãã£ãŠå¶åŸ¡ãããããããã®æ©èœã¯ããã®æ©èœããªãªãžã³ãèš±å¯ããããªãªãžã³ã®ãªã¹ãå
ã§äžèŽããå Žåã®ã¿çŸåšã®ææžããã¬ãŒã ã§æå¹ã«ãªããŸãã</p> + +<p>ããªã·ãŒã«ãã£ãŠå¶åŸ¡ãããåæ©èœã«ã€ããŠããã©ãŠã¶ãŒã¯æ©èœãæå¹ã«ãªã£ãŠãããªãªãžã³ã®äžèŠ§ãããªãã¡èš±å¯ãªã¹ãã管çããŸããããæ©èœã®ããªã·ãŒãèšå®ããŠããªãå Žåã¯ãæ¢å®ã®èš±å¯ãªã¹ãã䜿çšãããŸããæ¢å®ã®èš±å¯ãªã¹ãã¯æ©èœå¥ã«å®ããããŠããŸãã</p> + +<h3 id="Writing_a_policy" name="Writing_a_policy">ããªã·ãŒãæžã</h3> + +<p>ããªã·ãŒã¯ãåã
ã®ããªã·ãŒãã£ã¬ã¯ãã£ãã®ã»ããã䜿çšããŠèšè¿°ããŸããããªã·ãŒãã£ã¬ã¯ãã£ãã¯å®çŸ©æžã¿ã®æ©èœåãšããã®æ©èœã䜿çšããããšãã§ãããªãªãžã³ã®èš±å¯ãªã¹ãã®çµã¿åããã§ãã</p> + +<h3 id="Specifying_your_policy" name="Specifying_your_policy">ããªã·ãŒã®æå®</h3> + +<p>æ©èœããªã·ãŒã§ã¯ãæ©èœãå¶åŸ¡ããããªã·ãŒãæå®ããæ¹æ³ã2ã€æäŸããŠããŸãã</p> + +<ul> + <li>{{httpheader("Feature-Policy")}} HTTP ããããŒ</li> + <li>iframe ã® {{HTMLElement("iframe","<code>allow</code>","#Attributes")}} å±æ§</li> +</ul> + +<p>HTTP ããããŒãš allow å±æ§ã®äž»ãªéãã¯ã allow å±æ§ã iframe å
ã®æ©èœã®ã¿ãå¶åŸ¡ããããšã§ããããããŒã¯ãã¬ã¹ãã³ã¹å
ãšãã®ããŒãžå
ã®åã蟌ã¿ã³ã³ãã³ãã®æ©èœãå¶åŸ¡ããŸãã</p> + +<p>詳现ã¯<a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a>ãåç
§ããŠãã ããã</p> + +<h3 id="Inferring_the_policy" name="Inferring_the_policy">ããªã·ãŒã®æšå®</h3> + +<p>ã¹ã¯ãªããã¯ã {{DOMxRef("Document.featurePolicy")}} ãŸã㯠{{DOMxRef("HTMLIFrameElement.featurePolicy")}} ã«ãã {{DOMxRef("FeaturePolicy")}} ãªããžã§ã¯ããéããŠæ©èœããªã·ãŒã«é¢ããæ
å ±ãããã°ã©ã çã«ååŸããããšãã§ããŸãã</p> + +<h2 id="Types_of_policy-controlled_features" name="Types_of_policy-controlled_features">ããªã·ãŒã§å¶åŸ¡ããæ©èœã®çš®é¡</h2> + +<p>æ©èœããªã·ãŒã¯äžè²«ããæ§æã䜿çšããŠè€æ°ã®æ©èœã®å¶åŸ¡ãæäŸããŸãããããªã·ãŒå¶åŸ¡æ©èœã®åäœã¯ããŸããŸã§ãããã€ãã®èŠå ã«ãã£ãŠç°ãªããŸãã</p> + +<p>äžè¬çãªååã§ã¯ãæ©èœãç¡å¹ã«ãªã£ãŠãããšãã«ãŠã§ãéçºè
ããããå€æãã察çããããã®çŽæçãŸãã¯åŠšå®³ããªãæ¹æ³ãããã¹ãã§ãããšããããšã§ããæ°ããå°å
¥ãããæ©èœã«ã¯ãç¶æ
ãéç¥ããããã®æ瀺ç㪠API ãããå ŽåããããŸããåŸã§æ©èœããªã·ãŒãšçµ±åãããæ¢åã®æ©èœã¯ãéåžžãæ¢åã®ã¡ã«ããºã ã䜿çšããŸããã¢ãããŒãã«ã¯æ¬¡ã®ãããªãã®ããããŸãã</p> + +<ul> + <li>Return "permission denied" for JavaScript APIs that require user permission grants.</li> + <li>Return <code>false</code> or error from an existing JavaScript API that provides access to feature.</li> + <li>Change the default values or options that control the feature behavior.</li> +</ul> + +<p>çŸåšã®ããªã·ãŒå¶åŸ¡æ©èœã®ã»ããã¯ã倧ãã2ã€ã®ã«ããŽãªã«åé¡ãããŸãã</p> + +<ul> + <li>Enforcing best practices for good user experiences.</li> + <li>Providing granular control over sensitive or powerful features.</li> +</ul> + +<h3 id="Best_practices_for_good_user_experiences" name="Best_practices_for_good_user_experiences">䜿ãåæãé«ããããã®ãã¹ããã©ã¯ãã£ã¹</h3> + +<p>åªããããã©ãŒãã³ã¹ãšãŠãŒã¶ãŒãšã¯ã¹ããªãšã³ã¹ãæäŸããããã®ãã¹ããã©ã¯ãã£ã¹ãå®æœããã®ã«åœ¹ç«ã€ããªã·ãŒå¶åŸ¡ã®æ©èœãããã€ããããŸãã</p> + +<p>ã»ãšãã©ã®å Žåãããªã·ãŒã«ãã£ãŠå¶åŸ¡ãããæ©èœã¯ã䜿çšæã«ãŠãŒã¶ãŒãšã¯ã¹ããªãšã³ã¹ã«æªåœ±é¿ãäžããæ©èœãè¡šããŸããæ¢åã®ãŠã§ãã³ã³ãã³ããå£ããã®ãé²ãããããã®ãããªããªã·ãŒå¶åŸ¡æ©èœã®ããã©ã«ãã¯ããã¹ãŠã®èµ·ç¹ã§æ©èœã䜿çšã§ããããã«ããããšã§ãããã¹ããã©ã¯ãã£ã¹ã¯ãããªã·ãŒå¶åŸ¡æ©èœãç¡å¹ã«ããããªã·ãŒã䜿çšããããšã«ãã£ãŠå®æœãããŸãã詳现ã¯ãåªãããŠãŒã¶ãŒãšã¯ã¹ããªãšã³ã¹ã®ããã®ãã¹ããã©ã¯ãã£ã¹ã®å®æœããåç
§ããŠãã ããã</p> + +<p>The features include:</p> + +<ul> + <li>Layout-inducing animations</li> + <li>Legacy image formats</li> + <li>Oversized images</li> + <li>Synchronous scripts</li> + <li>Synchronous XMLHTTPRequest</li> + <li>Unoptimized images</li> + <li>Unsized media</li> +</ul> + +<h3 id="Granular_control_over_certain_features" name="Granular_control_over_certain_features">ç¹å®ã®æ©èœã«å¯Ÿãã现ããå¶åŸ¡</h3> + +<p>ãŠã§ãã¯ãæªçšãããå Žåã«ãã©ã€ãã·ãŒãã»ãã¥ãªãã£äžã®ãªã¹ã¯ã䌎ãå¯èœæ§ã®ããæ©èœã API ãæäŸããŸããå Žåã«ãã£ãŠã¯ããã®ãããªæ©èœããŠã§ããµã€ãäžã§ã©ã®ããã«äœ¿çšãããããå³å¯ã«å¶éããããšãã§ããŸãããŠã§ããµã€ãå
ã®ç¹å®ã®åç¹ããã¬ãŒã ã«å¯ŸããŠæ©èœãæå¹/ç¡å¹ã«ããããªã·ãŒå¶åŸ¡ã®æ©èœããããŸããå©çšå¯èœãªå Žåãæ©èœã¯ Permissions APIããŸãã¯æ©èœãå©çšå¯èœãã©ããã確èªããæ©èœåºæã®ã¡ã«ããºã ãšçµ±åãããŸãã</p> + +<p>æ©èœã«ã¯ä»¥äžã®ãã®ãå«ãŸããŸã (<a href="https://developer.mozilla.org/ja/docs/Web/HTTP/Headers/Feature-Policy#Directives">æ©èœäžèŠ§</a>ãåç
§ããŠãã ãã)ã</p> + +<ul> + <li>Accelerometer</li> + <li>Ambient light sensor</li> + <li>Autoplay</li> + <li>Camera</li> + <li>Encrypted media</li> + <li>Fullscreen</li> + <li>Geolocation</li> + <li>Gyroscope</li> + <li>Magnetometer</li> + <li>Microphone</li> + <li>Midi</li> + <li>PaymentRequest</li> + <li>Picture-in-picture</li> + <li>USB</li> + <li>VR / XR</li> +</ul> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> + <li>æ°å€ãã®ããªã·ãŒã®äœ¿çšäŸã«ã€ããŠã¯ <a href="http://feature-policy-demos.appspot.com/">Feature Policy Demos</a> ãã芧ãã ããã</li> +</ul> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + <tr> + <td>{{SpecName("Feature Policy","#feature-policy-http-header-field","Feature-Policy")}}</td> + <td>{{Spec2("Feature Policy")}}</td> + <td>ååå®çŸ©ã {{httpheader("Feature-Policy")}} ããããŒã®å®çŸ©ããã£ã¬ã¯ãã£ãã¯å¶åŸ¡ããæ©èœã®ä»æ§æžã§å®çŸ©ã詳现ã¯ããããã®ãã£ã¬ã¯ãã£ãã®ããŒãžãåç
§ã</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Feature-Policy")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> + <li>HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li>iframe ã® {{HTMLElement("iframe","<code>allow</code>","#Attributes")}} å±æ§</li> + <li><a href="https://developers.google.com/web/updates/2018/06/feature-policy">Introduction to Feature Policy</a></li> + <li><a href="https://www.chromestatus.com/features#component%3A%20Blink%3EFeaturePolicy">Feature policies on www.chromestatus.com</a></li> + <li><a href="https://chrome.google.com/webstore/detail/feature-policy-tester-dev/pchamnkhkeokbpahnocjaeednpbpacop">Feature-Policy Tester (Chrome Developer Tools extension)</a></li> + <li><a href="/ja/docs/Web/Privacy">ãã©ã€ãã·ãŒãã¢ã¯ã»ã¹èš±å¯ãæ
å ±ã»ãã¥ãªãã£</a></li> +</ul> diff --git a/files/ja/web/http/feature_policy/using_feature_policy/index.html b/files/ja/web/http/feature_policy/using_feature_policy/index.html new file mode 100644 index 0000000000..3545c89d7d --- /dev/null +++ b/files/ja/web/http/feature_policy/using_feature_policy/index.html @@ -0,0 +1,159 @@ +--- +title: æ©èœããªã·ãŒã®äœ¿çš +slug: Web/HTTP/Feature_Policy/Using_Feature_Policy +tags: + - Feature Policy + - Feature-Policy + - HTTP + - Permissions + - Privileges + - Reference + - Security + - access + - delegation + - header + - ã»ãã¥ãªã㣠+ - æ©èœããªã·ãŒ +translation_of: Web/HTTP/Feature_Policy/Using_Feature_Policy +--- +<div>{{HTTPSidebar}}</div> + +<p><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a>ã«ãã£ãŠãæäžäœã®ããŒãžãšåã蟌ãã ãã¬ãŒã ã®äž¡æ¹ã§ãã©ã®ãªãªãžã³ã§ã©ã®æ©èœã䜿çšããããšãã§ããããå¶åŸ¡ããããšãã§ããŸããåºæ¬çã«ããªã·ãŒã¯ãããããã®æ©èœã«ã€ããŠèš±å¯ãããªãªãžã³ã®ãªã¹ãã§èšè¿°ããŸããåæ©èœã¯æ©èœããªã·ãŒã§å¶åŸ¡ãããæ©èœã¯çŸåšã®ææžããèš±å¯ããããªãªãžã³ã®ãªã¹ãã«äžèŽãããªãªãžã³ã®ãã¬ãŒã ã§ã®ã¿æå¹ã«ãªããŸãã</p> + +<p>ããªã·ãŒã§å¶åŸ¡ãããããããã®æ©èœã«ã€ããŠããã©ãŠã¶ãŒã¯æšæ¥ãæå¹ã«ãããªãªãžã³ã®ãªã¹ããèš±å¯ãªã¹ããšããŠç®¡çããŸããæ©èœã®ããªã·ãŒãæå®ããªãå Žåãæ¢å®ã®èš±å¯ãªã¹ãã䜿çšãããŸããæ¢å®ã®èš±å¯ãªã¹ãã¯ãæ©èœããšã«æ±ºãŸã£ãŠããŸãã</p> + +<div class="note"> +<p><code>Feature-Policy</code> ããããŒã¯ä»æ§æžã§ <code>Permissions-Policy</code> ã«æ¹åãããã®ã§ããã®èšäºããã®ãã¡ãå€æŽãåæ ããããã«æŽæ°ãããŸãã</p> +</div> + +<h2 id="Writing_a_policy" name="Writing_a_policy">ããªã·ãŒã®èšè¿°</h2> + +<p>ããªã·ãŒã¯åå¥ã®ããªã·ãŒãã£ã¬ã¯ãã£ãã®ã»ããã䜿çšããŠèšè¿°ãããŸããããªã·ãŒãã£ã¬ã¯ãã£ãã¯ãå®çŸ©ãããæ©èœåãšãæ©èœã䜿çšããããšãã§ãããªãªãžã³ã®èš±å¯ãªã¹ãã®çµã¿åããã§ããããªã·ãŒå
ã®æ©èœã¯ã»ãã³ãã³ã§åºåããŸãã</p> + +<h3 id="allowlist" name="allowlist">èš±å¯ãªã¹ã</h3> + +<p>èš±å¯ãªã¹ãã¯ã以äžã®ãã¡äžã€ä»¥äžãåããªãªãžã³ã®ç©ºçœåºåãã®ãªã¹ãã§ãã</p> + +<ul> + <li><code>*</code>: ãã®æ©èœã¯ãã®ææžãšãå«ãŸãããã¹ãŠã®é²èŠ§ã³ã³ããã¹ã (iframe) ã§ãªãªãžã³ã«é¢ä¿ãªãèš±å¯ãããŸãã</li> + <li><code>'self'</code>: ãã®æ©èœã¯ãã®ææžãšãå«ãŸãããã¹ãŠã®é²èŠ§ã³ã³ããã¹ã (iframe) ã®ãã¡ãåããªãªãžã³ã®ãã®ã«èš±å¯ãããŸãã</li> + <li><code>'src'</code>: (iframe ã® allow å±æ§ã®ã¿) ãã® iframe ã«èªã¿èŸŒãŸããææžã iframe ã® {{HTMLElement('iframe','src','#Attributes')}} å±æ§ã® URL ãšåããªãªãžã³ããæ¥ãŠããéãããã®æ©èœã¯ãã® iframe ã§èš±å¯ãããŸãã</li> + <li><code>'none'</code>: ãã®æ©èœã¯æäžäœããã³å«ãŸããé²èŠ§ã³ã³ããã¹ãã§ç¡å¹ã«ãªããŸãã</li> + <li><origin(s)>: ãã®æ©èœã¯ç¹å®ã®ãªãªãžã³ (äŸãã°ã https://example.com) ã§èš±å¯ãããŸãããªãªãžã³ã¯ç©ºçœã§åºåã£ãŠãã ããã</li> +</ul> + +<p><code>*</code> ã®å€ (ãã¹ãŠã®ãªãªãžã³ã§æå¹) ãŸã㯠<code>'none'</code> (ãã¹ãŠã®ãªãªãžã³ã§ç¡å¹) ã¯åç¬ã§ã®ã¿äœ¿çšã§ããŸããã <code>'self'</code> ãš <code>'src'</code> ã¯äžã€ä»¥äžã®ãªãªãžã³ãšäžç·ã«äœ¿çšããããšãã§ããŸãã</p> + +<p>æ©èœã¯ãããããæ¢å®ã®èš±å¯ãªã¹ããæã€ããå®çŸ©ãããŠããŸãã</p> + +<ul> + <li><code>*</code>: ãã®æ©èœã¯æ¢å®ã§ãæäžäœã®é²èŠ§ã³ã³ããã¹ããšããã«å«ãŸãããã¹ãŠã®é²èŠ§ã³ã³ããã¹ã (iframe) ã§èš±å¯ãããŸãã</li> + <li><code>'self'</code>: ãã®æ©èœã¯æ¢å®ã§ãæäžäœã®é²èŠ§ã³ã³ããã¹ããšããã«å«ãŸãããã¹ãŠã®é²èŠ§ã³ã³ããã¹ã (iframe) ã®ãã¡ãåããªãªãžã³ã«ãããã®ã§èš±å¯ãããŸãããã®æ©èœã¯ãå«ãŸããé²èŠ§ã³ã³ããã¹ãã«ããå¥ãªãªãªãžã³ã®ææžã§ã¯èš±å¯ãããŸããã</li> + <li><code>'none'</code>: ãã®æ©èœã¯æäžäœããã³å«ãŸããé²èŠ§ã³ã³ããã¹ãã§ç¡å¹ã«ãªããŸãã</li> +</ul> + +<h2 id="Specifying_your_policy" name="Specifying_your_policy">ããªã·ãŒã®æå®</h2> + +<p>æ©èœããªã·ãŒã¯ãæ©èœãå¶åŸ¡ããããªã·ãŒã®æå®ã«äºã€ã®æ¹æ³ãçšæããŠããŸãã</p> + +<ul> + <li>HTTP ã® {{httpheader('Feature-Policy')}} ããããŒ</li> + <li>{{htmlelement("iframe")}} ã® {{htmlattrxref("allow", "iframe")}} å±æ§</li> +</ul> + +<p>HTTP ããããŒãš <code>allow</code> å±æ§ã®äžçªã®éãã¯ã allow å±æ§ã¯ iframe å
ã®æ©èœããå¶åŸ¡ããªãããšã§ããããããŒã¯ã¬ã¹ãã³ã¹ã§ãããŒãžå
ã®ä»»æã®åã蟌ã¿ã³ã³ãã³ãã®æ©èœãå¶åŸ¡ããŸãã</p> + +<h3 id="The_Feature-Policy_HTTP_header" name="The_Feature-Policy_HTTP_header">HTTP ã® Feature-Policy ããããŒ</h3> + +<p>ããŒãžã®ã¬ã¹ãã³ã¹ã§ HTTP ã® <code>Feature-Policy</code> ããããŒãéä¿¡ããããšãã§ããŸãããã®ããããŒã®å€ã¯ãæå®ãããããŒãžã«å¯ŸããŠãã©ãŠã¶ãŒãé©çšããããªã·ãŒã§ãã以äžã®ãããªæ§é ã«ãªã£ãŠããŸãã</p> + +<pre class="brush: bash notranslate">Feature-Policy: <feature name> <allowlist of origin(s)></pre> + +<p>For example, to block all content from using the Geolocation API across your site:</p> + +<pre class="brush: bash notranslate">Feature-Policy: geolocation 'none'</pre> + +<p>Several features can be controlled at the same time by sending the HTTP header with a semicolon-separated list of policy directives, or by sending a separate header for each policy.</p> + +<p>For example, the following are equivalent:</p> + +<pre class="brush: bash notranslate">Feature-Policy: unsized-media 'none'; geolocation 'self' https://example.com; camera *; + +Feature-Policy: unsized-media 'none' +Feature-Policy: geolocation 'self' https://example.com +Feature-Policy: camera *; +</pre> + +<h3 id="The_iframe_allow_attribute" name="The_iframe_allow_attribute">iframe ã® allow å±æ§</h3> + +<p>Feature Policy ã䜿çšãã 2 ã€ç®ã®æ¹æ³ã¯ãiframe å
ã®ã³ã³ãã³ããå¶åŸ¡ããããšã§ãã <code>allow</code> å±æ§ã䜿çšããŠãåã蟌ã¿ã³ã³ãã³ãã®ããªã·ãŒãªã¹ããæå®ããŸãã</p> + +<p>ããšãã°ã以äžã¯Â iframe å
ã®ãã¹ãŠã®ãã©ãŠãžã³ã°ã³ã³ããã¹ãã«ããã«ã¹ã¯ãªãŒã³ã®äœ¿çšãèš±å¯ããæ¹æ³ã§ãã</p> + +<pre class="brush: html notranslate"><iframe src="https://example.com..." allow="fullscreen"></iframe></pre> + +<p><code><iframe></code> ãããã©ã«ãã§èš±å¯ããŠãã <a href="https://wiki.developer.mozilla.org/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy$edit#allowlist">allowlist</a> ã®å€ã¯Â <code>'src'</code> ã§ãããããã£ãŠã以äžã®ããã«ãæžããŠãåããšãªããŸãã</p> + +<pre class="brush: html notranslate"><iframe src="https://example.com..." allow="fullscreen 'src'"></iframe> +</pre> + +<p>以äžã®äŸã¯ãç¹å®ã®ãªãªãžã³ã®Â <code><iframe></code> ã®ã³ã³ãã³ãã«ããŠãŒã¶ãŒã®äœçœ®æ
å ±ãžã®ã¢ã¯ã»ã¹ãèš±å¯ããæ¹æ³ã§ãã</p> + +<pre class="brush: html notranslate"><iframe src="https://google-developers.appspot.com/demos/..." + allow="geolocation https://google-developers.appspot.com"></iframe> +</pre> + +<p>HTTP ããããŒãšåæ§ã«ãã»ãã³ãã³ã§åºåãããããªã·ãŒãã£ã¬ã¯ãã£ãã®ãªã¹ããæå®ããããšã«ãã£ãŠãè€æ°ã®æ©èœãåæã«å¶åŸ¡ããããšãå¯èœã§ãã</p> + +<p>ããšãã°ã以äžã¯ã<code><iframe></code> ãã«ã¡ã©ãšãã€ã¯ã䜿çšã§ããªãããã«ãããã¯ããæ¹æ³ã§ãã</p> + +<pre class="brush: html notranslate"><iframe allow="camera 'none'; microphone 'none'"> +</pre> + +<h2 id="Inheritance_of_policy_for_embedded_content" name="Inheritance_of_policy_for_embedded_content">åã蟌ã¿ã³ã³ãã³ãã®ããªã·ãŒã®ç¶æ¿</h2> + +<p>Scripts inherit the policy of their browsing context, regardless of their origin. That means that top-level scripts inherit the policy from the main document.</p> + +<p>All iframes inherit the policy of their parent page. If the iframe has an <code>allow</code> attribute, the policies of the parent page and the <code>allow</code> attribute are combined, using the most restrictive subset. For an iframe to have a feature enabled, the origin must be in the allowlist for both the parent page and the allow attribute.</p> + +<p>Disabling a feature in a policy is a one-way toggle. If a feature has been disabled for a child frame by its parent frame, the child cannot re-enable it, and neither can any of the child's descendants.</p> + +<h2 id="Enforcing_best_practices_for_good_user_experiences">Enforcing best practices for good user experiences</h2> + +<p>It's difficult to build a website that uses all the latest best practices and provides great performance and user experiences. As the website evolves, it can become even harder to maintain the user experience over time. You can use feature policies to specify the desired best practices, and rely on the browser to enforce the policies to prevent regressions.</p> + +<p>There are several policy-controlled features designed to represent functionality that can negatively impact the user experience. These features include:</p> + +<ul> + <li>Layout-inducing Animations</li> + <li>Unoptimized (poorly compressed) images</li> + <li>Oversized images</li> + <li>Synchronous scripts</li> + <li>Synchronous XMLHttpRequest</li> + <li>Unsized media</li> +</ul> + +<p>To avoid breaking existing web content, the default for such policy-controlled features is to allow the functionality to be used by all origins. That is, the default allowlist is <code>'*'</code> for each feature. Preventing the use of the sub-optimal functionality requires explicitly specifying a policy that disables the features.</p> + +<p>For new content, you can start developing with a policy that disables all the features. This approach ensures that none of the functionality is introduced. When applying a policy to existing content, testing is likely required to verify it continues to work as expected. This is especially important for embedded or third-party content that you do not control.</p> + +<p>To turn on the enforcement of all the best practices, specify the policy as below.</p> + +<p>Send the following the HTTP header:</p> + +<pre class="brush: bash notranslate">Feature-Policy: layout-animations 'none'; unoptimized-images 'none'; oversized-images 'none'; sync-script 'none'; sync-xhr 'none'; unsized-media 'none';</pre> + +<p>Using the <code><iframe></code> <code>allow</code> attribute:</p> + +<pre class="brush: html notranslate"><iframe src="https://example.com..." allow="layout-animations 'none'; unoptimized-images 'none'; oversized-images 'none'; sync-script 'none'; sync-xhr 'none'; unsized-media 'none';"></iframe></pre> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li>iframe ã® {{HTMLElement('iframe','allow','#Attributes')}} å±æ§</li> + <li>{{HTTPHeader("Content-Security-Policy")}} ããããŒ</li> + <li>{{HTTPHeader("Referrer-Policy")}} ããããŒ</li> + <li><a href="/ja/docs/Web/Privacy">ãã©ã€ãã·ãŒãã¢ã¯ã»ã¹èš±å¯ãæ
å ±ã»ãã¥ãªãã£</a></li> +</ul> diff --git a/files/ja/web/http/headers/accept-ch-lifetime/index.html b/files/ja/web/http/headers/accept-ch-lifetime/index.html new file mode 100644 index 0000000000..03626be341 --- /dev/null +++ b/files/ja/web/http/headers/accept-ch-lifetime/index.html @@ -0,0 +1,53 @@ +--- +title: Accept-CH-Lifetime +slug: Web/HTTP/Headers/Accept-CH-Lifetime +tags: + - Client hints + - HTTP + - header +translation_of: Web/HTTP/Headers/Accept-CH-Lifetime +--- +<div>{{HTTPSidebar}}{{securecontext_header}}{{SeeCompatTable}}</div> + +<p><span class="seoSummary"><strong><code>Accept-CH-Lifetime</code></strong> ããããŒã¯ãã¯ã©ã€ã¢ã³ããåŸç¶ã®ãªã¯ãšã¹ãã«ã©ã®<a href="/ja/docs/Glossary/Client_hints">ã¯ã©ã€ã¢ã³ããã³ã</a>ã®ããããŒãå«ããå¿
èŠãããããæå®ãã {{HTTPHeader("Accept-CH")}} ããããŒã®å€ã®æ°žç¶æ§ãæå®ããããã«ãµãŒããŒã«ãã£ãŠèšå®ãããŸãã</span></p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header","ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name","çŠæ¢ããããŒå")}}</th> + <td>?</td> + </tr> + </tbody> +</table> + +<div class="blockIndicator note"> +<p><strong>泚</strong>: ã¯ã©ã€ã¢ã³ããã³ãã«ã¯ãå®å
šãªãªãªãžã³ïŒTLS çµç±ïŒã§ã®ã¿ã¢ã¯ã»ã¹ã§ããŸãã Accept-CH ããããŒãš Accept-CH-Lifetime ããããŒã¯ãã¯ã©ã€ã¢ã³ããã³ãã確å®ã«éä¿¡ãããããã«ããã¹ãŠã®å®å
šãªãªã¯ãšã¹ãã«å¯ŸããŠæ°žç¶åããå¿
èŠããããŸãã</p> +</div> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Accept-CH-Lifetime: <age> +</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Accept-CH: Viewport-Width, DPR +Accept-CH-Lifetime: 86400 +</pre> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Accept-CH-Lifetime")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Accept-CH")}}</li> + <li>{{HTTPHeader("Vary")}}</li> +</ul> diff --git a/files/ja/web/http/headers/accept-ch/index.html b/files/ja/web/http/headers/accept-ch/index.html new file mode 100644 index 0000000000..1eba06b9ad --- /dev/null +++ b/files/ja/web/http/headers/accept-ch/index.html @@ -0,0 +1,59 @@ +--- +title: Accept-CH +slug: Web/HTTP/Headers/Accept-CH +tags: + - Client hints + - HTTP + - HTTP Header +translation_of: Web/HTTP/Headers/Accept-CH +--- +<div>{{HTTPSidebar}}{{securecontext_header}}{{SeeCompatTable}}</div> + +<p><code><strong>Accept-CH</strong></code> ããããŒã¯ãµãŒããŒã«ãã£ãŠèšå®ãããã¯ã©ã€ã¢ã³ããåŸç¶ã®ãªã¯ãšã¹ãã«å«ãã{{glossary("Client Hints", "ã¯ã©ã€ã¢ã³ããã³ã")}}ããããŒãæå®ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header","ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name","çŠæ¢ããããŒå")}}</th> + <td>?</td> + </tr> + </tbody> +</table> + +<div class="blockIndicator note"> +<p><strong>泚:</strong> ã¯ã©ã€ã¢ã³ããã³ãã«ã¯ãå®å
šãªãªãªãžã³ (TLS çµç±) ã§ã®ã¿ã¢ã¯ã»ã¹ã§ããŸãã Accept-CH ããããŒãš Accept-CH-Lifetime ããããŒã¯ãã¯ã©ã€ã¢ã³ããã³ãã確å®ã«éä¿¡ãããããã«ããã¹ãŠã®å®å
šãªãªã¯ãšã¹ãã«å¯ŸããŠä¿æããå¿
èŠããããŸãã</p> +</div> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Accept-CH: <list of client hints> +</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Accept-CH: DPR, Viewport-Width +Accept-CH: Width +Accept-CH-Lifetime: 86400 +Vary: DPR, Viewport-Width, Width +</pre> + +<div class="blockIndicator note"> +<p><strong>泚:</strong> åãå
¥ããããã¯ã©ã€ã¢ã³ãã®ãã³ãã«åºã¥ããŠã<a href="/en-US/docs/Glossary/Client_hints#Varying_Client_Hints">ã¬ã¹ãã³ã¹ãå€æŽ</a>ããããšãå¿ããªãã§ãã ããã</p> +</div> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Accept-CH")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Accept-CH-Lifetime")}}</li> + <li>{{HTTPHeader("Vary")}}</li> +</ul> diff --git a/files/ja/web/http/headers/accept-charset/index.html b/files/ja/web/http/headers/accept-charset/index.html new file mode 100644 index 0000000000..374062341a --- /dev/null +++ b/files/ja/web/http/headers/accept-charset/index.html @@ -0,0 +1,94 @@ +--- +title: Accept-Charset +slug: Web/HTTP/Headers/Accept-Charset +tags: + - Content Negotiation + - HTTP + - HTTP Header + - Reference + - Request header +translation_of: Web/HTTP/Headers/Accept-Charset +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><strong><code>Accept-Charset</code></strong> 㯠HTTP ã®ãªã¯ãšã¹ãããããŒã§ãã¯ã©ã€ã¢ã³ããç解ã§ãã{{glossary("character encoding", "æåãšã³ã³ãŒãã£ã³ã°")}}ãåºå ±ããŸãã</span><a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a>ã䜿çšããŠããµãŒããŒã¯ææ¡ã®1ã€ãéžæã䜿çšããã¯ã©ã€ã¢ã³ãã«éžæçµæã {{HTTPHeader("Content-Type")}} ã¬ã¹ãã³ã¹ããããŒå
ããµã€ã㯠<code>charset=</code> åŒæ°ã®äžã§éç¥ããŸããéåžžã¯ããããã®ãªãœãŒã¹ã®æ¢å®å€ãæ£ããããããéä¿¡ãããš<a href="/ja/docs/Mozilla/Firefox/Privacy/Tracking_Protection">ãã£ã³ã¬ãŒããªã³ãã£ã³ã°</a>ãèš±ããŠããŸãããšãããããããã©ãŠã¶ãŒã¯éåžžããã®ããããŒãèšå®ããŸããã</p> + +<p>ãµãŒããŒãäžèŽããæåãšã³ã³ãŒãã£ã³ã°ãæäŸã§ããªãå Žåãçè«çã«ã¯ {{HTTPStatus("406", "406 Not Acceptable")}} ãšã©ãŒã³ãŒããè¿ãããšãã§ããŸãããããããã䜿ãåæãããããããã«ãããã¯ãã£ãã«è¡ãããã <code>Accept-Charset</code> ããããŒã¯ç¡èŠãããŸãã</p> + +<div class="note"> +<p>HTTP/1.1 ã®åæã®ããŒãžã§ã³ã§ã¯ãæ¢å®ã®æåãšã³ã³ãŒãã£ã³ã°ã ISO-8859-1 ãšå®çŸ©ããŠããŸãããããã¯ãã§ã«æšå¥šãããªããªã£ãŠãããã³ã³ãã³ãåããšã«åå¥ã«æ¢å®å€ãèšå®ãããããã«ãªããŸããã</p> + +<p>UTF-8 ãžã®å¯Ÿå¿ãé²ã¿ãå§åçã«æšå¥šãããæåãšã³ã³ãŒãã£ã³ã°ã«ãªã£ãŠããŸãã<a href="https://www.eff.org/deeplinks/2010/01/primer-information-theory-and-privacy">èšå®ã«åºã¥ãããšã³ããããŒãæžå°ãããããšã§ããè¯ããã©ã€ãã·ãŒãä¿èšŒãã</a>ããã«ããã¹ãŠã®ãã©ãŠã¶ãŒã <code>Accept-Charset</code> ããããŒãçç¥ããŠããŸãã Internet Explorer 8 以éã Safari 5 以éã Opera 11 以éã Firefox 10 以éã Chrome 27 以éã¯éä¿¡ããªããªããŸããã</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Accept-Charset: <charset> + +// è€æ°ã®åã{{glossary("quality values", "å質å€")}}ã§éã¿ã¥ãããæ§æ +Accept-Charset: utf-8, iso-8859-1;q=0.5</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code><var><charset></var></code></dt> + <dd><code>utf-8</code> ãŸã㯠<code>iso-8859-15</code> ã®ãããªæåã»ããã</dd> + <dt><code>*</code></dt> + <dd>ããããŒå
ã®ä»ã®å Žæã«èšè¿°ãããŠããªãæåã»ããã <code>'*'</code> ã¯ã¯ã€ã«ãã«ãŒããšããŠäœ¿çšãããŸãã</dd> + <dt><code>;q=<var><weight></var></code></dt> + <dd>ãšã³ã³ãŒãã£ã³ã°ã¯ãã¹ãŠã<em>éã¿</em>ãšåŒã°ããçžå¯Ÿçãª{{glossary("quality values", "å質å€")}}ã䜿çšããŠè¡šçŸãããèšå®ã®é çªã§é
眮ãããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Accept-Charset: iso-8859-1 + +Accept-Charset: utf-8, iso-8859-1;q=0.5 + +Accept-Charset: utf-8, iso-8859-1;q=0.5, *;q=0.1 +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Accept-Charset", "5.3.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Context</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Accept-Charset")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>HTTP ã®<a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a></li> + <li><a href="https://hsivonen.fi/accept-charset/">Accept-Charset is no more</a></li> + <li>ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã®çµæãå«ãããããŒ: {{HTTPHeader("Content-Type")}}</li> + <li>ä»ã®åæ§ã®ããããŒ: {{HTTPHeader("TE")}}, {{HTTPHeader("Accept-Encoding")}}, {{HTTPHeader("Accept-Language")}}, {{HTTPHeader("Accept")}}</li> +</ul> diff --git a/files/ja/web/http/headers/accept-encoding/index.html b/files/ja/web/http/headers/accept-encoding/index.html new file mode 100644 index 0000000000..040418a77a --- /dev/null +++ b/files/ja/web/http/headers/accept-encoding/index.html @@ -0,0 +1,117 @@ +--- +title: Accept-Encoding +slug: Web/HTTP/Headers/Accept-Encoding +tags: + - Content Negotiation + - HTTP + - HTTP Header + - Reference + - Request header +translation_of: Web/HTTP/Headers/Accept-Encoding +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Accept-Encoding</code></strong> 㯠HTTP ã®ãªã¯ãšã¹ãããããŒã§ãã³ã³ãã³ãã®ãšã³ã³ãŒãã£ã³ã°ããµã€ãã¯å§çž®ã¢ã«ãŽãªãºã ã®ã©ããã¯ã©ã€ã¢ã³ããç解ããããšãã§ãããã瀺ããŸãã <a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ã亀æž</a>ã䜿çšããŠããµãŒããŒã¯ææ¡ããããã®ããäžã€ãéžæããŠäœ¿çšãã {{HTTPHeader("Content-Encoding")}} ã¬ã¹ãã³ã¹ããããŒã䜿çšããŠã¯ã©ã€ã¢ã³ãã«éžæçµæãç¥ãããŸãã</p> + +<p>ã¯ã©ã€ã¢ã³ããšãµãŒããŒãåãå§çž®ã¢ã«ãŽãªãºã ã«å¯Ÿå¿ããŠããå Žåã§ãã identity ã®å€ãåãä»ããããå Žåã¯ããµãŒããŒã¯ã¬ã¹ãã³ã¹ã®æ¬æãå§çž®ããªãããšãéžæããå ŽåããããŸããããã«ã¯äž»ã«äºã€ã®å ŽåããããŸãã</p> + +<ul> + <li>éä¿¡ãããããŒã¿ããã§ã«å§çž®ãããŠãããäºåç®ã®å§çž®ã«ãã£ãŠéä¿¡ããããŒã¿ãå°ãããªããªãããšãäžéšã®ç»åãã©ãŒãããã§èµ·ããçºçããå¯èœæ§ããããŸãã</li> + <li>ãµãŒããŒãéè² è·ã«ãªã£ãŠãããå§çž®ã«å¿
èŠãªèšç®äžã®ãªãŒããŒãããã®äœè£ããªãå Žåãéåžžã Microsoft ã¯ãµãŒããŒãèšç®èœåã®80ïŒ
以äžã䜿çšããŠããå Žåãå§çž®ããªãããšãæšå¥šããŠããŸãã</li> +</ul> + +<p><code>identity</code> ã®å€ãã€ãŸããšã³ã³ãŒããããªããšããããšã¯ã <code>identity;q=0</code> ãŸã㯠<code>*;q=0</code> 㧠<code>identity</code> ãšã¯å¥ãªå€ãæ確ã«èšå®ãããŠããªãéãããµãŒããŒã¯{{HTTPStatus("406")}} <code>Not Acceptable</code> ãšã©ãŒãè¿ããŠã¯ãããŸããã</p> + +<div class="note"><strong>泚:</strong> + +<ul> + <li> + <p>IANA ã¬ãžã¹ããªã<a class="external" href="http://www.iana.org/assignments/http-parameters/http-parameters.xml#http-parameters-1">å
¬åŒãªã³ã³ãã³ããšã³ã³ãŒãã£ã³ã°ã®å®å
šãªãªã¹ã</a>ã管çããŠããŸãã</p> + </li> + <li>ä»ã«ã <code>bzip</code> ããã³ <code>bzip2</code> ã®äºçš®é¡ã®ãšã³ã³ãŒãã£ã³ã°ã䜿çšãããããšããããŸãããæšæºã§ã¯ãããŸãããããã¯ãããäºã€ã® UNIX ããã°ã©ã ã§äœ¿çšãããŠããã¢ã«ãŽãªãºã ãå®è£
ããŠããŸãããªããåè
ã¯ç¹èš±ã©ã€ã»ã³ã¹ã®åé¡ã§éçºçµäºããŠããŸãã</li> +</ul> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Accept-Encoding: gzip +Accept-Encoding: compress +Accept-Encoding: deflate +Accept-Encoding: br +Accept-Encoding: identity +Accept-Encoding: * + +// è€æ°ã®ã¢ã«ãŽãªãºã ã {{Glossary("Quality Values", "quality value")}} ã§éã¿ä»ãããæ§æ: +Accept-Encoding: deflate, gzip;q=1.0, *;q=0.5</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>gzip</code></dt> + <dd><a class="external external-icon" href="http://en.wikipedia.org/wiki/LZ77_and_LZ78#LZ77">Lempel-Ziv coding</a> (LZ77) ãš32ããã CRC ãçšããå§çž®åœ¢åŒã§ãã</dd> + <dt><code>compress</code></dt> + <dd><a class="external external-icon" href="http://en.wikipedia.org/wiki/LZW">Lempel-Ziv-Welch</a> (LZW) ã¢ã«ãŽãªãºã ãçšããå§çž®åœ¢åŒã§ãã</dd> + <dt><code>deflate</code></dt> + <dd><a class="external external-icon" href="http://en.wikipedia.org/wiki/Zlib">zlib</a> æ§é äœãš <a class="external external-icon" href="http://en.wikipedia.org/wiki/DEFLATE"><em>deflate</em></a> å§çž®ã¢ã«ãŽãªãºã ãçšããå§çž®åœ¢åŒã§ãã</dd> + <dt><code>br</code></dt> + <dd><a class="external external-icon" href="https://en.wikipedia.org/wiki/Brotli">Brotli</a> ã¢ã«ãŽãªãºã ãçšããå§çž®åœ¢åŒã§ãã</dd> + <dt><code>identity</code></dt> + <dd>ç䟡é¢æ°ã瀺ããŸã (ã€ãŸããå§çž®ãå€æŽããããŸãã)ããã®å€ã¯ååšããªããŠããåžžã«åãä»ãå¯èœãšã¿ãªãããŸãã</dd> + <dt><code>*</code></dt> + <dd>ããããŒã«æããããŠããªãããããã³ã³ãã³ããšã³ã³ãŒãã£ã³ã°ã«äžèŽããŸããããã¯ãã®ããããŒããªãå Žåã®æ¢å®å€ã§ãããã¹ãŠã®ã¢ã«ãŽãªãºã ã«å¯Ÿå¿ããŠãããšããæå³ã§ã¯ãããŸãããè©äŸ¡ãããèšå®ããªãã ãã§ãã</dd> + <dt><code>;q=</code> (q å€ã®éã¿ã¥ã)</dt> + <dd><em>weight</em> ãšåŒã°ããçžå¯Ÿçãª<a href="/en-US/docs/Glossary/Quality_values">å質質</a>ã䜿çšããŠè¡šçŸãããèšå®ã®é åºã¥ããããããã®ä»»æã®å€ã§ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Accept-Encoding: gzip + +Accept-Encoding: gzip, compress, br + +Accept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1 +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Accept-Encoding", "5.3.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Context</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Accept-Encoding")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>HTTP <a href="/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ã亀æž</a></li> + <li>ã³ã³ãã³ã亀æžã®çµæã䌎ãããããŒ: {{HTTPHeader("Content-Encoding")}}</li> + <li>ä»ã®åæ§ã®ããããŒ: {{HTTPHeader("TE")}}, {{HTTPHeader("Accept")}}, {{HTTPHeader("Accept-Charset")}}, {{HTTPHeader("Accept-Language")}}</li> +</ul> diff --git a/files/ja/web/http/headers/accept-language/index.html b/files/ja/web/http/headers/accept-language/index.html new file mode 100644 index 0000000000..fc0bdc8b24 --- /dev/null +++ b/files/ja/web/http/headers/accept-language/index.html @@ -0,0 +1,101 @@ +--- +title: Accept-Language +slug: Web/HTTP/Headers/Accept-Language +tags: + - Accept-Language + - HTTP + - HTTP ããã㌠+ - Reference + - ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Accept-Language +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>Accept-Language</code></strong> ãªã¯ãšã¹ãããããŒã¯ãã¯ã©ã€ã¢ã³ããã©ã®èšèªãç解ã§ããããã©ã®çš®é¡ã®ãã±ãŒã«ãæšå¥šããããã瀺ããŸãã (èšèªãšããã®ã¯ãè±èªã®ãããªèªç¶èšèªãæå³ããããã°ã©ãã³ã°èšèªã§ã¯ãããŸããã) <a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a>ã䜿çšããŠããµãŒããŒã¯ææ¡ããããã®ããäžã€ãéžæããŠäœ¿çšãã {{HTTPHeader("Content-Language")}} ã¬ã¹ãã³ã¹ããããŒã䜿çšããŠã¯ã©ã€ã¢ã³ãã«éžæçµæãç¥ãããŸãããã©ãŠã¶ãŒã¯ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ã®èšèªã«åŸã£ãŠããã®ããããŒã«é©åãªå€ãèšå®ãããŠãŒã¶ãŒã¯ãããå€æŽããããšãã§ããŸãããçšã§ã (ãããŠæçŽã«ã€ãªãããšããŠé£è²ã瀺ãããŸã)ã</p> + +<p>ãã®ããããŒã¯ãã³ãã§ããããµãŒããŒãèšèªãå€å¥ããããã®æ¹æ³ãšããŠãæ瀺çãªãŠãŒã¶ãŒã®éžæã«ãã£ãŠå¶åŸ¡ããç¹å®ã® URL ãªã©ãä»ã®ãã®ããªãå Žåã«äœ¿çšãããŸãããµãŒããŒã¯æ瀺çãªæ±ºå®ãäžæžãããªãããšãæšå¥šããŸãã <code>Accept-Language</code> ã®äžèº«ã¯ãŠãŒã¶ãŒãå¶åŸ¡ã§ããªãããšãè¯ããããŸãïŒæ
è¡äžã§å€åœã®ã€ã³ã¿ãŒãããã«ãã§ã䜿çšããŠããå Žåãªã©ïŒããŠãŒã¶ãŒã¯ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ã®ãã±ãŒã«ä»¥å€ã®èšèªã«ããããŒãžã蚪åãããã£ãŠãããããããŸããã</p> + +<p>ãµãŒããŒãäžèŽããèšèªãäœãæäŸã§ããªãå Žåã¯ãçè«çã«ã¯ {{HTTPStatus("406")}} (Not Acceptable) ãšã©ãŒã³ãŒããéãè¿ãããšãã§ããŸãããããããŠãŒã¶ãŒã®äœ¿ãåæãããè¯ããããããããã¯ã»ãšãã©è¡ãããŠãããããã®ãããªå Žåã«ã¯äžè¬ã« <code>Accept-Language</code> ããããŒãç¡èŠãããšããæ¹æ³ãæ¡ãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + <tr> + <th scope="row">{{Glossary("CORS ã»ãŒããªã¹ããªã¯ãšã¹ãããããŒ")}}</th> + <td>ã¯ããå€ã <code>0-9</code>, <code>A-Z</code>, <code>a-z</code>, space or <code>*,-.;=</code> ã®ã¿ã§ãããšããè¿œå ã®å¶çŽããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Accept-Language: <language> +Accept-Language: * + +// {{glossary("quality values", "éã¿å€")}}ã®æ§æã«ãã£ãŠéã¿ã¥ããããè€æ°ã®çš®å¥ +Accept-Language: fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code><language></code></dt> + <dd> + <p>èšèªã¿ã°ã§ã (ããã±ãŒã«èå¥åããšãåŒã°ããããšããããŸã)ãããã¯èšèªãè¡šã2ïœ3æåã®åºæ¬èšèªã¿ã°ãšãä»»æã§è¿œå ã®ãµãã¿ã°ã <code>'-'</code> ã§åºåã£ãŠç¶ããŸããè¿œå æ
å ±ã®å€ãã¯èšèªãå°åã®å€å圢 (<code>'en-US'</code> ãŸã㯠<code>'fr-CA'</code> ãªã©) ãŸãã¯äœ¿çšããæåã®çš®é¡ (<code>'sr-Latn'</code> ãªã©) ã§ããæ£æžæ³ã®çš®é¡ (<code>'de-DE-1996'</code>) ãªã©ä»ã®å€å圢ã¯ãéåžžãã®ããããŒã®ã³ã³ããã¹ãã§ã¯äœ¿çšãããŸããã</p> + </dd> + <dt><code>*</code></dt> + <dd>ä»»æã®èšèªã§ãã <code>'*'</code> ã¯ã¯ã€ã«ãã«ãŒããšããŠäœ¿çšãããŸãã</dd> + <dt><code>;q=</code> (Q å€ã®éã¿)</dt> + <dd><em>éã¿</em>ãšåŒã°ãããçžå¯Ÿçãª{{glossary("Quality values", "å質å€")}}ã䜿çšããŠè¡šçŸãããåªå
é äœã®é åºã§é
眮ãããå€ã§ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Accept-Language: de + +Accept-Language: de-CH + +Accept-Language: en-US,en;q=0.5 +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Accept-Language", "5.3.5")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Context</td> + </tr> + <tr> + <td><a href="https://tools.ietf.org/html/bcp47">BCP 47</a></td> + <td>Tags for the Identification of Language</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Accept-Language")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>HTTP <a href="/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a></li> + <li>ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã®çµæã䌎ãããããŒ: {{HTTPHeader("Content-Language")}}</li> + <li>ä»ã®åæ§ã®ããããŒ: {{HTTPHeader("TE")}}, {{HTTPHeader("Accept-Encoding")}}, {{HTTPHeader("Accept-Charset")}}, {{HTTPHeader("Accept")}}</li> +</ul> diff --git a/files/ja/web/http/headers/accept-patch/index.html b/files/ja/web/http/headers/accept-patch/index.html new file mode 100644 index 0000000000..07bbf32d40 --- /dev/null +++ b/files/ja/web/http/headers/accept-patch/index.html @@ -0,0 +1,88 @@ +--- +title: Accept-Patch +slug: Web/HTTP/Headers/Accept-Patch +tags: + - HTTP + - Reference +translation_of: Web/HTTP/Headers/Accept-Patch +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Accept-Patch</code></strong> 㯠HTTP ã®ã¬ã¹ãã³ã¹ããããŒã§ããµãŒããŒãèªèã§ããã¡ãã£ã¢ã¿ã€ããäŒããŸãã</p> + +<p>ä»»æã®ã¡ãœããã«å¿çãã<strong><code>Accept-Patch</code></strong>ã¯ãRequest-URIã§èå¥ããããªãœãŒã¹ã§ã {{HTTPMethod("PATCH")}} ãèš±å¯ãããããšãæå³ããŸãã 2ã€ã®äžè¬çãªã±ãŒã¹ãããã«ã€ãªãããŸãã</p> + +<p>ãµããŒããããŠããªãã¡ãã£ã¢ã¿ã€ãã® {{HTTPMethod("PATCH")}} ãªã¯ãšã¹ããåä¿¡ãããµãŒããŒã¯ã{{HTTPStatus("415")}} <code>Unsupported Media Type</code>ãšã1ã€ä»¥äžã®ãµããŒããããŠããã¡ãã£ã¢ã¿ã€ããåç
§ããAccept-PatchããããŒã§å¿çããå¯èœæ§ããããŸãã</p> + +<div class="note"><strong>泚:</strong> + +<ul> + <li> + <p>IANA ã¬ãžã¹ããªã¯ã<a href="https://www.iana.org/assignments/http-parameters/http-parameters.xml#http-parameters-1">å
¬åŒã³ã³ãã³ããšã³ã³ãŒãã£ã³ã°ã®å®å
šãªãªã¹ã</a>ãä¿æããŠããŸãã</p> + </li> + <li>æšæºã§ã¯ãããŸããããä»ã®2ã€ã®ã³ã³ãã³ããšã³ã³ãŒãã£ã³ã° <code>bzip</code>ãš<code>bzip2</code>ãæã
䜿çšãããŸãã ãããã¯ãããã2ã€ã®UNIXããã°ã©ã ã§äœ¿çšãããã¢ã«ãŽãªãºã ãå®è£
ããŠããŸãã æåã®ãã®ã¯ãç¹èš±ã©ã€ã»ã³ã¹ã®åé¡ã®ããã«äžæ¢ãããããšã«æ³šæããŠãã ããã</li> +</ul> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Accept-Patch: application/example, text/example +Accept-Patch: text/example;charset=utf-8 +Accept-Patch: application/merge-patch+json +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<p>ãªã</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="syntaxbox notranslate">Accept-Patch: application/example, text/example + +Accept-Patch: text/example;charset=utf-8 + +Accept-Patch: application/merge-patch+json +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("5789", "Accept-Patch", "3.1")}}</td> + <td>HTTP PATCH</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Accept-Patch")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>Http method {{HTTPMethod("PATCH")}}</li> + <li>HTTP Semantic and context {{RFC("7231", "PUT", "4.3.4")}}</li> +</ul> diff --git a/files/ja/web/http/headers/accept-ranges/index.html b/files/ja/web/http/headers/accept-ranges/index.html new file mode 100644 index 0000000000..7f6008289e --- /dev/null +++ b/files/ja/web/http/headers/accept-ranges/index.html @@ -0,0 +1,79 @@ +--- +title: Accept-Ranges +slug: Web/HTTP/Headers/Accept-Ranges +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - ã¬ã¹ãã³ã¹ããã㌠+ - ç¯å²ãªã¯ãšã¹ã +translation_of: Web/HTTP/Headers/Accept-Ranges +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <code><strong>Accept-Ranges</strong></code> ã¬ã¹ãã³ã¹ããããŒã¯ããµãŒããŒãéšåçãªãªã¯ãšã¹ãã«å¯Ÿå¿ããŠããããšãåšç¥ããããã«äœ¿çšããããŒã«ãŒã§ãããã®ãã£ãŒã«ãã®å€ã¯ãç¯å²ã®å®çŸ©ã«äœ¿çšã§ããåäœã瀺ããŸãã</p> + +<p><code>Accept-Ranges</code> ããããŒããããšããã©ãŠã¶ãŒã¯éå§ããåéããã®ã§ã¯ãªããäžæãããããŠã³ããŒããåéããããšããå¯èœæ§ããããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Accept-Ranges: <range-unit> +Accept-Ranges: none</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code><range-unit></code></dt> + <dd>ãµãŒããŒã察å¿ããŠããç¯å²ã®åäœãå®çŸ©ããŸãã <code>bytes</code> 㯠{{RFC("7233")}} ã§å
¬åŒã«å®çŸ©ãããŠããå¯äžã®ç¯å²ã®åäœã§ãããè¿œå ã®ç¯å²ã®åäœã <a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml#range-units">HTTP Range Unit Registry</a> ã«ç»é²ãããŠããå¯èœæ§ããããŸãã</dd> + <dt><code>none</code></dt> + <dd>ç¯å²ã®åäœã«ã¯å¯Ÿå¿ããŠããªãããšã瀺ããããã¯ããããŒèªäœããªãã®ãšç䟡ã«ãªããŸãã®ã§ãæ»
å€ã«äœ¿çšãããŸãããã IE9 ã®ããã«äžéšã®ãã©ãŠã¶ãŒã§ã¯ãããŠã³ããŒããããŒãžã£ãŒã§äžæåæ¢ãã¿ã³ãç¡å¹ã«ãããåé€ãããããããã«äœ¿çšãããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Accept-Ranges: bytes +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7233", "Accept-Ranges", "2.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Accept-Ranges")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("If-Range")}}</li> + <li>{{HTTPHeader("Range")}}</li> + <li><a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml#range-units">IANA HTTP Range Unit Registry</a></li> +</ul> diff --git a/files/ja/web/http/headers/accept/index.html b/files/ja/web/http/headers/accept/index.html new file mode 100644 index 0000000000..a4a547373d --- /dev/null +++ b/files/ja/web/http/headers/accept/index.html @@ -0,0 +1,97 @@ +--- +title: Accept +slug: Web/HTTP/Headers/Accept +tags: + - HTTP + - HTTP Header + - Reference + - Request header +translation_of: Web/HTTP/Headers/Accept +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>Accept</code></strong> ãªã¯ãšã¹ãããããŒã¯ãã¯ã©ã€ã¢ã³ããç解ã§ããã³ã³ãã³ãã¿ã€ãã <a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME ã¿ã€ã</a>ã§äŒããŸãã <a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a>ã䜿çšããŠããµãŒããŒã¯ææ¡ã®ãã¡ã®äžã€ãéžæããããã䜿çšããŠã¯ã©ã€ã¢ã³ãã« {{HTTPHeader("Content-Type")}} ã¬ã¹ãã³ã¹ããããŒã§éžæãäŒããŸãããã©ãŠã¶ãŒã¯ãªã¯ãšã¹ããè¡ãå Žé¢ã«å¿ããŠé©åãªå€ããã®ããããŒã«èšå®ããŸãã CSS ã¹ã¿ã€ã«ã·ãŒããååŸãããšãã¯ãç»åãåç»ãã¹ã¯ãªãããååŸãããšããšã¯ç°ãªãå€ããªã¯ãšã¹ãã§èšå®ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + <tr> + <th scope="row">{{Glossary("CORS-safelisted request header", "CORS ã»ãŒããªã¹ããªã¯ãšã¹ãããããŒ")}}</th> + <td>ã¯ãããã ããå€ã« <em>CORS-unsafe ãªã¯ãšã¹ãããããŒãã€ã</em>ã 0x00-0x1F (0x09 (HT) ãé€ã)ã<code>"():<>?@[\]{}</code>ã0x7F (DEL) ãå«ãããšãã§ããªããšããè¿œå ã®å¶éããããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Accept: <MIME_type>/<MIME_subtype> +Accept: <MIME_type>/* +Accept: */* + +// {{glossary("quality values", "éã¿å€")}}ã®æ§æã«ãã£ãŠéã¿ã¥ããããè€æ°ã®çš®å¥ +Accept: text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8 +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code><MIME_type>/<MIME_subtype></code></dt> + <dd>åäžã®è©³çŽ°ãª <a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME ã¿ã€ã</a>ãäŸãã° <code>text/html</code> ã§ãã</dd> + <dt><code><MIME_type>/*</code></dt> + <dd>MIME ã¿ã€ãã§ããããµãã¿ã€ãããããŸããã <code>image/*</code> 㯠<code>image/png</code>, <code>image/svg</code>, <code>image/gif</code> åã³ãã®ä»ã®ç»åã¿ã€ãã«äžèŽããŸãã</dd> + <dt><code>*/*</code></dt> + <dd>ãã¹ãŠã® MIME ã¿ã€ã</dd> + <dt><code>;q=</code> (Q å€ã®éã¿)</dt> + <dd><em>éã¿</em>ãšåŒã°ãããçžå¯Ÿçãª<a href="/docs/Glossary/Quality_values">å質å€</a>ã䜿çšããŠè¡šçŸãããåªå
é äœã®é åºã§é
眮ãããå€ã§ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Accept: text/html + +Accept: image/* + +// å
šè¬çãªæ¢å®å€ +Accept: */* + +// ããã²ãŒã·ã§ã³æã®ãªã¯ãšã¹ãã®æ¢å®å€ +Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8 +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Accept", "5.3.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Context</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååãããã®ã§ããã°ã <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Accept")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>HTTP <a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a></li> + <li>ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã®çµæã䌎ãããããŒ: {{HTTPHeader("Content-Type")}}</li> + <li>ä»ã®åæ§ã®ããããŒ: {{HTTPHeader("TE")}}, {{HTTPHeader("Accept-Encoding")}}, {{HTTPHeader("Accept-Charset")}}, {{HTTPHeader("Accept-Language")}}</li> +</ul> diff --git a/files/ja/web/http/headers/access-control-allow-credentials/index.html b/files/ja/web/http/headers/access-control-allow-credentials/index.html new file mode 100644 index 0000000000..cb82779ef6 --- /dev/null +++ b/files/ja/web/http/headers/access-control-allow-credentials/index.html @@ -0,0 +1,101 @@ +--- +title: Access-Control-Allow-Credentials +slug: Web/HTTP/Headers/Access-Control-Allow-Credentials +tags: + - Access-Control-Allow-Credentials + - CORS + - HTTP + - Reference + - credentials + - header + - ã¬ã¹ãã³ã¹ããã㌠+ - è³æ Œæ
å ± +translation_of: Web/HTTP/Headers/Access-Control-Allow-Credentials +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Access-Control-Allow-Credentials</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ããªã¯ãšã¹ãã®è³æ Œæ
å ±ã¢ãŒã ({{domxref("Request.credentials")}}) ã <code>include</code> ã§ããå Žåã«ãã¬ã¹ãã³ã¹ãããã³ããšã³ãã® JavaScript ã³ãŒãã«å
¬éãããã©ããããã©ãŠã¶ãŒã«æ瀺ããŸãã</p> + +<p>蚌ææžã®è³æ Œæ
å ±ã¢ãŒã ({{domxref("Request.credentials")}}) ã <code>include</code> ã§ããå Žåãã¬ã¹ãã³ã¹ãããã³ããšã³ãã® JavaScript ã³ãŒãã«å
¬éãããã®ã¯ <code>Access-Control-Allow-Credentials</code> ã®å€ã <code>true</code> ã§ããå Žåã®ã¿ã§ãã</p> + +<p>è³æ Œæ
å ±ã¯ CookieãèªèšŒããããŒããŸã㯠TLS ã¯ã©ã€ã¢ã³ã蚌ææžã§ãã</p> + +<p>ããªãã©ã€ããªã¯ãšã¹ãã«å¯Ÿããã¬ã¹ãã³ã¹ã®äžéšãšããŠäœ¿çšãããå Žåã¯ãå®éã®ãªã¯ãšã¹ããè³æ Œæ
å ±ã䜿çšããŠè¡ãããå¯èœæ§ããããã©ããã瀺ããŸãããªããåçŽãª {{HTTPMethod("GET")}} ãªã¯ãšã¹ãã¯ããªãã©ã€ããè¡ãããªãã®ã§ãè³æ Œæ
å ±ãæã€ãªãœãŒã¹ã«å¯ŸããŠãªã¯ãšã¹ããè¡ãããå Žåããã®ããããŒããªãœãŒã¹ãšãšãã«è¿ãããªãå Žåãã¬ã¹ãã³ã¹ã¯ãã©ãŠã¶ãŒã«ãã£ãŠç¡èŠãããŠã§ãã³ã³ãã³ãã¯è¿ãããŸããã</p> + +<p><code>Access-Control-Allow-Credentials</code> ããããŒã¯ã {{domxref("XMLHttpRequest.withCredentials")}} ããããã£ãŸã㯠Fetch API ã® {{domxref("Request.Request()", "Request()")}} ã³ã³ã¹ãã©ã¯ã¿ãŒå
ã® <code>credentials</code> ãªãã·ã§ã³ãšã®çµã¿åããã§åäœããŸããè³æ Œæ
å ±ãå«ã CORS ãªã¯ãšã¹ãã«ãããŠããã©ãŠã¶ãŒãã¬ã¹ãã³ã¹ã JavaScript ã³ãŒãã«å
¬éããããã«ããããã«ã¯ããµãŒããŒåŽ (<code>Access-Control-Allow-Credentials</code> ããããŒã䜿çš) ãšã¯ã©ã€ã¢ã³ãåŽ (XHR, Fetch Ajax ãªã¯ãšã¹ãã®è³æ Œæ
å ±ã¢ãŒãã®èšå®) ã®äž¡æ¹ããè³æ Œæ
å ±ãå«ãããšãæ¿èªããªããã°ãªããŸããã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Access-Control-Allow-Credentials: true +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt>true</dt> + <dd>ãã®ããããŒã®å¯äžã®æå¹ãªå€ã¯ <code>true</code> ã§ã (倧æåå°æåãåºå¥ããŸã)ãè³æ Œæ
å ±ãå¿
èŠãšããªãå Žåã¯ã (å€ã false ã«èšå®ããã®ã§ã¯ãªã) ãã®ããããŒãå®å
šã«çç¥ããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>è³æ Œæ
å ±ã®èš±å¯:</p> + +<pre>Access-Control-Allow-Credentials: true</pre> + +<p><a href="/ja/docs/Web/API/XMLHttpRequest">XHR</a> ãè³æ Œæ
å ±ä»ãã§äœ¿çš:</p> + +<pre class="brush: js">var xhr = new XMLHttpRequest(); +xhr.open('GET', 'http://example.com/', true); +xhr.withCredentials = true; +xhr.send(null);</pre> + +<p><a href="/ja/docs/Web/API/Fetch_API">Fetch</a> ãè³æ Œæ
å ±ä»ãã§äœ¿çš:</p> + +<pre class="brush: js">fetch(url, { + credentials: 'include' +})</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Fetch','#http-access-control-allow-credentials', 'Access-Control-Allow-Credentials')}}</td> + <td>{{Spec2("Fetch")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Access-Control-Allow-Credentials")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{domxref("XMLHttpRequest.withCredentials")}}</li> + <li>{{domxref("Request.Request()", "Request()")}}</li> +</ul> diff --git a/files/ja/web/http/headers/access-control-allow-headers/index.html b/files/ja/web/http/headers/access-control-allow-headers/index.html new file mode 100644 index 0000000000..9c64abe4ef --- /dev/null +++ b/files/ja/web/http/headers/access-control-allow-headers/index.html @@ -0,0 +1,127 @@ +--- +title: Access-Control-Allow-Headers +slug: Web/HTTP/Headers/Access-Control-Allow-Headers +tags: + - CORS + - HTTP + - Reference + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Access-Control-Allow-Headers +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Access-Control-Allow-Headers</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ã {{HTTPHeader("Access-Control-Request-Headers")}} ãå«ã{{glossary("preflight request", "ããªãã©ã€ããªã¯ãšã¹ã")}}ãžã®ã¬ã¹ãã³ã¹ã§ãå®éã®ãªã¯ãšã¹ãã®éã«äœ¿çšã§ãã HTTP ããããŒã瀺ãããã«äœ¿çšãããŸãã</p> + +<p>ãã®ããããŒã¯ããªã¯ãšã¹ãã« {{HTTPHeader("Access-Control-Request-Headers")}} ããããŒãå«ãŸããŠããæã«å¿
èŠã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Access-Control-Allow-Headers: <em><header-name></em>[, <em><header-name></em>]* +Access-Control-Allow-Headers: * +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><header-name></dt> + <dd>察å¿ããŠãããªã¯ãšã¹ãããããŒã®ååã§ããããããŒã¯ã³ã³ãã§åºåã£ãŠãä»»æã®æ°ã®ãªã¹ãã«ããããšãã§ããŸãã</dd> + <dt><code>*</code> (ã¯ã€ã«ãã«ãŒã)</dt> + <dd>"<code>*</code>" ã®å€ã¯ãè³æ Œæ
å ±ã®ãªããªã¯ãšã¹ã (<a href="/en-US/docs/Web/HTTP/Cookies">HTTP Cookie</a> ã HTTP ã®èªèšŒæ
å ±ã®ãªããªã¯ãšã¹ã) ã®ç¹æ®ãªã¯ã€ã«ãã«ãŒãå€ã§ããèªèšŒæ
å ±ä»ãã®ãªã¯ãšã¹ãã§ã¯ãç¹å¥ãªæå³ã®ãªã "<code>*</code>" ãšããããããŒåãšããŠæ±ãããŸãããªãã {{HTTPHeader("Authorization")}} ããããŒã¯ã¯ã€ã«ãã«ãŒãã§è¡šãããšãã§ãããåžžã«æ瀺çã«åæããå¿
èŠããããŸãã</dd> +</dl> + +<p>{{glossary("CORS-safelisted_request_header", "CORS ã»ãŒããªã¹ããªã¯ãšã¹ãããããŒ")}}, {{HTTPHeader("Accept")}}, {{HTTPHeader("Accept-Language")}}, {{HTTPHeader("Content-Language")}}, {{HTTPHeader("Content-Type")}} ã¯åžžã«èš±å¯ãããŠããããã®ããããŒã§åæããå¿
èŠã¯ãããŸããããããããããã®ããããŒã <code>Access-Control-Allow-Headers</code> ã«åæããããšã§ããããã®ããããŒã§ãè¿œå ã®å¶çŽã®é©çšãåé¿ããããšãã§ããããšã«æ³šæããŠãã ããã</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="A_custom_header" name="A_custom_header">ã«ã¹ã¿ã ããããŒ</h3> + +<p><code>Access-Control-Allow-Headers</code> ããããŒãã©ã®ããã«èŠãããã®äŸã§ãã<em>CORS ã»ãŒããªã¹ããªã¯ãšã¹ãããããŒ</em>ã«å ããŠã <code>X-Custom-Header</code> ãšããååã®ã«ã¹ã¿ã ããããŒããµãŒããŒãžã® CORS ãªã¯ãšã¹ãã§å¯Ÿå¿ããŠããŸãã</p> + +<pre>Access-Control-Allow-Headers: X-Custom-Header</pre> + +<h3 id="Multiple_headers" name="Multiple_headers">è€æ°ã®ããããŒ</h3> + +<p>ãã®äŸã¯ãè€æ°ã®ããããŒãžã®å¯Ÿå¿ãæå®ãããšãã® <code>Access-Control-Allow-Headers</code> ã瀺ããŠããŸãã</p> + +<pre>Access-Control-Allow-Headers: X-Custom-Header, Upgrade-Insecure-Requests</pre> + +<h3 id="Bypassing_additional_restrictions" name="Bypassing_additional_restrictions">è¿œå ã®å¶çŽã®åé¿</h3> + +<p>{{glossary("CORS-safelisted_request_header", "CORS ã»ãŒããªã¹ããªã¯ãšã¹ãããããŒ")}}ã¯åžžã«èš±å¯ããããµã€ã㯠<code>Access-Control-Allow-Headers</code> ã«åæããå¿
èŠã¯ãããŸããããããã§ãåæããã°<a href="/en-US/docs/Glossary/CORS-safelisted_request_header#Additional_restrictions">è¿œå ã®å¶çŽ</a>ãé©çšãããããšãåé¿ã§ããŸãã</p> + +<pre>Access-Control-Allow-Headers: Accept</pre> + +<h3 id="Example_preflight_request" name="Example_preflight_request">ããªãã©ã€ããªã¯ãšã¹ãã®äŸ</h3> + +<p><code>Access-Control-Allow-Headers</code> ã䌎ãããªãã©ã€ããªã¯ãšã¹ãã®äŸãèŠãŠã¿ãŸãããã</p> + +<h4 id="Request" name="Request">ãªã¯ãšã¹ã</h4> + +<p>æåã«ãªã¯ãšã¹ãã§ããããªãã©ã€ããªã¯ãšã¹ã㯠{{HTTPMethod("OPTIONS")}} ãªã¯ãšã¹ãã§ã次ã®ããã«3ã€ã®ããªãã©ã€ããªã¯ãšã¹ãããããŒã {{HTTPHeader("Access-Control-Request-Method")}}, {{HTTPHeader("Access-Control-Request-Headers")}}, {{HTTPHeader("Origin")}} ã®çµã¿åãããå«ã¿ãŸãã</p> + +<pre>OPTIONS /resource/foo +Access-Control-Request-Method: DELETE +Access-Control-Request-Headers: origin, x-requested-with +Origin: https://foo.bar.org</pre> + +<h4 id="Response" name="Response">ã¬ã¹ãã³ã¹</h4> + +<p>CORS ãªã¯ãšã¹ãã {{HTTPMethod("DELETE")}} ã¡ãœããã䜿ãããšããµãŒããŒãèš±å¯ããå Žåã {{HTTPHeader("Access-Control-Allow-Methods")}} ã¬ã¹ãã³ã¹ããããŒã§è¿ä¿¡ããããã§ã¯ <code>DELETE</code> ãšãšãã«å¯Ÿå¿ãããã®ä»ã®ã¡ãœããã®ãªã¹ããå«ãŸããŸãã</p> + +<pre>HTTP/1.1 200 OK +Content-Length: 0 +Connection: keep-alive +Access-Control-Allow-Origin: https://foo.bar.org +Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE +Access-Control-Max-Age: 86400</pre> + +<p>èŠæ±ãããã¡ãœããã«å¯Ÿå¿ããŠããªãå Žåã¯ããµãŒããŒã¯ãšã©ãŒãè¿ããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Fetch','#http-access-control-allow-headers', 'Access-Control-Allow-Headers')}}</td> + <td>{{Spec2("Fetch")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Access-Control-Allow-Headers")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Access-Control-Allow-Origin")}}</li> + <li>{{HTTPHeader("Access-Control-Expose-Headers")}}</li> + <li>{{HTTPHeader("Access-Control-Allow-Methods")}}</li> + <li>{{HTTPHeader("Access-Control-Request-Headers")}}</li> +</ul> diff --git a/files/ja/web/http/headers/access-control-allow-methods/index.html b/files/ja/web/http/headers/access-control-allow-methods/index.html new file mode 100644 index 0000000000..78fca60c54 --- /dev/null +++ b/files/ja/web/http/headers/access-control-allow-methods/index.html @@ -0,0 +1,82 @@ +--- +title: Access-Control-Allow-Methods +slug: Web/HTTP/Headers/Access-Control-Allow-Methods +tags: + - CORS + - HTTP + - header + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Access-Control-Allow-Methods +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Access-Control-Allow-Methods</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ã{{glossary("preflight request", "ããªãã©ã€ããªã¯ãšã¹ã")}}ã®ã¬ã¹ãã³ã¹ã®äžã§ããªãœãŒã¹ã«ã¢ã¯ã»ã¹ãããšãã«å©çšã§ãã1ã€ãŸãã¯è€æ°ã®ã¡ãœãããæå®ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Access-Control-Allow-Methods: <method>, <method>, ... +Access-Control-Allow-Methods: * +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><method></dt> + <dd>èš±å¯ããã <a href="/ja/docs/Web/HTTP/Methods">HTTP ãªã¯ãšã¹ãã¡ãœãã</a>ã®ã³ã³ãåºåããªã¹ãã</dd> + <dt><code>*</code> (ã¯ã€ã«ãã«ãŒã)</dt> + <dd>"<code>*</code>" ã®å€ã¯ãè³æ Œæ
å ±ã®ãªããªã¯ãšã¹ã (<a href="/en-US/docs/Web/HTTP/Cookies">HTTP Cookie</a> ã HTTP èªèšŒæ
å ±ã®ãªããªã¯ãšã¹ã) ã®ç¹æ®ãªã¯ã€ã«ãã«ãŒãã§ããè³æ Œæ
å ±ä»ãã®ãªã¯ãšã¹ãã§ã¯ãç¹å¥ãªæå³ã®ãªã "<code>*</code>" ãšããã¡ãœããåãšããŠæ±ãããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Access-Control-Allow-Methods: POST, GET, OPTIONS +Access-Control-Allow-Methods: * +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Fetch','#http-access-control-allow-methods', 'Access-Control-Allow-Methods')}}</td> + <td>{{Spec2("Fetch")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Access-Control-Allow-Methods")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Access-Control-Allow-Origin")}}</li> + <li>{{HTTPHeader("Access-Control-Expose-Headers")}}</li> + <li>{{HTTPHeader("Access-Control-Allow-Headers")}}</li> + <li>{{HTTPHeader("Access-Control-Request-Method")}}</li> +</ul> diff --git a/files/ja/web/http/headers/access-control-allow-origin/index.html b/files/ja/web/http/headers/access-control-allow-origin/index.html new file mode 100644 index 0000000000..a5d5e57488 --- /dev/null +++ b/files/ja/web/http/headers/access-control-allow-origin/index.html @@ -0,0 +1,107 @@ +--- +title: Access-Control-Allow-Origin +slug: Web/HTTP/Headers/Access-Control-Allow-Origin +tags: + - Access Control + - Access-Control-Allow-Origin + - CORS + - Dealing with CORS + - HTTP + - HTTP Header + - How to Fix CORS + - Reference + - Security + - cross-origin issue + - header + - origin +translation_of: Web/HTTP/Headers/Access-Control-Allow-Origin +--- +<div>{{HTTPSidebar}}</div> + +<p><code><strong>Access-Control-Allow-Origin</strong></code> ã¬ã¹ãã³ã¹ããããŒã¯ãæå®ããã{{glossary("origin", "ãªãªãžã³")}}ããã®ãªã¯ãšã¹ããè¡ãã³ãŒãã§ã¬ã¹ãã³ã¹ãå
±æã§ãããã©ããã瀺ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Access-Control-Allow-Origin: * +Access-Control-Allow-Origin: <origin> +Access-Control-Allow-Origin: null +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>*</code></dt> + <dd><em>è³æ Œæ
å ±ããªã</em>ãªã¯ãšã¹ãã§ã¯ããªãã©ã«å€ "<code>*</code>" ãã¯ã€ã«ãã«ãŒããšããŠæå®ããããšãã§ããŸãããã®å€ã¯ãã©ãŠã¶ãŒã«ããã¹ãŠã®ãªãªãžã³ããã®ãªã¯ãšã¹ãã³ãŒãã«ãªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãèš±å¯ããããã«æ瀺ããŸããè³æ Œæ
å ±ãããæã«ã¯ã€ã«ãã«ãŒãã䜿çšãããšã<a href="/ja/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials">ãšã©ãŒãè¿ããŸã</a>ã</dd> + <dt><code><origin></code></dt> + <dd>ãªãªãžã³ãæå®ããŸãã1ã€ã®ãªãªãžã³ã ããæå®ããããšãã§ããŸãããµãŒããŒãè€æ°ã®ãªãªãžã³ããã®ã¯ã©ã€ã¢ã³ãã«å¯Ÿå¿ããŠããå Žåããªã¯ãšã¹ããè¡ã£ãç¹å®ã®ã¯ã©ã€ã¢ã³ãã®ãªãªãžã³ãè¿ããªããã°ãªããŸããã</dd> + <dt><code>null</code></dt> + <dd>ãªãªãžã³ã "null" ã«æå®ããŸãã + <div class="note"><strong>泚:</strong> <code>null</code> ã¯<a href="https://w3c.github.io/webappsec-cors-for-developers/#avoid-returning-access-control-allow-origin-null">䜿çšããªãã§ãã ãã</a>ãã<code>Access-Control-Allow-Origin: "null"</code> ãè¿ããšå®å
šã§ããããã«èŠããŸããããªãœãŒã¹ã®ãªãªãžã³ãéå±€çã§ã¯ãªãã¹ããŒã (äŸãã° <code>data:</code> ã <code>file:</code>) ã䜿çšããŠããããµã³ãããã¯ã¹åãããææžã¯ãã¹ãŠ "null" ãšãªãããã«å®çŸ©ãããŠããŸããå€ãã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãã®ãããªææžã« <code>Access-Control-Allow-Origin: "null"</code> ããããŒãä»ããŠãããšã¢ã¯ã»ã¹ãèš±å¯ããã®ã§ããããããªãªãžã³ã "null" ãæã€æªæã®ããææžãçæããããšãã§ããŸãããããã£ãŠã ACAO ããããŒã§ "null" å€ã䜿çšããããšã¯é¿ããã¹ãã§ããã</div> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>ãããããªãªãžã³ããã®ã³ãŒãã«ãªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãèš±å¯ãããããã©ãŠã¶ãŒã«æ瀺ããã¬ã¹ãã³ã¹ã«ã¯ã次ã®ãããªè¡ãå«ããŠãã ããã</p> + +<pre class="notranslate">Access-Control-Allow-Origin: *</pre> + +<p><code>https://developer.mozilla.org</code> ã®ãªãªãžã³ãããªã¯ãšã¹ããè¡ãã³ãŒãã«å¯ŸããŠããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãèš±å¯ãããããã©ãŠã¶ãŒã«æ瀺ããã¬ã¹ãã³ã¹ã«ã¯ã次ã®ãããªè¡ãå«ããŠãã ããã</p> + +<pre class="notranslate">Access-Control-Allow-Origin: https://developer.mozilla.org</pre> + +<p><code>Access-Control-Allow-Origin</code> ã®å€ã§è€æ°ã®ãªãªãžã³ã«èš±å¯ãéå®ããã«ã¯ããµãŒããŒåŽã§ {{HTTPHeader("Origin")}} ãªã¯ãšã¹ãããããŒã®å€ããã§ãã¯ããèš±å¯ãããªãªãžã³ã®ãªã¹ããšæ¯èŒããŠã {{HTTPHeader("Origin")}} ã®å€ããªã¹ãäžã«ããã°ã <code>Access-Control-Allow-Origin</code> ã®å€ã« {{HTTPHeader("Origin")}} ãšåãå€ãèšå®ããŠãã ããã</p> + +<h3 id="CORS_and_caching" name="CORS_and_caching">CORS ãšãã£ãã·ã³ã°</h3> + +<p><code>Access-Control-Allow-Origin</code> ã®å€ã ("<code>*</code>" ã¯ã€ã«ãã«ãŒãã§ã¯ãªã) å
·äœçãªãªãªãžã³ã§ããã¬ã¹ãã³ã¹ããµãŒããŒãéä¿¡ããå Žåãã¬ã¹ãã³ã¹ã«ã¯ {{HTTPHeader("Vary")}} ã¬ã¹ãã³ã¹ããããŒã« <code>Origin</code> ãšããå€ãèšå®ããŠã <code>Origin</code> ãªã¯ãšã¹ãããããŒã®å€ã«ãã£ãŠå€ãå€ããããšããã©ãŠã¶ãŒã«å¯ŸããŠç€ºããŠãã ããã</p> + +<pre class="notranslate">Access-Control-Allow-Origin: https://developer.mozilla.org +Vary: Origin</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Fetch','#http-access-control-allow-origin', 'Access-Control-Allow-Origin')}}</td> + <td>{{Spec2("Fetch")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Access-Control-Allow-Origin")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Origin")}}</li> + <li>{{HTTPHeader("Vary")}}</li> + <li><a href="/ja/docs/Web/HTTP/CORS">Cross-Origin Resource Sharing (CORS)</a></li> + <li>{{httpheader("Cross-Origin-Resource-Policy")}}</li> +</ul> diff --git a/files/ja/web/http/headers/access-control-expose-headers/index.html b/files/ja/web/http/headers/access-control-expose-headers/index.html new file mode 100644 index 0000000000..42c62b5b57 --- /dev/null +++ b/files/ja/web/http/headers/access-control-expose-headers/index.html @@ -0,0 +1,107 @@ +--- +title: Access-Control-Expose-Headers +slug: Web/HTTP/Headers/Access-Control-Expose-Headers +tags: + - CORS + - HTTP + - Reference + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Access-Control-Expose-Headers +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Access-Control-Expose-Headers</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ãã¬ã¹ãã³ã¹ã®äžéšãšããŠã©ã®ããããŒãå
¬éããããããã®ååãåæããŠç€ºããŸãã</p> + +<p>æ¢å®ã§ã¯ãå
¬éããã {{Glossary("CORS-safelisted response header", "CORS ã»ãŒããªã¹ãã¬ã¹ãã³ã¹ããããŒ")}}ã¯7ã€ã ãã§ãã</p> + +<ul> + <li>{{HTTPHeader("Cache-Control")}}</li> + <li>{{HTTPHeader("Content-Language")}}</li> + <li>{{HTTPHeader("Content-Length")}}</li> + <li>{{HTTPHeader("Content-Type")}}</li> + <li>{{HTTPHeader("Expires")}}</li> + <li>{{HTTPHeader("Last-Modified")}}</li> + <li>{{HTTPHeader("Pragma")}}</li> +</ul> + +<p>ã¯ã©ã€ã¢ã³ããä»ã®ããããŒã«ã¢ã¯ã»ã¹ã§ããããã«ããã«ã¯ã <code>Access-Control-Expose-Headers</code> ããããŒã䜿çšããŠããããŒãåæããå¿
èŠããããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Access-Control-Expose-Headers: <header-name>, <header-name>, ... +Access-Control-Expose-Headers: * +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><header-name></dt> + <dd>ãŒãå以äžã®<a href="/ja/docs/Web/HTTP/Headers">ããããŒå</a>ã®äžèŠ§ã§ã {{Glossary("CORS-safelisted response header", "CORS ã»ãŒããªã¹ãã¬ã¹ãã³ã¹ããããŒ")}}ã«å«ãŸããªããã®ã§ããããªãœãŒã¹ã䜿çšããå¯èœæ§ããããå
¬éãããå¯èœæ§ããããã®ã§ãã</dd> + <dt><code>*</code> (ã¯ã€ã«ãã«ãŒã)</dt> + <dd>"<code>*</code>" ã®å€ã¯ãè³æ Œæ
å ±ã®ãªããªã¯ãšã¹ã (<a href="/en-US/docs/Web/HTTP/Cookies">HTTP Cookie</a> ã HTTP ã®è³æ Œæ
å ±ã®ãªããªã¯ãšã¹ã) ã®ç¹æ®ãªã¯ã€ã«ãã«ãŒãå€ã§ããè³æ Œæ
å ±ä»ãã®ãªã¯ãšã¹ãã§ã¯ãç¹å¥ãªæå³ã®ãªã "<code>*</code>" ãšããããããŒåãšããŠæ±ãããŸãã<br> + ãªãã {{HTTPHeader("Authorization")}} ããããŒã¯ã¯ã€ã«ãã«ãŒãã§è¡šãããšãã§ãããåžžã«æ瀺çã«åæããå¿
èŠããããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>CORS ã»ãŒããªã¹ãã«ãªãã¬ã¹ãã³ã¹ããããŒãå
¬éããã«ã¯ã次ã®ããã«æå®ããŸãã</p> + +<pre>Access-Control-Expose-Headers: Content-Length</pre> + +<p><code>X-Kuma-Revision</code> ã®ãããªã«ã¹ã¿ã ããããŒãããã«å
¬éããã«ã¯ãè€æ°ã®ããããŒãã«ã³ãã§åºåã£ãŠæå®ããããšãã§ããŸãã</p> + +<pre>Access-Control-Expose-Headers: Content-Length, X-Kuma-Revision</pre> + +<p>è³æ Œæ
å ±ã®ãªããªã¯ãšã¹ãã§ã¯ãã¯ã€ã«ãã«ãŒãå€ã䜿ãããšãã§ããŸãã</p> + +<pre>Access-Control-Expose-Headers: *</pre> + +<p>äœãã {{HTTPHeader("Authorization")}} ããããŒã¯ã¯ã€ã«ãã«ãŒãã®å¯Ÿè±¡ã«ãªããªãã®ã§ãæ瀺çã«åæããå¿
èŠããããŸãã</p> + +<pre>Access-Control-Expose-Headers: *, Authorization</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Fetch','#http-access-control-expose-headers', 'Access-Control-Expose-Headers')}}</td> + <td>{{Spec2("Fetch")}}</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Access-Control-Expose-Headers")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Access-Control-Allow-Headers")}}</li> + <li>{{HTTPHeader("Access-Control-Allow-Origin")}}</li> +</ul> diff --git a/files/ja/web/http/headers/access-control-max-age/index.html b/files/ja/web/http/headers/access-control-max-age/index.html new file mode 100644 index 0000000000..01ac17a758 --- /dev/null +++ b/files/ja/web/http/headers/access-control-max-age/index.html @@ -0,0 +1,81 @@ +--- +title: Access-Control-Max-Age +slug: Web/HTTP/Headers/Access-Control-Max-Age +tags: + - CORS + - HTTP + - Reference + - header +translation_of: Web/HTTP/Headers/Access-Control-Max-Age +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>Access-Control-Max-Age</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ã{{glossary("preflight request", "ããªãã©ã€ããªã¯ãšã¹ã")}}ã®çµæ (ã€ãŸã {{HTTPHeader("Access-Control-Allow-Methods")}} ããã³ {{HTTPHeader("Access-Control-Allow-Headers")}} ããããŒã«å«ãŸããæ
å ±) ããã£ãã·ã¥ããããšãã§ããæéã®é·ãã瀺ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Access-Control-Max-Age: <delta-seconds> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><delta-seconds></dt> + <dd>çµæããã£ãã·ã¥ããããšãã§ããæé·ã®ç§æ°ã§ãã<br> + Firefox ã¯<a href="https://dxr.mozilla.org/mozilla-central/rev/7ae377917236b7e6111146aa9fb4c073c0efc7f4/netwerk/protocol/http/nsCORSListenerProxy.cpp#1131">24æé</a> (86400ç§) ãã£ãã·ã¥ããããšãã§ããŸãã<br> + Chromium (v76 以å) ã¯<a href="https://cs.chromium.org/chromium/src/services/network/public/cpp/cors/preflight_result.cc?l=36&rcl=52002151773d8cd9ffc5f557cd7cc880fddcae3e">10å</a> (600ç§) ã§ãã<br> + Chromium (v76 以é) ã¯<a href="https://cs.chromium.org/chromium/src/services/network/public/cpp/cors/preflight_result.cc?l=31&rcl=49e7c0b4886cac1f3d09dc046bd528c9c811a0fa">2æé</a> (7200ç§) ã§ãã<br> + Chromium ã¯æ¢å®å€ã5åã«èšå®ããããšãã§ããŸãã<br> + <strong>-1</strong>ã®å€ã¯ãã£ãã·ã¥ãç¡å¹ã«ãããã¹ãŠã®åŒã³åºãããã§ãã¯ããããã«ããªãã©ã€ãã® OPTIONS ãå¿
èŠã«ãªããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>ããªãã©ã€ãèŠæ±ã®çµæã¯10åéãã£ãã·ã¥ãããŸãã</p> + +<pre class="notranslate">Access-Control-Max-Age: 600 </pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Fetch','#http-access-control-max-age', 'Access-Control-Max-Age')}}</td> + <td>{{Spec2("Fetch")}}</td> + <td>ååå®çŸ©ã</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Access-Control-Max-Age")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Access-Control-Allow-Headers")}}</li> + <li>{{HTTPHeader("Access-Control-Allow-Methods")}}</li> +</ul> diff --git a/files/ja/web/http/headers/access-control-request-headers/index.html b/files/ja/web/http/headers/access-control-request-headers/index.html new file mode 100644 index 0000000000..bfac1b311f --- /dev/null +++ b/files/ja/web/http/headers/access-control-request-headers/index.html @@ -0,0 +1,73 @@ +--- +title: Access-Control-Request-Headers +slug: Web/HTTP/Headers/Access-Control-Request-Headers +tags: + - CORS + - HTTP + - Reference + - header +translation_of: Web/HTTP/Headers/Access-Control-Request-Headers +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>Access-Control-Request-Headers</code></strong> ãªã¯ãšã¹ãããããŒã¯{{glossary("preflight request", "ããªãã©ã€ããªã¯ãšã¹ã")}}ãçºè¡ããéã«ãã©ãŠã¶ãŒã䜿çšããå®éã®ãªã¯ãšã¹ããè¡ãéã«ã©ã® <a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a>ã䜿çšãããããµãŒããŒã«ç¥ãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Access-Control-Request-Headers: <header-name>, <header-name>, ... +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><header-name></dt> + <dd>ãªã¯ãšã¹ãã«å«ãŸãã <a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a>ã®ã«ã³ãåºåãã®ãªã¹ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Access-Control-Request-Headers: X-PINGOTHER, Content-Type</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Fetch','#http-access-control-request-headers', 'Access-Control-Request-Headers')}}</td> + <td>{{Spec2("Fetch")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Access-Control-Request-Headers")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Access-Control-Request-Method")}}</li> +</ul> diff --git a/files/ja/web/http/headers/access-control-request-method/index.html b/files/ja/web/http/headers/access-control-request-method/index.html new file mode 100644 index 0000000000..70edb0736b --- /dev/null +++ b/files/ja/web/http/headers/access-control-request-method/index.html @@ -0,0 +1,73 @@ +--- +title: Access-Control-Request-Method +slug: Web/HTTP/Headers/Access-Control-Request-Method +tags: + - CORS + - HTTP + - Reference + - header +translation_of: Web/HTTP/Headers/Access-Control-Request-Method +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>Access-Control-Request-Method</code></strong> ãªã¯ãšã¹ãããããŒã¯ã{{glossary("preflight request", "ããªãã©ã€ããªã¯ãšã¹ã")}}ãçºè¡ããéã«ãã©ãŠã¶ãŒã䜿çšããå®éã®ãªã¯ãšã¹ããè¡ãããéã«ã©ã® HTTP ã¡ãœããã䜿çšããããããµãŒããŒã«ç¥ãããããã«äœ¿çšãããŸããããªãã©ã€ããªã¯ãšã¹ãã¯åžžã« OPTIONS ã§ãããå®éã®ãªã¯ãšã¹ããšã¯åãã¡ãœããã䜿çšããªãããããã®ããããŒãå¿
èŠã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Access-Control-Request-Method: <method> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><method></dt> + <dd><a href="/ja/docs/Web/HTTP/Methods">HTTP ãªã¯ãšã¹ãã¡ãœãã</a>ã®1ã€ãäŸãã° {{HTTPMethod("GET")}}, {{HTTPMethod("POST")}}, {{HTTPMethod("DELETE")}} ãªã©ã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Access-Control-Request-Method: POST</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Fetch','#http-access-control-request-method', 'Access-Control-Request-Method')}}</td> + <td>{{Spec2("Fetch")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Access-Control-Request-Method")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Access-Control-Request-Headers")}}</li> +</ul> diff --git a/files/ja/web/http/headers/age/index.html b/files/ja/web/http/headers/age/index.html new file mode 100644 index 0000000000..f495fa7f7f --- /dev/null +++ b/files/ja/web/http/headers/age/index.html @@ -0,0 +1,74 @@ +--- +title: Age +slug: Web/HTTP/Headers/Age +tags: + - Caching + - HTTP + - ããã㌠+ - ã¬ã¹ãã³ã¹ +translation_of: Web/HTTP/Headers/Age +--- +<div>{{HTTPSidebar}}</div> + +<p><code><strong>Age</strong></code> ããããŒã«ã¯ããããã·ãŒã®ãã£ãã·ã¥ã«å
¥ã£ãŠããã®çµéæéïŒç§ïŒãå«ãŸããŠããŸãã</p> + +<p><code>Age</code> ããããŒã¯éåžžïŒã«è¿ãå€ãšãªã£ãŠããŸãããã <code>Age: 0</code> ã§ãããªãã ãããããªãªãžã³ãµãŒããŒãããã§ãããããã ãã§ãããã ãã以å€ã®å Žåã¯ãäžè¬çã«ãããã·ãŒã®çŸåšã®æ¥æãšHTTPã¬ã¹ãã³ã¹ã«å«ãŸããŠãã{{HTTPHeader("Date")}} ããããŒãšã®å·®åããç®åºãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header","ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="æ§æ">æ§æ</h2> + +<pre class="syntaxbox">Age: <delta-seconds> +</pre> + +<h2 id="ãã£ã¬ã¯ãã£ã">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><delta-seconds></dt> + <dd> + <p>ãªããžã§ã¯ãããããã·ãã£ãã·ã¥ã«å
¥ã£ãŠããæé (ç§åäœ) ãè¡šãè² ã§ãªãæŽæ°ã</p> + </dd> +</dl> + +<h2 id="äŸ">äŸ</h2> + +<pre>Age: 24</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7234", "Age", "5.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Caching</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºææ§">ãã©ãŠã¶ã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Age")}}</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Cache-Control")}}</li> + <li>{{HTTPHeader("Expires")}}</li> +</ul> diff --git a/files/ja/web/http/headers/allow/index.html b/files/ja/web/http/headers/allow/index.html new file mode 100644 index 0000000000..62098566bd --- /dev/null +++ b/files/ja/web/http/headers/allow/index.html @@ -0,0 +1,67 @@ +--- +title: Allow +slug: Web/HTTP/Headers/Allow +tags: + - Entity header + - HTTP + - HTTP Header + - Reference + - header +translation_of: Web/HTTP/Headers/Allow +--- +<div>{{HTTPSidebar}}</div> + +<p><code><strong>Allow</strong></code> ããããŒã¯ããããªãœãŒã¹ã察å¿ããŠããã¡ãœããã®äžèŠ§ã瀺ããŸãã</p> + +<p>ãã®ããããŒã¯ããµãŒããŒã {{HTTPStatus("405")}} <code>Method Not Allowed</code> ã¹ããŒã¿ã¹ã³ãŒãã§è¿çããå Žåã䜿çšããããšãã§ãããªã¯ãšã¹ãã¡ãœããã瀺ãããã«éä¿¡ããå¿
èŠããããŸãã <code>Allow</code> ããããŒã空ã§ããå ŽåããªãœãŒã¹ãèš±å¯ããŠãããªã¯ãšã¹ãã¡ãœããããªãããšã瀺ããäŸãã°æå®ããããªãœãŒã¹ã«ãããŠäžæçã«çºçããå¯èœæ§ããããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Entity header", "ãšã³ãã£ãã£ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name","çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Allow: <http-methods> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><http-methods></dt> + <dd>èš±å¯ãããŠãã <a href="/ja/docs/Web/HTTP/Methods">HTTP ãªã¯ãšã¹ãã¡ãœãã</a>ã®äžèŠ§ã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Allow: GET, POST, HEAD</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + </tr> + <tr> + <td>{{RFC("7231", "Allow", "7.4.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </thead> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("405")}}</li> + <li>{{HTTPHeader("Server")}}</li> +</ul> diff --git a/files/ja/web/http/headers/alt-svc/index.html b/files/ja/web/http/headers/alt-svc/index.html new file mode 100644 index 0000000000..b0630eecf0 --- /dev/null +++ b/files/ja/web/http/headers/alt-svc/index.html @@ -0,0 +1,72 @@ +--- +title: Alt-Svc +slug: Web/HTTP/Headers/Alt-Svc +tags: + - HTTP + - HTTP Header + - NeedsCompatTable + - Reference +translation_of: Web/HTTP/Headers/Alt-Svc +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Alt-Svc</code></strong> 㯠HTTP ã®ã¬ã¹ãã³ã¹ããããŒã§ãåããªãœãŒã¹ã«å°éã§ãã代æ¿ãµãŒãã¹ã宣äŒããããã«äœ¿çšããŸãã 代æ¿ãµãŒãã¹ã¯ããããã³ã«/ãã¹ã/ããŒãã®çµã¿åããã«ãã£ãŠå®çŸ©ããŸãã</p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Alt-Svc: clear +Alt-Svc: <var><protocol-id></var>=<em><alt-authority></em>; ma=<var><max-age></var> +Alt-Svc: <var><protocol-id></var>=<em><alt-authority></em>; ma=<var><max-age></var>; persist=1</pre> + +<dl> + <dt><code>clear</code></dt> + <dd>ç¹å¥ãªå€ <code>clear</code> ã¯ããã®ãªãªãžã³ã®ãã¹ãŠã®ä»£æ¿ãç¡å¹ã«ããããšããªãªãžã³ãèŠæ±ããããšã瀺ããŸãã</dd> + <dt><code><protocol-id></code></dt> + <dd>{{Glossary("ALPN")}} ãããã³ã«èå¥åã äŸã«ã¯ãHTTP/2 ã® h2 ããã³ HTTP/3 ãããã³ã«ã®ãã©ãã 25 ã® h3-25 ãå«ãŸããŠããŸãã</dd> + <dt><code><alt-authority></code></dt> + <dd>ä»»æã®ãã¹ãã®ãªãŒããŒã©ã€ããã³ãã³ãããã³å¿
é ã®ããŒãçªå·ã§æ§æããã代æ¿æ©é¢ãæå®ããåŒçšç¬Šä»ãã®æååã</dd> + <dt><code>ma=<max-age></code>{{Optional_Inline}}</dt> + <dd>代æ¿ãµãŒãã¹ãæ°é®®ã§ãããšèŠãªãç§æ°ã çç¥ããå Žåã®ããã©ã«ãã¯24æéã§ãã 代æ¿ãµãŒãã¹ã®ãšã³ããªã¯ãæ倧㧠<em><max-age></em> ããïŒ{{ httpheader("Age") }} ããããŒããã®ïŒã¬ã¹ãã³ã¹ã®çµéæéãå·®ãåŒããç§æ°ãŸã§ãã£ãã·ã¥ã§ããŸãã ãã£ãã·ã¥ããããšã³ããªãæéåãã«ãªããšãã¯ã©ã€ã¢ã³ãã¯æ°ããæ¥ç¶ã«ãã®ä»£æ¿ãµãŒãã¹ã䜿çšã§ããªããªããŸãã</dd> + <dt><code>persist=1</code>{{Optional_Inline}}</dt> + <dd>éåžžããã£ãã·ã¥ããã代æ¿ãµãŒãã¹ãšã³ããªã¯ããããã¯ãŒã¯æ§æã®å€æŽæã«ã¯ãªã¢ãããŸãã persist=1 ãã©ã¡ãŒã¿ã䜿çšãããšããã®ãããªå€æŽã«ãã£ãŠãšã³ããªãåé€ãããªããªããŸãã</dd> +</dl> + +<p>åºåãæåãšããŠã«ã³ãã䜿çšããŠãåäžã® <code>Alt-Svc</code> ããããŒã§è€æ°ã®ãšã³ããªãæå®ã§ããŸãã ãã®å Žåãæ©æã®ãšã³ããªãŒãããæãŸãããšèããããŸãã</p> + +<h2 id="Example" name="Example">äŸ</h2> + +<pre class="notranslate">Alt-Svc: h2=":443"; ma=2592000; +Alt-Svc: h2=":443"; ma=2592000; persist=1 +Alt-Svc: h2="alt.example.com:443", h2=":443" +Alt-Svc: h3-25=":443"; ma=3600, h2=":443"; ma=3600</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC(7838)}}</td> + <td><span class="spec-RFC">IETF RFC</span></td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Alt-Svc")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web">ãŠã§ãäžã®ãªãœãŒã¹ã®èå¥</a></li> +</ul> diff --git a/files/ja/web/http/headers/authorization/index.html b/files/ja/web/http/headers/authorization/index.html new file mode 100644 index 0000000000..eb2c53a8a2 --- /dev/null +++ b/files/ja/web/http/headers/authorization/index.html @@ -0,0 +1,92 @@ +--- +title: Authorization +slug: Web/HTTP/Headers/Authorization +tags: + - HTTP + - HTTP ããã㌠+ - ããã㌠+ - ãªã¯ãšã¹ãããã㌠+ - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Authorization +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>Authorization</code></strong> èŠæ±ããããŒã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ãããµãŒããŒããèªèšŒãåããããã®èšŒææžãä¿æãããµã€ãã¯ãµãŒããŒã {{HTTPStatus("401")}} <code>Unauthorized</code> ç¶æ
ãš {{HTTPHeader("WWW-Authenticate")}} ããããŒãè¿ããåŸã«äœ¿ãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Authorization: <type> <credentials></pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><type></dt> + <dd><a href="/ja/docs/Web/HTTP/Authentication#Authentication_schemes">èªèšŒã®çš®é¡</a>ãäžè¬çã«ã¯ <a href="/ja/docs/Web/HTTP/Authentication#Basic_authentication_scheme">"Basic"</a> ã§ãããã以å€ã®çš®é¡ã¯ä»¥äžã«èšè¿°ãããŠããŸãã + <ul> + <li><a href="http://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">èªèšŒæ¹æ³ã® IANA ã¬ãžã¹ããª</a></li> + <li><a href="http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html">AWS ãµãŒããŒã®èªèšŒ (<code>AWS4-HMAC-SHA256</code>)</a></li> + </ul> + </dd> + <dt><credentials></dt> + <dd>"Basic" èªèšŒæ¹åŒã䜿çšããŠããå ŽåãèªèšŒæ
å ±ã¯æ¬¡ã®ããã«æ§ç¯ãããŸãã + <ul> + <li>ã³ãã³ã§çµåãããŠãŒã¶ãŒåãšãã¹ã¯ãŒã (<code>aladdin:opensesame</code>)ã</li> + <li>çµæã®æåå㯠<a href="/ja/docs/Web/API/WindowBase64/Base64_encoding_and_decoding">Base64</a> ã§ãšã³ã³ãŒããããŸã (<code>YWxhZGRpbjpvcGVuc2VzYW1l</code>)ã</li> + </ul> + + <div class="note"> + <p><strong>ã¡ã¢</strong>: Base64 ãšã³ã³ãŒãã¯æå·åã§ãããã·ã¥ã§ããããŸããããã®æ¹æ³ã®å®å
šæ§ã¯ã¯ãªã¢ããã¹ãã§èªèšŒæ
å ±ãéãã®ãšåçã§ã (Base64 ã¯å¯éãšã³ã³ãŒãã£ã³ã°ã§ã)ã Basic èªèšŒã¯ HTTPS ãšã®çµã¿åããã§äœ¿çšããããšããå§ãããŸãã</p> + </div> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l +</pre> + +<p>Apache ã nginx ãµãŒããŒã§ HTTP Basic èªèšŒã䜿çšããŠãµã€ããä¿è·ããæ¹æ³ã®äŸã«ã€ããŠã¯ã <a href="/ja/docs/Web/HTTP/Authentication">HTTP authentication</a> ãåç
§ããŠãã ããã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7235", "Authorization", "4.2")}}</td> + <td>HTTP/1.1: Authentication</td> + </tr> + <tr> + <td>{{RFC("7617")}}</td> + <td>The 'Basic' HTTP Authentication Scheme</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Authentication">HTTP èªèšŒ</a></li> + <li>{{HTTPHeader("WWW-Authenticate")}}</li> + <li>{{HTTPHeader("Proxy-Authorization")}}</li> + <li>{{HTTPHeader("Proxy-Authenticate")}}</li> + <li>{{HTTPStatus("401")}}, {{HTTPStatus("403")}}, {{HTTPStatus("407")}}</li> +</ul> diff --git a/files/ja/web/http/headers/cache-control/index.html b/files/ja/web/http/headers/cache-control/index.html new file mode 100644 index 0000000000..c0de619b14 --- /dev/null +++ b/files/ja/web/http/headers/cache-control/index.html @@ -0,0 +1,230 @@ +--- +title: Cache-Control +slug: Web/HTTP/Headers/Cache-Control +tags: + - Cache-Control + - HTTP + - HTTP ããã㌠+ - Reference + - äžè¬ããã㌠+translation_of: Web/HTTP/Headers/Cache-Control +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><strong><code>Cache-Control</code></strong> 㯠HTTP ã®ããããŒã§ããªã¯ãšã¹ããšã¬ã¹ãã³ã¹ã®äž¡æ¹ã§<a href="/ja/docs/Web/HTTP/Caching">ãã£ãã·ã¥</a>ã®ããã®<em>ãã£ã¬ã¯ãã£ã</em> (æ瀺) ãæ ŒçŽãããŠããŸãããªã¯ãšã¹ãã§æå®ããããã£ã¬ã¯ãã£ãã¯ãã¬ã¹ãã³ã¹ã§ãåããã£ã¬ã¯ãã£ãã䜿çšããªããã°ãªããªããšããããšã§ã¯ãããŸããã</span></p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("General header", "äžè¬ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + <tr> + <th scope="row">{{Glossary("CORS-safelisted response header", "CORS ã»ãŒããªã¹ãã¬ã¹ãã³ã¹ããããŒ")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p>ãã£ãã·ã¥ã®ãã£ã¬ã¯ãã£ãã«ã¯ã以äžã®ãããªèŠåããããŸãã</p> + +<ul> + <li>倧æåå°æåã®åºå¥ã¯ãããŸããããå°æåãæšå¥šãããŠããŸãã</li> + <li>è€æ°ã®ãã£ã¬ã¯ãã£ãã¯ã«ã³ãã§åºåããŸãã</li> + <li>ãã£ã¬ã¯ãã£ãã«ãã£ãŠã¯ãªãã·ã§ã³ã®åŒæ°ãããã<em>ããŒã¯ã³</em>ãŸã㯠<em>quoted-string</em> ã®ã©ã¡ããã§æå®ããŸãã (å®çŸ©ã«ã€ããŠã¯ä»æ§æžãåç
§)</li> +</ul> + +<h3 id="Cache_request_directives" name="Cache_request_directives">ãªã¯ãšã¹ãæã®ãã£ãã·ã¥ãã£ã¬ã¯ãã£ã</h3> + +<p>ã¯ã©ã€ã¢ã³ãããã® HTTP ãªã¯ãšã¹ãã§äœ¿çšãããå¯èœæ§ããããæšæºç㪠<code>Cache-Control</code> ãã£ã¬ã¯ãã£ãã§ãã</p> + +<pre class="syntaxbox notranslate">Cache-Control: max-age=<seconds> +Cache-Control: max-stale[=<seconds>] +Cache-Control: min-fresh=<seconds> +Cache-Control: no-cache +Cache-Control: no-store +Cache-Control: no-transform +Cache-Control: only-if-cached +</pre> + +<h3 id="Cache_response_directives" name="Cache_response_directives">ã¬ã¹ãã³ã¹æã®ãã£ãã·ã¥ãã£ã¬ã¯ãã£ã</h3> + +<p>ãµãŒããŒããã® HTTP ã¬ã¹ãã³ã¹ã§äœ¿çšãããå¯èœæ§ããããæšæºç㪠<code>Cache-Control</code> ãã£ã¬ã¯ãã£ãã§ãã</p> + +<pre class="syntaxbox notranslate">Cache-Control: must-revalidate +Cache-Control: no-cache +Cache-Control: no-store +Cache-Control: no-transform +Cache-Control: public +Cache-Control: private +Cache-Control: proxy-revalidate +Cache-Control: max-age=<seconds> +Cache-Control: s-maxage=<seconds> +</pre> + +<h3 id="Extension_Cache-Control_directives" name="Extension_Cache-Control_directives">Cache-Control ãã£ã¬ã¯ãã£ãã®æ¡åŒµ</h3> + +<p><code>Cache-Control</code> ãã£ã¬ã¯ãã£ãã®æ¡åŒµã¯ã HTTP ãã£ãã·ã¥æšæºã®ã³ã¢ããã¥ã¡ã³ãã«ã¯å«ãŸããŠããŸããã察å¿ç¶æ³ã«ã€ããŠã¯<a href="#Browser_compatibility">äºææ§äžèŠ§è¡š</a>ã確èªããŠãã ããã解éã§ããªããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ããããç¡èŠããŸãã</p> + +<pre class="syntaxbox notranslate">Cache-Control: immutable +Cache-Control: stale-while-revalidate=<seconds> +Cache-Control: stale-if-error=<seconds> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<h3 id="Cacheability" name="Cacheability">ãã£ãã·ã¥å¯èœæ§</h3> + +<p>ãã©ãŠã¶ãŒãã¬ã¹ãã³ã¹ããã£ãã·ã¥ããã®ã¯é垞以äžã®å Žåã§ãã</p> + +<ul> + <li>ã¹ããŒã¿ã¹ã³ãŒãã {{HTTPStatus("301")}}, {{HTTPStatus("302")}}, {{HTTPStatus("307")}}, {{HTTPStatus("308")}}, {{HTTPStatus("410")}} ã®äœããã§ã<strong>ãã€</strong></li> + <li><code>Cache-Control</code> ã« <code>no-store</code> ããªããã ãã<em>ãããã·ã®å Žåã¯</em> <code>private</code> ããªãã <strong>ãã€</strong></li> + <li>{{HTTPHeader("Authorization")}} ãèšå®ãããŠããªã</li> + <li>以äžã®äœããã«è©²åœããå Žå + <ul> + <li>ã¹ããŒã¿ã¹ã³ãŒãã {{HTTPStatus("301")}}, {{HTTPStatus("302")}}, {{HTTPStatus("307")}}, {{HTTPStatus("308")}}, {{HTTPStatus("410")}} ã®äœããã<strong>ãŸãã¯</strong></li> + <li><code>public</code>, <code>max-age</code> <code>s-maxage</code> ã®äœããã <code>Cache-Control</code> ã«æå®ãããŠããã<strong>ãŸãã¯</strong></li> + <li>{{HTTPHeader("Expires")}} ãèšå®ãããŠãã</li> + </ul> + </li> +</ul> + +<dl> + <dt><code>public</code></dt> + <dd>ã¬ã¹ãã³ã¹ãéåžžã¯ãã£ãã·ã¥å¯èœã§ãªããŠããã¬ã¹ãã³ã¹ã<em>ã©ã®</em>ãã£ãã·ã¥ã«ãæ ŒçŽããããšãã§ããŸãã</dd> + <dt><code>private</code></dt> + <dd>ã¬ã¹ãã³ã¹ãéåžžã¯ãã£ãã·ã¥å¯èœã§ãªããŠãã<em>ãã©ãŠã¶ãŒã®</em>ãã£ãã·ã¥ã«ã®ã¿æ ŒçŽããããšãã§ããŸãã<strong>ã¬ã¹ãã³ã¹ãã©ã®ãã£ãã·ã¥ã«ãä¿åãããªãããã«ããã«ã¯ã代ããã« <code>no-store</code> ã䜿çšããŠãã ããã</strong><em>ãã®ãã£ã¬ã¯ãã£ãã«ã¯ã¬ã¹ãã³ã¹ããã£ãã·ã¥ã«ä¿åãããªãããã«ããå¹æã¯ãããŸããã</em></dd> + <dt><code>no-cache</code></dt> + <dd>ã¬ã¹ãã³ã¹ãéåžžã¯ãã£ãã·ã¥å¯èœã§ãªããŠããã¬ã¹ãã³ã¹ã<em>ã©ã®</em>ãã£ãã·ã¥ã«ãæ ŒçŽããããšãã§ããŸããããããæ ŒçŽãããã¬ã¹ãã³ã¹ã¯äœ¿çšããåã«<em>åžžã«</em>å
ã®ãµãŒããŒãšã®æ€èšŒãéããªããã°ãªããªãã®ã§ã <code>no-cache</code> ã <code>immutable</code> ãšçµã¿åãããŠäœ¿çšããããšã¯ã§ããŸããã<strong>ã¬ã¹ãã³ã¹ãã©ã®ãã£ãã·ã¥ã«ãä¿åãããªãããã«ããã«ã¯ã代ããã« <code>no-store</code> ã䜿çšããŠãã ããã</strong><em>ãã®ãã£ã¬ã¯ãã£ãã«ã¯ã¬ã¹ãã³ã¹ããã£ãã·ã¥ã«ä¿åãããªãããã«ããå¹æã¯ãããŸããã</em></dd> + <dt><code>no-store</code></dt> + <dd>ã¬ã¹ãã³ã¹ããã£ãã·ã¥ã«ä¿åããããšã¯<strong>ã§ããŸãã</strong>ãä»ã®ãã£ã¬ã¯ãã£ããèšå®ããããšãã§ããŸãããæè¿ã®ãã©ãŠã¶ãŒã§ã¯<em>ã¬ã¹ãã³ã¹ããã£ãã·ã¥ãããããšãé²ãããã«å¿
èŠãªãã£ã¬ã¯ãã£ãã¯ããã ã</em>ã§ãã <code>max-age=0</code> <strong>ãæé»ã§å«ãŸããŸã</strong>ã <code>must-revalidate</code> <strong>ã¯æå³ãæã¡ãŸãã</strong>ãåæ€èšŒãè¡ãã«ã¯ã¬ã¹ãã³ã¹ããã£ãã·ã¥ã«æ ŒçŽãããŠããå¿
èŠããããŸããã <code>no-store</code> ã¯ãããææ¢ããããã§ãã</dd> +</dl> + +<h3 id="Expiration" name="Expiration">æå¹æé</h3> + +<dl> + <dt><code>max-age=<seconds></code></dt> + <dd>ãªãœãŒã¹ãæ°ãããšã¿ãªãããæé·ã®æéã§ãã <code>Expires</code> ãšã¯ç°ãªãããã®ãã£ã¬ã¯ãã£ãã¯ãªã¯ãšã¹ãæå»ããã®çžå¯Ÿæéã§ãã</dd> + <dt><code>s-maxage=<seconds></code></dt> + <dd><code>max-age</code> ãŸã㯠<code>Expires</code> ããããŒãäžæžãããŸãããå
±æãã£ãã·ã¥ (ãããã·ãªã©) ã ãã®ããã®ãã®ã§ãããã©ã€ããŒããã£ãã·ã¥ã§ã¯ç¡èŠãããŸãã</dd> + <dt><code>max-stale[=<seconds>]</code></dt> + <dd>ã¯ã©ã€ã¢ã³ããå€ããªã£ãã¬ã¹ãã³ã¹ãåãå
¥ããããšã瀺ããŸãããªãã·ã§ã³ã®å€ã¯ç§åäœã§ãã¯ã©ã€ã¢ã³ããåãå
¥ããå€ãã®äžéã瀺ããŸãã</dd> + <dt><code>min-fresh=<seconds></code></dt> + <dd>ã¯ã©ã€ã¢ã³ããã<em>å°ãªããšã</em>æå®ãããç§æ°ã®éã¯æ°ãããŸãŸã®ã¬ã¹ãã³ã¹ãèŠæ±ããŠããããšã瀺ããŸãã</dd> + <dt><code>stale-while-revalidate=<seconds></code> {{Experimental_Inline}}</dt> + <dd>ã¯ã©ã€ã¢ã³ããå€ãã¬ã¹ãã³ã¹ãåãå
¥ããæ°ããã¬ã¹ãã³ã¹ãããã¯ã°ã©ãŠã³ãã§éåæã«ãã§ãã¯ããããšã瀺ããŸãã <em>seconds</em> ã®å€ã¯ãã¯ã©ã€ã¢ã³ããå€ãã¬ã¹ãã³ã¹ãåãå
¥ããæéã瀺ããŸãã詳现ã«ã€ããŠã¯ãã<a href="https://web.dev/stale-while-revalidate">Keeping things fresh with <code>stale-while-revalidate</code></a>ããåç
§ããŠãã ããã</dd> + <dt><code>stale-if-error=<seconds></code> {{Experimental_Inline}}</dt> + <dd>æ°ããã¬ã¹ãã³ã¹ã®ãã§ãã¯ã«å€±æããå Žåã«ãã¯ã©ã€ã¢ã³ããå€ãã¬ã¹ãã³ã¹ãåãå
¥ããããšã瀺ããŸãã <em>seconds</em> ã®å€ã¯ãåœåã®æå¹æéãåããåŸã«ãã¯ã©ã€ã¢ã³ããå€ãã¬ã¹ãã³ã¹ãåãå
¥ããæéã瀺ããŸãã</dd> +</dl> + +<h3 id="Revalidation_and_reloading" name="Revalidation_and_reloading">åæ€èšŒãšåèªã¿èŸŒã¿</h3> + +<dl> + <dt><code>must-revalidate</code></dt> + <dd>äžåºŠãªãœãŒã¹ãå€ããªããšããã£ãã·ã¥ã¯å
ã®ãµãŒããŒã§ã®<a href="/ja/docs/Web/HTTP/Caching#Cache_validation">æ€èšŒ</a>ãæåããªãéããå€ããªã£ãã³ããŒã䜿çšããŠã¯ãªããªãããšã瀺ããŸãã</dd> + <dt><code>proxy-revalidate</code></dt> + <dd><code>must-revalidate</code> ãšäŒŒãŠããŸãããå
±æãã£ãã·ã¥ (ãããã·ãªã©) ã«ã®ã¿é©çšãããŸãããã©ã€ããŒããã£ãã·ã¥ã§ã¯ç¡èŠãããŸãã</dd> + <dt><code>immutable</code></dt> + <dd>æéãçµã£ãŠãã¬ã¹ãã³ã¹ã®æ¬æã<strong>å€åããªã</strong>ããšã瀺ããŸãããªãœãŒã¹ã¯ã<em>æéåãã§ãªãéã</em>ããµãŒããŒäžã§å€åããŠããªããããã¯ã©ã€ã¢ã³ãã¯ãããšããŠãŒã¶ãŒãæ瀺çã«ããŒãžãæŽæ°ããå Žåã§ããæŽæ°ããã§ãã¯ããããã«æ¡ä»¶ä»ãã®åæ€èšŒ (<code>If-None-Match</code> ã <code>If-Modified-Since</code> ãªã©) ãéã£ãŠã¯ãããŸããããã®æ¡åŒµæ©èœãå®è£
ããŠããªãã¯ã©ã€ã¢ã³ãã¯ã HTTP ã®ä»æ§ã«åŸã£ãŠãããã®æ¡åŒµæ©èœãç¡èŠããªããã°ãªããŸããã Firefox ã§ã¯ã <code>immutable</code> 㯠<code>https://</code> ãã©ã³ã¶ã¯ã·ã§ã³ã§ã®ã¿æå¹ã§ãã詳ããã¯ããã¡ãã®<a href="https://bitsup.blogspot.de/2016/05/cache-control-immutable.html">ããã°èšäº</a>ãåç
§ããŠãã ããã</dd> +</dl> + +<h3 id="Other" name="Other">ãã®ä»</h3> + +<dl> + <dt><code>no-transform</code></dt> + <dd>äžéãã£ãã·ã¥ããããã·ããã¬ã¹ãã³ã¹ã®æ¬æã {{HTTPHeader("Content-Encoding")}}, {{HTTPHeader("Content-Range")}}, {{HTTPHeader("Content-Type")}} ãå€æŽããŠã¯ãããŸããããããã£ãŠã <a href="https://support.google.com/webmasters/answer/6211428">Googleâs Web Light</a> ã®ãããªãããã·ããã©ãŠã¶ãŒã®æ©èœã䜿çšããŠããã£ãã·ã¥ã®æ ŒçŽãé
ãã³ãã¯ã·ã§ã³ã«ãããŠããŒã¿ãæå°åããããã«ç»åãå€æããŠã¯ãããŸããã</dd> + <dt><code>only-if-cached</code></dt> + <dd><em>ã¯ã©ã€ã¢ã³ã</em>ã«ãã£ãŠèšå®ãããã¬ã¹ãã³ã¹ã®ããã«ããããã¯ãŒã¯ã䜿çšããªããããšã瀺ããŸãããã£ãã·ã¥ã¯ãä¿åãããã¬ã¹ãã³ã¹ã䜿çšããŠå¿çãããã {{HTTPStatus("504")}} ã¹ããŒã¿ã¹ã³ãŒãã§å¿çããå¿
èŠããããŸãã <code>If-None-Match</code> ãªã©ã®æ¡ä»¶ä»ãããããŒã¯èšå®ãã¹ãã§ã¯ãããŸããããµãŒããŒãã¬ã¹ãã³ã¹ã®äžéšãšã㊠<code>only-if-cached</code> ãèšå®ããŠãå¹æã¯ãããŸããã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Preventing_caching" name="Preventing_caching">ãã£ãã·ã¥ã®é²æ¢</h3> + +<p>ãªãœãŒã¹ã®ãã£ãã·ã¥ãç¡å¹ã«ããã«ã¯ã以äžã®ã¬ã¹ãã³ã¹ããããŒãéãããšãã§ããŸãã</p> + +<dl> + <dt>è¯ãäŸ:</dt> + <dd> + <pre class="example-good brush: http no-line-numbers notranslate">Cache-Control: no-store</pre> + + <div class="blockIndicator note"> + <p> <code>no-store</code> ãã£ã¬ã¯ãã£ãã¯ãæ°ãããªãœãŒã¹ããã£ãã·ã¥ãããããšãé²ããŸãããéå»ã®ãªã¯ãšã¹ãã®çµæãšããŠãã£ãã·ã¥æžã¿ã®å€ããªãœãŒã¹ãå¿çããã®ãé²ãããšã¯ã§ããŸããã <code>max-age=0</code> ãèšå®ãããšããã£ãã·ã¥ã匷å¶çã«åæ€èšŒãããŸãïŒãã£ãã·ã¥ãã¯ãªã¢ãããŸãïŒã</p> + + <pre class="syntaxbox notranslate">Cache-Control: no-store, max-age=0 +</pre> + </div> + </dd> + <dt>æªãäŸ:</dt> + <dd> + <pre class="example-bad brush: http no-line-numbers notranslate">Cache-Control: private,no-cache,no-store,max-age=0,must-revalidate,pre-check=0,post-check=0</pre> + </dd> +</dl> + +<h3 id="Caching_static_assets" name="Caching_static_assets">éçãªè³ç£ã®ãã£ãã·ã¥</h3> + +<p>å€æŽãããªãã¢ããªã±ãŒã·ã§ã³å
ã®ãã¡ã€ã«ã«ã€ããŠã¯ãéåžžã以äžã®ã¬ã¹ãã³ã¹ããããŒãéä¿¡ããããšã§ç©æ¥µçã«ãã£ãã·ã¥ãè¡ãããšãã§ããŸããããã«ã¯ãäŸãã°ç»åã CSS ãã¡ã€ã«ã JavaScript ãã¡ã€ã«ãªã©ãã¢ããªã±ãŒã·ã§ã³ã«ãã£ãŠæäŸãããéçãªãã¡ã€ã«ãå«ãŸããŸããå ããŠã {{HTTPHeader("Expires")}} ããããŒãåç
§ããŠãã ããã</p> + +<pre class="brush: http no-line-numbers notranslate">Cache-Control: public, max-age=604800, immutable +</pre> + +<h3 id="Requiring_revalidation" name="Requiring_revalidation">åæ€èšŒã®èŠæ±</h3> + +<p><code>no-cache</code> ãŸã㯠<code>max-age=0</code> ãæå®ãããšãã¯ã©ã€ã¢ã³ãã¯ãªãœãŒã¹ããã£ãã·ã¥ããããšãã§ããããã䜿çšããåã«æ¯ååæ€èšŒãããªããã°ãªããªãããšã瀺ããŸããããã¯ã HTTP ãªã¯ãšã¹ããæ¯åçºçããããšãæå³ããŸãããã³ã³ãã³ããæå¹ã§ããã°ã HTTP æ¬æã®ããŠã³ããŒããé£ã°ãããšãã§ããŸãã</p> + +<pre class="brush: http no-line-numbers notranslate">Cache-Control: no-cache +Cache-Control: no-cache, max-age=0 +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC(8246, "HTTP Immutable Responses")}}</td> + <td><span class="spec-RFC">IETF RFC</span></td> + <td></td> + </tr> + <tr> + <td>{{RFC(7234, "Hypertext Transfer Protocol (HTTP/1.1): Caching")}}</td> + <td><span class="spec-RFC">IETF RFC</span></td> + <td></td> + </tr> + <tr> + <td>{{RFC(5861, "HTTP Cache-Control Extensions for Stale Content")}}</td> + <td><span class="spec-RFC">IETF RFC</span></td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Cache-Control")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Caching_FAQ">HTTP ãã£ãã·ã¥ FAQ</a></li> + <li><a href="https://www.mnot.net/cache_docs/">Caching Tutorial for Web Authors and Webmasters</a></li> + <li>Guide: <em><a href="https://csswizardry.com/2019/03/cache-control-for-civilians"><code>Cache-Control</code> for civilians</a></em></li> + <li>{{HTTPHeader("Age")}}</li> + <li>{{HTTPHeader("Expires")}}</li> + <li>{{HTTPHeader("Pragma")}}</li> +</ul> diff --git a/files/ja/web/http/headers/clear-site-data/index.html b/files/ja/web/http/headers/clear-site-data/index.html new file mode 100644 index 0000000000..9357426f38 --- /dev/null +++ b/files/ja/web/http/headers/clear-site-data/index.html @@ -0,0 +1,117 @@ +--- +title: Clear-Site-Data +slug: Web/HTTP/Headers/Clear-Site-Data +tags: + - HTTP + - HTTP Header + - HTTP ããã㌠+ - Reference + - Response Header + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Clear-Site-Data +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>Clear-Site-Data</code></strong> ããããŒã¯ããªã¯ãšã¹ãããŠãããŠã§ããµã€ãã«é¢é£ä»ããããé²èŠ§çšããŒã¿ (ã¯ãããŒãã¹ãã¬ãŒãžããã£ãã·ã¥) ãæ¶å»ããŸãããŠã§ãéçºè
ããã®ãªãªãžã³ã®ããã«ãã©ãŠã¶ãŒãããŒã«ã«ã«ä¿åããããŒã¿ãããå¶åŸ¡ã§ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>Clear-Site-Data</code> ããããŒã¯ã1ã€ãŸãã¯è€æ°ã®ãã£ã¬ã¯ãã£ããåãä»ããŸãããã¹ãŠã®çš®é¡ã®ããŒã¿ãæ¶å»ããå Žåã¯ãã¯ã€ã«ãã«ãŒãã®ãã£ã¬ã¯ãã£ã (<code>"*"</code>) ã䜿çšããããšãã§ããŸãã</p> + +<pre class="notranslate">// åäžã®ãã£ã¬ã¯ãã£ã +Clear-Site-Data: "cache" + +// è€æ°ã®ãã£ã¬ã¯ãã£ã (ã«ã³ãåºåã) +Clear-Site-Data: "cache", "cookies" + +// ã¯ã€ã«ãã«ãŒã +Clear-Site-Data: "*" +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<p class="note">ãã¹ãŠã®ãã£ã¬ã¯ãã£ãã¯<a href="https://tools.ietf.org/html/rfc7230#section-3.2.6">åŒçšç¬Šã§å²ãŸããæååã®ææ³r</a>ã«åŸããªããã°ãªããŸãããäºéåŒçšç¬Šãå«ãŸãªããã£ã¬ã¯ãã£ãã¯ç¡å¹ã§ãã</p> + +<dl> + <dt id="cache"><code>"cache"</code></dt> + <dd>ãµãŒããŒããã¬ã¹ãã³ã¹ URL ã®ãªãªãžã³ã«é¢ããããŒã«ã«ã«ãã£ãã·ã¥ãããããŒã¿ (ã€ãŸãããã©ãŠã¶ãŒãã£ãã·ã¥ã<a href="/ja/docs/Web/HTTP/Caching">HTTP ãã£ãã·ã¥</a>ãåç
§) ã®æ¶å»ãæãã§ããããšã瀺ããŸãããã©ãŠã¶ãŒã«ãã£ãŠã¯ãäºåã¬ã³ããªã³ã°ããŒãžãã¹ã¯ãªãããã£ãã·ã¥ã WebGL ã·ã§ãŒããŒãã£ãã·ã¥ãã¢ãã¬ã¹ããŒã®ãµãžã§ã¹ãçã®ãããªãã®ãæ¶å»ããŸãã</dd> + <dt id="cookies"><code>"cookies"</code></dt> + <dd>ãµãŒããŒããã¬ã¹ãã³ã¹ URL ã®ãªãªãžã³ã«é¢ãããã¹ãŠã®ã¯ãããŒã®æ¶å»ãæãã§ããããšã瀺ããŸããããã¯ç»é²ããããã¡ã€ã³ã«ãµããã¡ã€ã³ãå«ã圱é¿ããŸããã§ãããã https://example.com ãšåæ§ã« https://stage.example.com ã®ã¯ãããŒãæ¶å»ãããŸãã</dd> + <dt id="storage"><code>"storage"</code></dt> + <dd>ãµãŒããŒããã¬ã¹ãã³ã¹ URL ã®ãªãªãžã³ã«é¢ãããã¹ãŠã® DOM ã¹ãã¬ãŒãžã®æ¶å»ãæãã§ããããšã瀺ããŸããããã¯ä»¥äžã®ãããªã¹ãã¬ãŒãžæ©æ§ãå«ã¿ãŸãã + <ul> + <li>localStorage (<code>localStorage.clear</code> ãå®è¡)</li> + <li>sessionStorage (<code>sessionStorage.clear</code> ãå®è¡)</li> + <li>IndexedDB (ããããã®ããŒã¿ããŒã¹ã« {{domxref("IDBFactory.deleteDatabase")}} ãå®è¡)</li> + <li>ãµãŒãã¹ã¯ãŒã«ãŒã®ç»é² (ç»é²ãããããããã®ãµãŒãã¹ã¯ãŒã«ãŒã«å¯ŸããŠã {{domxref("ServiceWorkerRegistration.unregister")}} ãå®è¡)</li> + <li><a href="/ja/docs/Web/HTML/Using_the_application_cache">AppCache</a></li> + <li>WebSQL ããŒã¿ããŒã¹</li> + <li><a href="/ja/docs/Web/API/File_and_Directory_Entries_API">FileSystem API ã®ããŒã¿</a></li> + <li>ãã©ã°ã€ã³ã®ããŒã¿ (<code><a href="https://wiki.mozilla.org/NPAPI:ClearSiteData">NPP_ClearSiteData</a></code> ã«ãã£ãŠæ¶å»)</li> + </ul> + </dd> + <dt id="executionContexts"><code>"executionContexts"</code></dt> + <dd>ãµãŒããŒããã¬ã¹ãã³ã¹ã®ãªãªãžã³ã«é¢ãããã¹ãŠã®é²èŠ§ã³ã³ããã¹ãã®åèªã¿èŸŒã¿ãæãã§ããããšã瀺ããŸãã ({{domxref("Location.reload")}})</dd> + <dt><code>"*"</code> (ã¯ã€ã«ãã«ãŒã)</dt> + <dd>ãµãŒããŒããã¬ã¹ãã³ã¹ã®ãªãªãžã³ã«é¢ãããã¹ãŠã®çš®é¡ã®ããŒã¿ã®æ¶å»ãæãã§ããããšã瀺ããŸãããã®ããããŒã®å°æ¥ã®ããŒãžã§ã³ã§ããŒã¿ã®çš®é¡ãè¿œå ãããå Žåããããæ¶å»ããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Sign_out_of_web_site" name="Sign_out_of_web_site">ãŠã§ããµã€ãã®ãã°ã¢ãŠã</h3> + +<p>ãŠãŒã¶ãŒããŠã§ããµã€ãããµãŒãã¹ãããã°ã¢ãŠãããå ŽåãããŒã«ã«ã«ä¿åãããŠããããŒã¿ãåé€ãããå ŽåããããŸãããµã€ãããã®ãã°ã¢ãŠããæ£åžžã«å®äºããããšã確èªããããŒãž (https://example.com/logout ãªã©)ãéä¿¡ããéã« <code>Clear-Site-Data</code> ããããŒãè¿œå ããããšã§ããããå®çŸããããšãã§ããŸãã</p> + +<pre class="notranslate">Clear-Site-Data: "cache", "cookies", "storage", "executionContexts"</pre> + +<h3 id="Clearing_cookies" name="Clearing_cookies">ã¯ãããŒã®æ¶å»</h3> + +<p>以äžã®ããããŒã https://example.com/clear-cookies ã®ã¬ã¹ãã³ã¹ã§é
ä¿¡ãããå Žåãåããã¡ã€ã³ https://example.com åã³ãããããµããã¡ã€ã³ (https://stage.example.com ãªã©) ãæ¶å»ãããŸãã</p> + +<pre class="notranslate">Clear-Site-Data: "cookies"</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td><a href="https://w3c.github.io/webappsec-clear-site-data">Clear Site Data</a></td> + <td>Working Draft</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Clear-Site-Data")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Cache-Control")}}</li> +</ul> diff --git a/files/ja/web/http/headers/connection/index.html b/files/ja/web/http/headers/connection/index.html new file mode 100644 index 0000000000..de5d3b5f91 --- /dev/null +++ b/files/ja/web/http/headers/connection/index.html @@ -0,0 +1,53 @@ +--- +title: Connection +slug: Web/HTTP/Headers/Connection +tags: + - Connection + - HTTP + - Reference + - Web + - ããã㌠+ - äžè¬ããã㌠+translation_of: Web/HTTP/Headers/Connection +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Connection</code></strong> äžè¬ããããŒã¯ãçŸåšã®ãã©ã³ã¶ã¯ã·ã§ã³ãå®äºããããšãããããã¯ãŒã¯æ¥ç¶ãéãããŸãŸã«ãããã©ãããå¶åŸ¡ããŸããããéä¿¡ãããå€ã <code>keep-alive</code> ã§ãã£ãå Žåã¯ãæ¥ç¶ãç¶æãããŠéããããªããªããåäžã®ãµãŒããŒã«éãã¹ãåŸç¶ã®ãªã¯ãšã¹ãã§åå©çšãããŸãã</p> + +<div class="note"><a href="https://tools.ietf.org/html/rfc7540#section-8.1.2.2"><code>Connection</code> ãªã©ã®æ¥ç¶åºæã®ããããŒãã£ãŒã«ã㯠HTTP/2 ã§äœ¿çšããªãã§ãã ããã</a></div> + +<p>æšæºã®ããããã€ãããããã㌠({{HTTPHeader("Keep-Alive")}}, {{HTTPHeader("Transfer-Encoding")}}, {{HTTPHeader("TE")}}, {{HTTPHeader("Connection")}}, {{HTTPHeader("Trailer")}}, {{HTTPHeader("Upgrade")}}, {{HTTPHeader("Proxy-Authorization")}}, {{HTTPHeader("Proxy-Authenticate")}}) ã«å¯ŸããŠã¯å¥ã®çšéã§ãã®ããããŒãå©çšãããŸãããã® <code>Connection</code> ããããŒã«ã¯ã«ã³ãåºåãã§ããããã®ããããã€ãããããããŒã®ååãèšå®ãããŸãããã®ããããŒã«åæãããããããŒã¯æåã®ãããã·ãŒã§æ¶è²»ãããã¹ããã®ããšããæ瀺ã«ãªããåŸç¶ã®ãµãŒããŒã«ã¯è»¢éãããªããªããŸããæšæºã®ããããã€ãããããããŒã®ååãã«ã³ãåºåãã®ãªã¹ãã«å
¥ããããšãã§ããŸã (ã»ãšãã©ã®å Žåã§ã¯ {{HTTPHeader("Keep-Alive")}} ãèšå®ãããŸãããããã¯å¿
é ã§ã¯ãããŸãã)ã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("General header", "äžè¬ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Connection: keep-alive +Connection: close +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>close</code></dt> + <dd>ã¯ã©ã€ã¢ã³ããããã¯ãµãŒããŒãæ¥ç¶ãéãããææãè¡šæããŸãããã㯠HTTP/1.0 ãªã¯ãšã¹ãã®æ¢å®ã®åäœã§ãã</dd> + <dt>ã«ã³ãåºåãã® HTTP ããããŒã®ãªã¹ã [é垞㯠<code>keep-alive</code> ã®ã¿]</dt> + <dd>ã¯ã©ã€ã¢ã³ãåŽãæ¥ç¶ãç¶æãããææãããããšãè¡šæããŸããæ¥ç¶ã®ç¶æ㯠HTTP/1.1 ã®ããã©ã«ãã®åäœã§ããããããŒåã®ãªã¹ãã¯ãæ¥ç¶ã®éã«æãŸããæåã®éééãããã·ãŒããã£ãã·ã¥ãåé€ãã¹ãããããŒåã§ãããããã®ããããŒã¯æçµçãªå®å
ããŒãã§ã¯ãªããéä¿¡è
ãšæåã®ãšã³ãã£ãã£éã®æ¥ç¶ã®å®çŸ©ã«å©çšããŸãã</dd> +</dl> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Connection")}}</p> diff --git a/files/ja/web/http/headers/content-disposition/index.html b/files/ja/web/http/headers/content-disposition/index.html new file mode 100644 index 0000000000..188bba560a --- /dev/null +++ b/files/ja/web/http/headers/content-disposition/index.html @@ -0,0 +1,136 @@ +--- +title: Content-Disposition +slug: Web/HTTP/Headers/Content-Disposition +tags: + - HTTP + - Reference + - header +translation_of: Web/HTTP/Headers/Content-Disposition +--- +<div>{{HTTPSidebar}}</div> + +<p>éåžžã® HTTP ã¬ã¹ãã³ã¹ã«ããã <code><strong>Content-Disposition</strong></code> ã¬ã¹ãã³ã¹ããããŒã¯ãã³ã³ãã³ãããã©ãŠã¶ãŒã§<em>ã€ã³ã©ã€ã³</em>ã§è¡šç€ºãããããšãæ±ããããŠããããã€ãŸãããŠã§ãããŒãžãšããŠè¡šç€ºãããããŠã§ãããŒãžã®äžéšãšããŠè¡šç€ºããããããŠã³ããŒãããŠããŒã«ã«ã«ä¿åãã<em>æ·»ä»ãã¡ã€ã«</em>ãšãããã瀺ããŸãã</p> + +<p>æ¬æã <code>multipart/form-data</code> ã§ããå Žåã <strong><code>Content-Disposition</code></strong> ããããŒã¯ããã«ãããŒããæ§æããåãµãããŒãã«ä»äžããããã®ãã£ãŒã«ãã«é¢ããæ
å ±ã瀺ããŸãããµãããŒãã¯{{HTTPHeader("Content-Type")}} ããããŒã§å®çŸ©ããã <em>boundary</em> ã«ãã£ãŠåºåãããŸãããã«ãããŒãã®æ¬æèªäœã«ä»äžããå Žåã <code>Content-Disposition</code> ã¯äœã®æå³ãæã¡ãŸããã</p> + +<p><code>Content-Disposition</code> ããããŒã¯ã¡ãŒã«ã«ããã MIME ã¡ãã»ãŒãžã®ããåºãçšéã§å®çŸ©ããããã®ã§ããã HTTP ã®ãã©ãŒã ãš {{HTTPMethod("POST")}} ãªã¯ãšã¹ãã«å©çšå¯èœãªåŒæ°ã¯äžéšã ãã§ããããããŒã®å€ã§ãã <code>form-data</code> ãšãçç¥å¯èœãªãã£ã¬ã¯ãã£ã <code>name</code> ãš <code>filename</code> ã®ã¿ã HTTP ã®çšéã§äœ¿çšããããšãã§ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}} (æ¬æã®å Žå)<br> + {{Glossary("General header", "äžè¬ããããŒ")}} (ãã«ãããŒãæ¬æã®äžéšã®å Žå)</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<h3 id="As_a_response_header_for_the_main_body" name="As_a_response_header_for_the_main_body">æ¬æã«é©çšããã¬ã¹ãã³ã¹ããããŒãšããŠ</h3> + +<p>ãã®çšæ³ã§ã¯ã<code>inline</code> (æ¢å®å€ããŠã§ãããŒãžã®äžéšãšããŠããŸãã¯ãŠã§ãããŒãžãšããŠè¡šç€ºå¯èœã§ããããšã瀺ããŸã)ãããã㯠<code>attachment</code> (ããŠã³ããŒããã¹ãã§ããããšã瀺ããŸããå€ãã®ãã©ãŠã¶ãŒã¯ <code>filename</code> åŒæ°ã®å€ã䜿ãããååãä»ããŠä¿åããã€ã¢ãã°ã衚瀺ããŸã) ãæåã®åŒæ°ããŠæå®ããŸãã</p> + +<pre class="syntaxbox notranslate">Content-Disposition: inline +Content-Disposition: attachment +Content-Disposition: attachment; filename="filename.jpg"</pre> + +<h3 id="As_a_header_for_a_multipart_body" name="As_a_header_for_a_multipart_body">ãã«ãããŒãæ¬æã§äœ¿ãããããŒãšããŠ</h3> + +<p>ãã®çšæ³ã§ã¯æåã®åŒæ°ã¯åžžã« <code>form-data</code> ã§ããè¿œå ã®ãã©ã¡ãŒã¿ãŒã¯å€§æåå°æåãåºå¥ããã <code>'='</code> èšå·ã«ç¶ããŠã¯ã©ãŒããããæååã§åŒæ°ãæå®ããŸããè€æ°ã®åŒæ°ã¯ã»ãã³ãã³ (<code>';'</code>) ã§åºåããŸãã</p> + +<pre class="syntaxbox notranslate">Content-Disposition: form-data +Content-Disposition: form-data; name="fieldName" +Content-Disposition: form-data; name="fieldName"; filename="filename.jpg"</pre> + +<h3 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h3> + +<dl> + <dt><code>name</code></dt> + <dd>ãã®ãµãããŒãã®å
容ãåç
§ãããã©ãŒã ã® HTML ãã£ãŒã«ãã®ååãå«ãæååãç¶ããŸããåããã£ãŒã«ãå
ã®è€æ°ã®ãã¡ã€ã«ãæ±ãå Žå (äŸãã°ã <code>{{HTMLElement("input","<input type=\"file\">")}}</code> èŠçŽ ã® {{htmlattrxref("multiple", "input")}} å±æ§)ãåãååãæã€è€æ°ã®ãµãããŒããååšããããšããããŸãã</dd> + <dd><code>name</code> ã®å€ã <code>'_charset_'</code> ãšããå€ã§ããå Žåã¯ããã®éšåã HTML ãã£ãŒã«ãã§ã¯ãªããæ瀺çãªæåã»ããæ
å ±ã®ãªãéšåã«äœ¿çšãããæ¢å®ã®æåã»ããã§ããããšã瀺ããŸãã</dd> + <dt><code>filename</code></dt> + <dd>éä¿¡ãããå
ã®ãã¡ã€ã«åãå«ãæååãæå®ããŸãããã®ãã¡ã€ã«åã¯åžžã«ä»»æã§ãããã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšããéã¯æ³šæãå¿
èŠã§ããäŸãã°ãã¹æ
å ±ãåãé€ãããããµãŒããŒã®ãã¡ã€ã«ã·ã¹ãã ã«åãããŠãã¡ã€ã«åã®å€æãè¡ã£ãããã¹ãã§ãããã®åŒæ°ã¯ãã»ãšãã©ã®æ
å ±ãæäŸããŸãã <code>Content-Disposition: attachment</code> ãšçµã¿åãããŠäœ¿çšãããšããŠãŒã¶ãŒã«è¡šç€ºããããååãä»ããŠä¿åããã€ã¢ãã°ã®æ¢å®ã®ãã¡ã€ã«åãšããŠäœ¿çšãããŸãã</dd> + <dt><code>filename*</code></dt> + <dd> + <p>åŒæ°ã® <code>filename</code> ãš <code>filename*</code> ã®éãã¯ã <code>filename*</code> ã <a href="https://tools.ietf.org/html/rfc5987">RFC 5987</a> ã§å®çŸ©ãããŠãããšã³ã³ãŒãã£ã³ã°ã䜿çšãããšããç¹ã®ã¿ã§ããåäžã®ããããŒãã£ãŒã«ãã®å€ã« <code>filename</code> ãš <code>filename*</code> ã®äž¡æ¹ãååšããå Žåã¯ãäž¡æ¹ã解éã§ããå Žåã <code>filename*</code> ã <code>filename</code> ãããåªå
ãããŸãã</p> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>ããã¡ã€ã«åãä»ããŠä¿åããã€ã¢ãã°ãèµ·åããã¬ã¹ãã³ã¹ã§ãã</p> + +<pre class="notranslate">200 OK +Content-Type: text/html; charset=utf-8 +Content-Disposition: attachment; filename="cool.html" +Content-Length: 21 + +<HTML>Save me!</HTML> + +</pre> + +<p>ãã®ãµã³ãã« HTML ãã¡ã€ã«ã¯ããã©ãŠã¶ãŒã«è¡šç€ºãããã®ã§ã¯ãªããéåžžã®ããŠã³ããŒããšããŠä¿åãããŸããã»ãšãã©ã®ãã©ãŠã¶ãŒã¯ã (æ¢å®ã§) <code>cool.html</code> ãšãããã¡ã€ã«åã§ä¿åããããšãææ¡ããŸãã</p> + +<p><code>multipart/form-data</code> 圢åŒã䜿çšããŠéä¿¡ããã HTML ãã©ãŒã ã®äŸã§ã <code>Content-Disposition</code> ããããŒã䜿çšãããã®ã§ãã</p> + +<pre class="notranslate">POST /test.html HTTP/1.1 +Host: example.org +Content-Type: multipart/form-data;boundary="boundary" + +--boundary +Content-Disposition: form-data; name="field1" + +value1 +--boundary +Content-Disposition: form-data; name="field2"; filename="example.txt" + +value2 +--boundary--</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + <tr> + <td>{{RFC("7578")}}</td> + <td>Returning Values from Forms: multipart/form-data</td> + </tr> + <tr> + <td>{{RFC("6266")}}</td> + <td>Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)</td> + </tr> + <tr> + <td>{{RFC("2183")}}</td> + <td>Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Content-Disposition")}}</p> + +<h2 id="Compatibility_notes" name="Compatibility_notes">äºææ§ã®æ³šæ</h2> + +<ul> + <li>Firefox 5 ã¯ã <code>Content-Disposition</code> ã¬ã¹ãã³ã¹ããããŒã§ <code>filename</code> ãš <code>filename*</code> ã®äž¡åŒæ°ãæäŸãããŠããå Žåãããå¹æçã«åŠçããŸãã <code>filename</code> åŒæ°ãå
ã«ãã£ãå Žåã§ããæäŸããããã¹ãŠã®ååã調ã¹ãå©çšå¯èœãªå Žå㯠<code>filename*</code> åŒæ°ã䜿çšããŸãã以åã¯ãå
ã«äžèŽããåŒæ°ãããé©åãªååã䜿ãããŠããŸããã§ããã {{bug(588781)}} ãåç
§ããŠãã ããã</li> +</ul> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/Guide/HTML/Forms">HTML Forms</a></li> + <li>{{HTTPHeader("Content-Type")}}: ãã«ãããŒãæ¬æã®å¢çãå®çŸ©</li> + <li>{{domxref("FormData")}} ã€ã³ã¿ãŒãã§ã€ã¹: {{domxref("XMLHttpRequest")}} API ã§ãã©ãŒã ããŒã¿ãæäœããããã«äœ¿çš</li> +</ul> diff --git a/files/ja/web/http/headers/content-encoding/index.html b/files/ja/web/http/headers/content-encoding/index.html new file mode 100644 index 0000000000..572f8c437e --- /dev/null +++ b/files/ja/web/http/headers/content-encoding/index.html @@ -0,0 +1,110 @@ +--- +title: Content-Encoding +slug: Web/HTTP/Headers/Content-Encoding +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - ãšã³ãã£ãã£ããã㌠+ - ããã㌠+ - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Content-Encoding +--- +<div>{{HTTPSidebar}}</div> + +<p> <strong><code>Content-Encoding</code></strong> ãšã³ãã£ãã£ããããŒã¯ãå§çž®ã®ã¡ãã£ã¢çš®å¥ã«äœ¿çšããŸããååšããå Žåãå€ã¯ãšã³ãã£ãã£æ¬äœã«ã©ã®ãšã³ã³ãŒãã£ã³ã°ãé©çšãããŠãããã瀺ããŸããããã¯ã¯ã©ã€ã¢ã³ãã«ã <code>Content-Type</code> ããããŒã§åç
§ãããã¡ãã£ã¢çš®å¥ãåŸãããã«ãã³ãŒãããæ¹æ³ãç¥ãããŸãã</p> + +<p>å¯èœãªéãããŒã¿ãå§çž®ããŠãã®ãã£ãŒã«ãã䜿çšããããšãæšå¥šããŸããã JPEG ç»åãªã©ã®äžéšã®ãªãœãŒã¹ã¯ããã§ã«å§çž®ãããŠããŸããæã«ã¯ãããã«å§çž®ãããŠãé·ããççž®ãããªãã©ããããããã£ãŠé·ããªãããšããããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Entity header", "ãšã³ãã£ãã£ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Content-Encoding: gzip +Content-Encoding: compress +Content-Encoding: deflate +Content-Encoding: identity +Content-Encoding: br + +// è€æ°ã®å Žåãé©çšãããé åº +Content-Encoding: gzip, identity +Content-Encoding: deflate, gzip +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>gzip</code></dt> + <dd><a class="external" href="http://en.wikipedia.org/wiki/LZ77_and_LZ78#LZ77">Lempel-Ziv coding</a> (LZ77) ã䜿çšãã32ãããã® CRC ãä»ãã圢åŒã§ãããã㯠UNIX ã® <em>gzip</em> ããã°ã©ã ã®ç¬èªåœ¢åŒã§ãã HTTP/1.1 æšæºã¯ããã® Content-Encoding ã«å¯Ÿå¿ãããµãŒããŒã¯ãäºææ§ã®é¢ãã <code>x-gzip</code> ããšã€ãªã¢ã¹ãšããŠè§£éããããæšå¥šããŠããŸãã</dd> + <dt><code>compress</code></dt> + <dd><a class="external" href="http://en.wikipedia.org/wiki/LZW">Lempel-Ziv-Welch</a> (LZW) ã¢ã«ãŽãªãºã ã䜿çšãã圢åŒã§ãããã®å€ã®ååã¯ããã®ã¢ã«ãŽãªãºã ãå®è£
ããŠãã UNIX ã® <em>compress</em> ããã°ã©ã ããåãããŸãããç¹èš±åé¡ (2003幎ã«æéåã) ãäžå ãšããŠã compress ããã°ã©ã ãå€ãã® UNIX ãã£ã¹ããªãã¥ãŒã·ã§ã³ããåé€ãããã®ãšåæ§ã«ããã® Content-Encoding ã¯çŸåšã§ã¯å€ãã®ãã©ãŠã¶ãŒããåé€ãããŠããŸãã</dd> + <dt><code>deflate</code></dt> + <dd><a class="external" href="http://en.wikipedia.org/wiki/Zlib">zlib</a> æ§é (<a class="external" href="http://tools.ietf.org/html/rfc1950">RFC 1950</a> ã§å®çŸ©) ã® <a class="external" href="http://en.wikipedia.org/wiki/DEFLATE"><em>deflate</em></a> å§çž®ã¢ã«ãŽãªãºã (<a class="external" href="http://tools.ietf.org/html/rfc1952">RFC 1951</a> ã§å®çŸ©) ã䜿çšããŸãã</dd> + <dt><code>identity</code></dt> + <dd>ç䟡é¢æ° (ã€ãŸããå§çž®ãå€æŽããªã) ã瀺ããŸãããã®ããŒã¯ã³ã¯ãæ瀺çã«æå®ãããå Žåãé€ããåžžã«åãå
¥ããããŸãã</dd> + <dt><code>br</code></dt> + <dd> <a href="https://en.wikipedia.org/wiki/Brotli">Brotli</a> ã¢ã«ãŽãªãºã ã䜿çšãã圢åŒã§ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Compressing_with_gzip" name="Compressing_with_gzip">gzip ã§ã®å§çž®</h3> + +<p>ã¯ã©ã€ã¢ã³ãåŽã§ã¯ãéä¿¡ã§äœ¿çšããŠã»ããå§çž®æ¹åŒã®ãªã¹ãã HTTP èŠæ±ã§ç€ºãããšãã§ããŸãã {{HTTPHeader("Accept-Encoding")}} ããããŒã䜿çšããŠãã³ã³ãã³ãã®ãšã³ã³ãŒãæ¹åŒã®äº€æžãè¡ãããŸãã</p> + +<pre>Accept-Encoding: gzip, deflate</pre> + +<p>ãµãŒããŒã¯å¿çã«äœ¿çšãããšã³ã³ãŒãæ¹åŒãã <code>Content-Encoding</code> ã¬ã¹ãã³ã¹ããããŒã§ç€ºããŸãã</p> + +<pre>Content-Encoding: gzip</pre> + +<p>ãªãããµãŒããŒã¯ã©ã®å§çž®æ¹åŒã䜿çšããããšã矩åã¥ããããŠããŸãããå§çž®ã¯ãµãŒããŒèšå®ã䜿çšããŠãããµãŒããŒãžã¥ãŒã«ã«åŒ·ãäŸåããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7932", "Brotli Compressed Data Format")}}</td> + <td>Brotli å§çž®ããŒã¿åœ¢åŒ</td> + </tr> + <tr> + <td>{{RFC("7231", "Content-Encoding", "3.1.2.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + <tr> + <td>{{RFC("2616", "Content-Encoding", "14.11")}}</td> + <td>Content-Encoding</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Content-Encoding")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Accept-Encoding")}}</li> + <li>{{HTTPHeader("Transfer-Encoding")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-language/index.html b/files/ja/web/http/headers/content-language/index.html new file mode 100644 index 0000000000..ae91ab8c9d --- /dev/null +++ b/files/ja/web/http/headers/content-language/index.html @@ -0,0 +1,105 @@ +--- +title: Content-Language +slug: Web/HTTP/Headers/Content-Language +tags: + - HTTP + - Headers + - Reference +translation_of: Web/HTTP/Headers/Content-Language +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>Content-Language</code></strong> 㯠{{Glossary("entity header", "ãšã³ãã£ãã£ããããŒ")}} ã§ããŠãŒã¶ãèªåã®å¥œã¿ã®èšèªã«å¿ããŠåºå¥ã§ããããã«ããªãŒãã£ãšã³ã¹åãã®èšèªãèšè¿°ããããã«äœ¿çšãããŸãã</p> + +<p>ããšãã°ã"<code>Content-Language: de-DE</code>" ãèšå®ãããŠããå Žåããã®ææžã¯ãã€ãèªã®ã¹ããŒã«ãŒã察象ãšããŠãŸã (ãã ããææžããã€ãèªã§èšè¿°ãããŠããããšã瀺ãããã§ã¯ãããŸããã ããšãã°ããã€ãèªã¹ããŒã«ãŒã®ããã®èªåŠã³ãŒã¹ã®äžéšãšããŠã®è±èªãæžãããŠãããããããŸãããææžãèšè¿°ãããŠããèšèªã瀺ãå Žåã¯ã代ããã« <a href="/ja/docs/Web/HTML/Global_attributes/lang"><code>lang</code> å±æ§</a>ã䜿çšããŸã)ã</p> + +<p><code>Content-Language</code> ãæå®ãããŠããªãå Žåãæ¢å®ã§ã¯ã³ã³ãã³ãããã¹ãŠã®èšèªã®ãªãŒãã£ãšã³ã¹ã察象ãšããŠããŸãã<code>Content-Language</code> ããããŒãããã¹ã圢åŒã®ææžãããŸããŸãªçš®é¡ã®ã¡ãã£ã¢ã«é©çšããã ãã§ãªããè€æ°ã®èšèªã¿ã°ã䜿çšããããšãã§ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Entity header", "ãšã³ãã£ãã£ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + <tr> + <th scope="row">{{Glossary("CORS-safelisted response header", "CORS ã»ãŒããªã¹ãã¬ã¹ãã³ã¹ããããŒ")}}</th> + <td>ã¯ã</td> + </tr> + <tr> + <th scope="row">{{Glossary("CORS-safelisted request header", "CORS ã»ãŒããªã¹ããªã¯ãšã¹ãããããŒ")}}</th> + <td>ã¯ããå€ã <code>0-9</code>, <code>A-Z</code>, <code>a-z</code>, 空çœã <code>*,-.;=</code> ã®ã¿ã«éå®ãããšããè¿œå ã®å¶éããããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Content-Language: de-DE +Content-Language: en-US +Content-Language: de-DE, en-CA +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>language-tag</code></dt> + <dd>è€æ°ã®èšèªã¿ã°ã¯ã«ã³ãã§åºåãããŠããŸããåèšèªã¿ã°ã¯ãã€ãã³æå ("<code>-</code>", <code>%x2D</code>) ã§åºåãããã倧æåå°æåãåºå¥ããªã1ã€ä»¥äžã®ãµãã¿ã°ã®ã·ãŒã±ã³ã¹ã§ããã»ãšãã©ã®å Žåãèšèªã¿ã°ã¯é¢é£ããèšèªã®åºããã¡ããªãèå¥ãããã©ã€ããªèšèªãµãã¿ã° (ããšãã°ã"<code>en</code>" = è±èª) ã§æ§æããããªãã·ã§ã³ãšããŠããã®èšèªã®ç¯å²ãçµã蟌ããçããäžé£ã®ãµãã¿ã° ("<code>en-CA</code>" = ã«ããã§äŒéãããè±èªã®çš®é¡) ãç¶ããŸãã</dd> +</dl> + +<div class="note"> +<p><strong>ã¡ã¢:</strong> èšèªã¿ã°ã¯ã䜿çšããã<a href="https://en.wikipedia.org/wiki/Language_code">èšèªã³ãŒã</a>ã® <a href="https://en.wikipedia.org/wiki/ISO_639">ISO 639</a> èŠæ Œ (<a href="https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">ISO 639-1 ã®ã³ãŒããªã¹ã</a>ã§ããããšãå€ã) ã«äŸåããã<a href="https://tools.ietf.org/html/rfc5646">RFC 5646</a> ã§ãã©ãŒããããå®çŸ©ãããŠããŸãã</p> +</div> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Indicating_the_language_a_document_is_written_in" name="Indicating_the_language_a_document_is_written_in">ææžãæžãããŠããèšèªã瀺ã</h3> + +<p>ã°ããŒãã« <code><a href="/ja/docs/Web/HTML/Global_attributes/lang">lang</a></code> å±æ§ã¯ãHTML èŠçŽ å
šäœãŸãã¯ãã®äžéšã®èšèªã瀺ãããã« HTML èŠçŽ ã§äœ¿çšãããŸãã</p> + +<pre class="brush: html notranslate"><html lang="de"></pre> + +<p>ææžã®èšèªãèšè¿°ããããã«ããã®ãã㪠meta èŠçŽ ã以äžã®ããã«äœ¿çš<strong>ããªãã§</strong>ãã ããã</p> + +<pre class="brush: html example-bad notranslate"><!-- /!\ This is bad practice --> +<meta http-equiv="content-language" content="de"></pre> + +<h3 id="Indicating_a_target_audience_for_a_resource" name="Indicating_a_target_audience_for_a_resource">ãªãœãŒã¹ã®ã¿ãŒã²ãããªãŒãã£ãšã³ã¹ã瀺ã</h3> + +<p><code>Content-Language</code> ããããŒã¯ã<strong>ããŒãžã®å¯Ÿè±¡èªè
</strong>ãæå®ããããã«äœ¿çšãããè€æ°ã®èšèªã§ããããšã瀺ãããšãã§ããŸãã</p> + +<pre class="notranslate">Content-Language: de, en</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Content-Language", "3.1.3.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååãããã®ã§ããã°ã <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Content-Language")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Accept-Language")}}</li> + <li><a href="https://www.w3.org/International/questions/qa-http-and-lang.en">HTTP headers, meta elements and language information</a></li> + <li><a href="/ja/docs/Web/HTML/Global_attributes/lang">HTML ã® <code>lang</code> å±ãåŸ</a></li> +</ul> diff --git a/files/ja/web/http/headers/content-length/index.html b/files/ja/web/http/headers/content-length/index.html new file mode 100644 index 0000000000..7966f1b79f --- /dev/null +++ b/files/ja/web/http/headers/content-length/index.html @@ -0,0 +1,68 @@ +--- +title: Content-Length +slug: Web/HTTP/Headers/Content-Length +tags: + - HTTP + - Reference + - ãšã³ãã£ãã£ããã㌠+ - ããã㌠+ - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Content-Length +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Content-Length</code></strong> ãšã³ãã£ãã£ããããŒã¯ãåä¿¡è
ã«éä¿¡ããããšã³ãã£ãã£æ¬æã®é·ãããã€ãåäœã§ç€ºããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Entity header", "ãšã³ãã£ãã£ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Content-Length: <length> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><length></dt> + <dd>ãªã¯ãããåã®é·ãã®10é²æ°è¡šèšã</dd> +</dl> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7230", "Content-Length", "3.3.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Content-Length")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Transfer-Encoding")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-location/index.html b/files/ja/web/http/headers/content-location/index.html new file mode 100644 index 0000000000..32b3c4dd8a --- /dev/null +++ b/files/ja/web/http/headers/content-location/index.html @@ -0,0 +1,162 @@ +--- +title: Content-Location +slug: Web/HTTP/Headers/Content-Location +tags: + - HTTP + - Reference + - ãšã³ãã£ãã£ããã㌠+ - ããã㌠+ - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Content-Location +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Content-Location</code></strong> ããããŒã¯ãè¿ãããããŒã¿ã®ä»£æ¿å Žæã瀺ããŸããäž»ãªçšéã¯<a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a>ã®çµæãšããŠéä¿¡ããããªãœãŒã¹ã® URL ã瀺ãããšã§ãã</p> + +<p>{{HTTPHeader("Location")}} ãš <code>Content-Location</code> ã¯ç°ãªããŸãã<code>Location</code> ã¯ãªãã€ã¬ã¯ãã® URL ã瀺ãã<code>Content-Location</code> ã¯ä»åŸã®ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ãªãã§ãªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ã«äœ¿çšããçŽæ¥ URL ã瀺ããŸãã <code>Location</code> ã¯ã¬ã¹ãã³ã¹ã«é¢é£ä»ããããããããŒã§ã <code>Content-Location</code> ã¯è¿ãããããŒã¿ã«é¢é£ä»ããããŸãããã®åºå¥ã¯<a href="#Examples">äŸ</a>ããªããšæœè±¡çã«èŠãããããããŸããã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Entity header", "ãšã³ãã£ãã£ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Content-Location: <url> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><url></dt> + <dd>(ãªã¯ãšã¹ã URL ã«å¯Ÿãã) <a href="/ja/docs/Learn/Common_questions/What_is_a_URL#Examples_of_relative_URLs">çžå¯Ÿ</a> URL ãŸãã¯<a href="/ja/docs/Learn/Common_questions/What_is_a_URL#Examples_of_absolute_URLs">絶察</a> URLã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Requesting_data_from_a_server_in_different_formats" name="Requesting_data_from_a_server_in_different_formats">ãµãŒããŒããã®ããŒã¿ã®ãªã¯ãšã¹ããæ§ã
ãªåœ¢åŒã§è¡ã</h3> + +<p>ããšãã°ããµã€ãã® API ã {{glossary("JSON")}}, {{glossary("XML")}}, ãŸã㯠<a href="https://en.wikipedia.org/wiki/Comma-separated_values">CSV</a> 圢åŒã§ããŒã¿ãè¿ããšããŸããç¹å®ã®ææžã® URL ã <code>https://example.com/documents/foo</code> ã§ããå Žåããµã€ãã¯ãªã¯ãšã¹ãã® {{HTTPHeader("Accept")}} ããããŒã«å¿ã㊠<code>Content-Location</code> çšã«ç°ãªã URL ãè¿ãããšãã§ããŸãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ãªã¯ãšã¹ãããããŒ</th> + <th scope="col">ã¬ã¹ãã³ã¹ããããŒ</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>Accept: application/json, text/json</code></td> + <td><code>Content-Location: /documents/foo.json</code></td> + </tr> + <tr> + <td><code>Accept: application/xml, text/xml</code></td> + <td><code>Content-Location: /documents/foo.xml</code></td> + </tr> + <tr> + <td><code>Accept: text/plain, text/*</code></td> + <td><code>Content-Location: /documents/foo.txt</code></td> + </tr> + </tbody> +</table> + +<p>ãããã® URL ã¯äŸã§ãããµã€ãã§ã¯ã¯ãšãªæååãã©ã¡ãŒã¿ïŒ<code>/documents/foo?format=json</code>ã<code>/documents/foo?format=xml</code> ãªã©ãä»»æã® URL ãã¿ãŒã³ã§ããŸããŸãªãã¡ã€ã«ã¿ã€ããæäŸã§ããŸãã</p> + +<p>ãã®åŸã¯ã©ã€ã¢ã³ãã¯ãã®ç¹å®ã® URL 㧠JSON ããŒãžã§ã³ãå©çšå¯èœã§ããããšãèŠããŠã次ã«ææžãèŠæ±ãããšãã«ã³ã³ãã³ãã®ããŽã·ãšãŒã·ã§ã³ãã¹ãããããŸãã</p> + +<p>ãµãŒããŒã¯ {{HTTPHeader("Accept-Language")}} ã®ãããªä»ã®<a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a>ããããŒãèæ
®ããããšãã§ããŸãã</p> + +<h3 id="Pointing_to_a_new_document_HTTP_201_Created" name="Pointing_to_a_new_document_HTTP_201_Created">æ°ããææžãæã (HTTP 201 Created)</h3> + +<p>ãµã€ãã® API ãéããŠæ°ããããã°æçš¿ãäœæããŠãããšããŸãã</p> + +<pre>PUT /new/post +Host: example.com +Content-Type: text/markdown + +# My first blog post! + +I made this through `example.com`'s API. I hope it worked. +</pre> + +<p>ãµã€ãã¯æçš¿ãå
¬éãããããšã確èªããäžè¬çãªæåã¡ãã»ãŒãžãè¿ããŸãããµãŒããŒã¯ <code>Content-Location</code> ã䜿çšããŠæ°ããæçš¿ãã©ãã«ããããæå®ããŸãã</p> + +<pre>HTTP/1.1 201 Created +Content-Type: text/plain; charset=utf-8 +Content-Location: /my-first-blog-post + +â
Success! +</pre> + +<h3 id="Indicating_the_URL_of_a_transactions_result" name="Indicating_the_URL_of_a_transactions_result">ãã©ã³ã¶ã¯ã·ã§ã³ã®çµæã® URL ã瀺ã</h3> + +<p>ãµã€ãã®å¥ã®ãŠãŒã¶ãŒã«ééããããã® <code><a href="/ja/docs/Web/HTML/Element/form"><form></a></code> ããããšããŸãã</p> + +<pre class="brush: html"><form action="/send-payment" method="post"> + <p> + <label>Who do you want to send the money to? + <input type="text" name="recipient"> + </label> + </p> + + <p> + <label>How much? + <input type="number" name="amount"> + </label> + </p> + + <button type="submit">Send Money</button> +</form> +</pre> + +<p>ãã©ãŒã ãéä¿¡ããããšããµã€ãã¯ååŒã®é åæžãçæããŸãããµãŒããŒã¯ <code>Content-Location</code> ã䜿çšããŠãå°æ¥ã®ã¢ã¯ã»ã¹ã®ããã«é åæžã® URL ã瀺ãããšãã§ããŸãã</p> + +<pre>HTTP/1.1 200 OK +Content-Type: text/html; charset=utf-8 +Content-Location: /my-receipts/38 + +<!doctype html> +<em>(Lots of HTMLâŠ)</em> + +<p>You sent $38.00 to ExampleUser.</p> + +<em>(Lots more HTMLâŠ)</em> +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Content-Location", "3.1.4.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Content-Location")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Location")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-range/index.html b/files/ja/web/http/headers/content-range/index.html new file mode 100644 index 0000000000..8b0f71bf53 --- /dev/null +++ b/files/ja/web/http/headers/content-range/index.html @@ -0,0 +1,89 @@ +--- +title: Content-Range +slug: Web/HTTP/Headers/Content-Range +tags: + - HTTP + - HTTPããã㌠+ - ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Content-Range +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>Content-Range</code></strong> ã¬ã¹ãã³ã¹ã® HTTP ããããŒã¯ãå
šäœã®ã¡ãã»ãŒãžã®ã©ãã«ã¡ãã»ãŒãžãå«ãŸããŠãããã瀺ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒã¿ã€ã</th> + <td>{{Glossary("Response header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>ããã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Simple response header", "CORS-safelisted response-header")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="æ§æ">æ§æ</h2> + +<pre class="syntaxbox">Content-Range: <unit> <range-start>-<range-end>/<size> +Content-Range: <unit> <range-start>-<range-end>/* +Content-Range: <unit> */<size></pre> + +<h2 id="ãã£ã¬ã¯ãã£ã">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><unit></dt> + <dd>ç¯å²ãæå®ããåäœãããã¯éåžž <code>bytes</code> ã§ãã</dd> +</dl> + +<dl> + <dt><range-start></dt> + <dd>æå®ãããåäœã®æŽæ°ã§ããªã¯ãšã¹ãç¯å²ã®éå§ã瀺ããŸãã</dd> + <dt><range-end></dt> + <dd>ãªã¯ãšã¹ããããç¯å²ã®çµããã瀺ãæå®ãããåäœã®æŽæ°ã</dd> + <dt><size></dt> + <dd>ããã¥ã¡ã³ãã®åèšãµã€ãº (ãŸãã¯æªç¥ã®å Žå㯠<code>'*'</code> )ã</dd> +</dl> + +<h2 id="äŸ">äŸ</h2> + +<pre>Content-Range: bytes 200-1000/67589 +</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7233", "Content-Range", "4.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºææ§">ãã©ãŠã¶ã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Content-Range")}}</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("If-Range")}}</li> + <li>{{HTTPHeader("Range")}}</li> + <li>{{HTTPHeader("Content-Type")}}</li> + <li>{{HTTPStatus("206")}} <code>Partial Content</code></li> + <li>{{HTTPStatus("416")}} <code>Range Not Satisfiable</code></li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy-report-only/index.html b/files/ja/web/http/headers/content-security-policy-report-only/index.html new file mode 100644 index 0000000000..2ca4d78e44 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy-report-only/index.html @@ -0,0 +1,154 @@ +--- +title: Content-Security-Policy-Report-Only +slug: Web/HTTP/Headers/Content-Security-Policy-Report-Only +tags: + - CSP + - HTTP + - HTTPS + - Reference + - Security + - header +translation_of: Web/HTTP/Headers/Content-Security-Policy-Report-Only +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>Content-Security-Policy-Report-Only</code></strong> ã¬ã¹ãã³ã¹ããããŒã«ããããŠã§ãéçºè
ã¯ããªã·ãŒã®å¹æãç£èŠãã (ãã ã匷å¶ã¯ããªã) ããšã«ããããªã·ãŒãè©Šè¡ããããšãã§ããŸãããããã®éåã¬ããŒã㯠{{Glossary("JSON")}} ã®ææžã§æ§æããã HTTP ã® <code>POST</code> ãªã¯ãšã¹ããéããŠæå®ããã URI ã«éä¿¡ãããŸãã</p> + +<p>詳现ã«ã€ããŠã¯ã<a href="/ja/docs/Web/HTTP/CSP">ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒ (CSP)</a> ã®ãã®èšäºãåç
§ããŠãã ããã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + <tr> + <th colspan="2" scope="row">This header is not supported inside a {{HTMLElement("meta")}} element.</th> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Content-Security-Policy-Report-Only: <policy-directive>; <policy-directive> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<p>{{HTTPHeader("Content-Security-Policy")}} ããããŒã®ãã£ã¬ã¯ãã£ã㯠<code>Content-Security-Policy-Report-Only</code> ã«ãé©çšããããšãã§ããŸãã</p> + +<p>CSP ã® {{CSP("report-uri")}} ãã£ã¬ã¯ãã£ãããã®ããããŒã§äœ¿çšããªããšããã®ããããŒã¯è² è·ãé«ãäœãããªãæ©æ¢°ãšãªããŸãã</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>ãã®ããããŒã¯çºçããéåãå ±åããŸããããã䜿çšããŠãã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒãå埩çã«åŠçã§ããŸãããµã€ããã©ã®ããã«åäœããã®ãã芳å¯ããããéåã¬ããŒãã<a href="https://secure.wphackedhelp.com/blog/wordpress-malware-redirect-hack-cleanup/">ãã«ãŠãšã¢ãªãã€ã¬ã¯ã</a>ãç£èŠãããããŠã {{HTTPHeader("Content-Security-Policy")}} ããããŒã§åŒ·å¶ããããšãèŠæ±ãããããªã·ãŒãéžæããŸãã</p> + +<pre class="notranslate">Content-Security-Policy-Report-Only: default-src https:; report-uri /csp-violation-report-endpoint/</pre> + +<p>ã¬ããŒããåä¿¡ãç¶ããªãããããªã·ãŒã®åŒ·å¶ãè¡ãããå Žåã¯ã {{HTTPHeader("Content-Security-Policy")}} ããããŒã« {{CSP("report-uri")}} ãã£ã¬ã¯ãã£ããæå®ããŠäœ¿çšããŠãã ããã</p> + +<pre class="notranslate">Content-Security-Policy: default-src https:; report-uri /csp-violation-report-endpoint/</pre> + +<h2 id="Violation_report_syntax" name="Violation_report_syntax">éåã¬ããŒãã®æ§æ</h2> + +<p>ã¬ããŒã JSON ãªããžã§ã¯ãã«ã¯ã次ã®ããŒã¿ãå«ãŸããŠããŸãã</p> + +<dl> + <dt><code>blocked-uri</code></dt> + <dd>The URI of the resource that was blocked from loading by the Content Security Policy. If the blocked URI is from a different origin than the document-uri, then the blocked URI is truncated to contain just the scheme, host, and port.</dd> + <dt><code>disposition</code></dt> + <dd>Either <code>"enforce"</code> or <code>"report"</code> depending on whether the {{HTTPHeader("Content-Security-Policy")}} header or the <code>Content-Security-Policy-Report-Only</code> header is used.</dd> + <dt><code>document-uri</code></dt> + <dd>The URI of the document in which the violation occurred.</dd> + <dt><code>effective-directive</code></dt> + <dd>The directive whose enforcement caused the violation.</dd> + <dt><code>original-policy</code></dt> + <dd>The original policy as specified by the <code>Content-Security-Policy-Report-Only</code> HTTP header.</dd> + <dt><code>referrer</code></dt> + <dd>The referrer of the document in which the violation occurred.</dd> + <dt><code>script-sample</code></dt> + <dd>The first 40 characters of the inline script, event handler, or style that caused the violation.</dd> + <dt><code>status-code</code></dt> + <dd>The HTTP status code of the resource on which the global object was instantiated.</dd> + <dt><code>violated-directive</code></dt> + <dd>The name of the policy section that was violated.</dd> +</dl> + +<h2 id="Sample_violation_report" name="Sample_violation_report">éåã¬ããŒãã®ãµã³ãã«</h2> + +<div>Let's consider a page located at <code>http://example.com/signup.html</code>. It uses the following policy, disallowing everything but stylesheets from <code>cdn.example.com</code>.</div> + +<div> +<pre class="notranslate">Content-Security-Policy-Report-Only: default-src 'none'; style-src cdn.example.com; report-uri /_/csp-reports</pre> +</div> + +<div>The HTML of <code>signup.html</code> looks like this:</div> + +<pre class="brush: html notranslate"><!DOCTYPE html> +<html> + <head> + <title>Sign Up</title> + <link rel="stylesheet" href="css/style.css"> + </head> + <body> + ... Content ... + </body> +</html></pre> + +<div>Can you spot the violation? Stylesheets are only allowed to be loaded from <code>cdn.example.com</code>, yet the website tries to load one from its own origin (<code>http://example.com</code>). A browser capable of enforcing CSP will send the following violation report as a POST request to <code>http://example.com/_/csp-reports</code>, when the document is visited:</div> + +<pre class="brush: js notranslate">{ + "csp-report": { + "document-uri": "http://example.com/signup.html", + "referrer": "", + "blocked-uri": "http://example.com/css/style.css", + "violated-directive": "style-src cdn.example.com", + "original-policy": "default-src 'none'; style-src cdn.example.com; report-uri /_/csp-reports", + "disposition": "report" + } +}</pre> + +<p>As you can see, the report includes the full path to the violating resource in <code>blocked-uri</code>. This is not always the case. For example, when the <code>signup.html</code> would attempt to load CSS from <code>http://anothercdn.example.com/stylesheet.css</code>, the browser would <em>not</em> include the full path but only the origin (<code>http://anothercdn.example.com</code>). This is done to prevent leaking sensitive information about cross-origin resources.</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>å€æŽãªã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Content-Security-Policy-Report-Only")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>CSP {{CSP("report-uri")}} ãã£ã¬ã¯ãã£ã</li> + <li><a href="/ja/docs/Mozilla/Add-ons/WebExtensions/Content_Security_Policy">WebExtensions ã®ã³ã³ãã³ãã»ãã¥ãªãã£</a></li> + <li><a href="/ja/docs/Tools/GCLI/Display_security_and_privacy_policies">Display security and privacy policies In Firefox Developer Tools</a></li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/base-uri/index.html b/files/ja/web/http/headers/content-security-policy/base-uri/index.html new file mode 100644 index 0000000000..95e5a39ca6 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/base-uri/index.html @@ -0,0 +1,108 @@ +--- +title: 'CSP: base-uri' +slug: Web/HTTP/Headers/Content-Security-Policy/base-uri +tags: + - CSP + - Directive + - Document directive + - HTTP + - Security +translation_of: Web/HTTP/Headers/Content-Security-Policy/base-uri +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP {{HTTPHeader("Content-Security-Policy")}} ã® <strong><code>base-uri</code></strong> ãã£ã¬ã¯ãã£ãã¯ãããã¥ã¡ã³ãã®èŠçŽ {{HTMLElement("base")}} ã§ã䜿çšã§ãã URL ãå¶éããŸãããã®å€ãååšããªãå Žåã¯ãä»»æã® URI ãèš±å¯ãããŸãããã®ãã£ã¬ã¯ãã£ããååšããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ã{{HTMLElement("base")}} èŠçŽ ã®å€ã䜿çšããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP version</th> + <td>2</td> + </tr> + <tr> + <th scope="row">Directive type</th> + <td>{{Glossary("Document directive")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} fallback</th> + <td>èšå®ããªããšãä»»æã® URL ãèš±å¯ãããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p>1 ã€ãŸãã¯è€æ°ã®ãœãŒã¹ã base-uri ããªã·ãŒã«äœ¿çš:</p> + +<pre class="syntaxbox">Content-Security-Policy: base-uri <source>; +Content-Security-Policy: base-uri <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>ãã®ãã£ã¬ã¯ãã£ãã¯ä»ã® CSP ãã£ã¬ã¯ãã£ããšåãåŒæ°ã䜿çšããŸãããããŒã¯ãŒãã® <code>'unsafe-inline'</code> ã <code>'strict-dynamic'</code> ãªã©ã¯æå³ããããŸããã</p> + +<p>{{page("ja/docs/Web/HTTP/Headers/Content-Security-Policy/default-src", "Sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Meta_tag_configuration" name="Meta_tag_configuration">Meta ã¿ã°ã®èšå®</h3> + +<pre class="brush: html"><meta http-equiv="Content-Security-Policy" content="base-uri 'self'"></pre> + +<h3 id="Apache_configuration" name="Apache_configuration">Apache ã®èšå®</h3> + +<pre class="brush: bash"><IfModule mod_headers.c> +Header set Content-Security-Policy "base-uri 'self'"; +</IfModule></pre> + +<h3 id="Nginx_configuration" name="Nginx_configuration">Nginx ã®èšå®</h3> + +<pre class="brush: bash">add_header Content-Security-Policy "base-uri 'self';"</pre> + +<h3 id="Violation_case" name="Violation_case">éåã«ãªãå Žå</h3> + +<p>ãã¡ã€ã³ã <code>example.com</code> ã§ãªãã®ã§ã<code>https://example.com</code> ã«èšå®ããã {{HTMLElement("base")}} èŠçŽ ã® <code>href</code> ã CSP éåã«ãªããŸãã</p> + +<pre class="brush: html; example-bad"><meta http-equiv="Content-Security-Policy" content="base-uri 'self'"> +<base href="https://example.com/"> + +// Error: Refused to set the document's base URI to 'https://example.com/' +// because it violates the following Content Security Policy +// directive: "base-uri 'self'"</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + <tr> + <td>{{specName("CSP 3.0", "#directive-base-uri", "base-uri")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>å€æŽç¡ã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-base-uri", "base-uri")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒå®è£
ç¶æ³</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("http.headers.csp.base-uri")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPheader("Content-Security-Policy")}}</li> + <li>{{HTMLElement("base")}}</li> + <li>{{domxref("Node.baseURI")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/block-all-mixed-content/index.html b/files/ja/web/http/headers/content-security-policy/block-all-mixed-content/index.html new file mode 100644 index 0000000000..534a71ec82 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/block-all-mixed-content/index.html @@ -0,0 +1,72 @@ +--- +title: 'CSP: block-all-mixed-content' +slug: Web/HTTP/Headers/Content-Security-Policy/block-all-mixed-content +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Mixed Content + - Reference + - Security + - block-all-mixed-content + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã + - æ··åã³ã³ãã³ã +translation_of: Web/HTTP/Headers/Content-Security-Policy/block-all-mixed-content +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) <code><strong>block-all-mixed-content</strong></code> ãã£ã¬ã¯ãã£ãã¯ãããŒãžã HTTPS ã䜿çšããŠãããšãã« HTTP ã§è³ç£ãèªã¿èŸŒãããšãé²ããŸãã</p> + +<p>èœåçããã³ååçã®äž¡æ¹ãå«ãããã¹ãŠã®<a href="/ja/docs/Web/Security/Mixed_content">æ··åã³ã³ãã³ã</a>ãªãœãŒã¹ã®ãªã¯ãšã¹ãããããã¯ãããŸãããã㯠{{HTMLElement("iframe")}} ã®ææžã«ãé©çšãããããŒãžå
šäœã§æ··åã³ã³ãã³ãããªãããšãä¿èšŒããŸãã</p> + +<p class="note">{{CSP("upgrade-insecure-requests")}} ãã£ã¬ã¯ãã£ãã <code>block-all-mixed-content</code> ã®åã«è©äŸ¡ãããŸããåè
ãèšå®ãããŠããã°ãåŸè
ã¯äœãããŸãããã©ã¡ããã®ãã£ã¬ã¯ãã£ããèšå®ããŠãã ããã HTTP ã«ãªãã€ã¬ã¯ãããåŸã§ HTTPS ã匷å¶ããããšãã§ããªãå€ããã©ãŠã¶ãŒã§ HTTPS ã匷å¶ãããããªãéããäž¡æ¹ã®å¹æã¯ãããŸããã</p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Content-Security-Policy: block-all-mixed-content;</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Content-Security-Policy: block-all-mixed-content; + +<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content"> +</pre> + +<p>ãã£ãšçŽ°ããæ°Žæºã§è³ç£ã® http ãçŠæ¢ããã«ã¯ãåå¥ã®ãã£ã¬ã¯ãã£ãã <code>https:</code> ã«èšå®ããããšãã§ããŸããå®å
šã§ã¯ãªã HTTP ã®ç»åãèš±å¯ããªãããã«ããã«ã¯æ¬¡ã®ããã«ããŸãã</p> + +<pre class="notranslate">Content-Security-Policy: img-src https:</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("Mixed Content", "#block-all-mixed-content", "block-all-mixed-content")}}</td> + <td>{{Spec2('Mixed Content')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.block-all-mixed-content")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{CSP("upgrade-insecure-requests")}}</li> + <li><a href="/ja/docs/Web/Security/Mixed_content">æ··åã³ã³ãã³ã</a></li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/connect-src/index.html b/files/ja/web/http/headers/content-security-policy/connect-src/index.html new file mode 100644 index 0000000000..6557b4e671 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/connect-src/index.html @@ -0,0 +1,130 @@ +--- +title: 'CSP: connect-src' +slug: Web/HTTP/Headers/Content-Security-Policy/connect-src +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Reference + - Security + - connect-src + - source + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã +translation_of: Web/HTTP/Headers/Content-Security-Policy/connect-src +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã® <code><strong>connect-src</strong></code> ãã£ã¬ã¯ãã£ãã¯ãã¹ã¯ãªããã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšããŠèªã¿èŸŒãããšãã§ãã URL ãå¶éããŸãã以äžã® API ãå¶éã®å¯Ÿè±¡ãšãªããŸãã</p> + +<ul> + <li>{{HTMLElement("a")}} ã® {{htmlattrxref("ping", "a")}} å±æ§</li> + <li>{{domxref("Fetch")}}</li> + <li>{{domxref("XMLHttpRequest")}}</li> + <li>{{domxref("WebSocket")}}</li> + <li>{{domxref("EventSource")}}</li> + <li>{{domxref("Navigator.sendBeacon()")}}</li> +</ul> + +<div class="note"> +<p><strong>泚:</strong> <code>connect-src 'self'</code> ã¯ãã¹ãŠã®ãã©ãŠã¶ãŒã§ websocket ã¹ããŒãã解決ããããã§ã¯ãããŸããã詳现ã¯ãã¡ã: <a href="https://github.com/w3c/webappsec-csp/issues/7">https://github.com/w3c/webappsec-csp/issues/7</a></p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>1</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} ã«ãã代æ¿</th> + <td>ããããã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠<code>default-src</code> ãã£ã¬ã¯ãã£ããæ¢ããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p>connect-src ããªã·ãŒã«ã¯ã1 ã€ä»¥äžã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox notranslate">Content-Security-Policy: connect-src <source>; +Content-Security-Policy: connect-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("/ja/docs/Web/HTTP/Headers/Content-Security-Policy/default-src", "common_sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Violation_cases" name="Violation_cases">éåã®å Žå</h3> + +<p>以äžã® CSP ããããŒãæå®ããå Žåã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: connect-src https://example.com/</pre> + +<p>以äžã®ã³ãã¯ã·ã§ã³ã¯ãããã¯ãããèªã¿èŸŒãŸããŸããã</p> + +<pre class="brush: html notranslate"><a ping="https://not-example.com"> + +<script> + var xhr = new XMLHttpRequest(); + xhr.open('GET', 'https://not-example.com/'); + xhr.send(); + + var ws = new WebSocket("https://not-example.com/"); + + var es = new EventSource("https://not-example.com/"); + + navigator.sendBeacon("https://not-example.com/", { ... }); +</script></pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-connect-src", "connect-src")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>å€æŽãªã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-connect-src", "connect-src")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.connect-src")}}</p> + +<h2 id="Compatibility_notes" name="Compatibility_notes">äºææ§ã®ã¡ã¢</h2> + +<ul> + <li>Firefox 23 以åã§ã¯ã<code>xhr-src</code> ã <code>connect-src</code> ãã£ã¬ã¯ãã£ãã®ä»£ããã«ã{{domxref("XMLHttpRequest")}} ãå¶éããã ãã®ããã«äœ¿çšãããŠããŸããã</li> +</ul> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTMLElement("a")}} ã® {{htmlattrxref("ping", "a")}} å±æ§</li> + <li>{{domxref("Fetch")}}</li> + <li>{{domxref("XMLHttpRequest")}}</li> + <li>{{domxref("WebSocket")}}</li> + <li>{{domxref("EventSource")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/default-src/index.html b/files/ja/web/http/headers/content-security-policy/default-src/index.html new file mode 100644 index 0000000000..bd529cb56d --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/default-src/index.html @@ -0,0 +1,183 @@ +--- +title: 'CSP: default-src' +slug: Web/HTTP/Headers/Content-Security-Policy/default-src +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Reference + - Security + - default + - default-src + - source + - ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒ +translation_of: Web/HTTP/Headers/Content-Security-Policy/default-src +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) <strong><code>default-src</code></strong> ãã£ã¬ã¯ãã£ãã¯ãä»ã® CSP {{Glossary("fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}ã®ãã©ãŒã«ããã¯ãšããŠæäŸããŸãã</span>以äžã®ãã£ã¬ã¯ãã£ãããããããååšããªããšããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠<code>default-src</code> ãã£ã¬ã¯ãã£ããæ¢ããŠããã®å€ã䜿çšããŸãã</p> + +<ul> + <li>{{CSP("child-src")}}</li> + <li>{{CSP("connect-src")}}</li> + <li>{{CSP("font-src")}}</li> + <li>{{CSP("frame-src")}}</li> + <li>{{CSP("img-src")}}</li> + <li>{{CSP("manifest-src")}}</li> + <li>{{CSP("media-src")}}</li> + <li>{{CSP("object-src")}}</li> + <li>{{CSP("prefetch-src")}}</li> + <li>{{CSP("script-src")}}</li> + <li>{{CSP("script-src-elem")}}</li> + <li>{{CSP("script-src-attr")}}</li> + <li>{{CSP("style-src")}}</li> + <li>{{CSP("style-src-elem")}}</li> + <li>{{CSP("style-src-attr")}}</li> + <li>{{CSP("worker-src")}}</li> +</ul> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>1</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>default-src</code> ããªã·ãŒã«ã¯ãïŒã€ãŸãã¯è€æ°ã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox notranslate">Content-Security-Policy: default-src <source>; +Content-Security-Policy: default-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<div id="common_sources"> +<p><source> ã¯ä»¥äžã®ãã¡ã®äžã€ãåãããšãã§ããŸãã</p> + +<dl> + <dt><host-source></dt> + <dd>ãã¹ãåãŸã㯠IP ã¢ãã¬ã¹ã«ããã€ã³ã¿ãŒããããã¹ãã§ãä»»æ㧠<a href="/ja/docs/URIs_and_URLs">URL ã¹ããŒã </a>ãããŒãçªå·ãä»ããããšãã§ããŸãããµã€ãã®ã¢ãã¬ã¹ã¯ã¯ã€ã«ãã«ãŒã (ã¢ã¹ã¿ãªã¹ã¯æåã<code>'*'</code>) ã§å§ããããšãã§ããæŽã«ããŒãçªå·ã«ã¯ã€ã«ãã«ãŒã (<code>'*'</code>) ã䜿ã£ãŠãã¹ãŠã®æå¹ãªããŒãçªå·ããœãŒã¹ãšããŠç€ºãããšãã§ããŸãã<br> + äŸ: + <ul> + <li><code>http://*.example.com</code>: <code>http:</code> ã®ã¹ããŒã ã䜿çšãããexample.com ã®ãã¹ãŠã®ãµããã¡ã€ã³ããã®ãã¹ãŠã®èªã¿èŸŒã¿ã®è©Šè¡ã«äžèŽããŸãã</li> + <li><code>mail.example.com:443</code>: mail.example.com ã® 443çªããŒããžã®ã¢ã¯ã»ã¹ã®è©Šè¡ã«äžèŽããŸãã</li> + <li><code>https://store.example.com</code>: <code>https:</code> ã䜿çšãã store.example.com ãžã®ã¢ã¯ã»ã¹ã®è©Šè¡ã«äžèŽããŸãã</li> + <li><code>*.example.com</code>: çŸåšã®ãããã³ã«ã䜿çšãã example.com ã®ãã¹ãŠã®ãµããã¡ã€ã³ããã®èªã¿èŸŒã¿ã®ãã¹ãŠã®è©Šè¡ã«äžèŽããŸãã</li> + </ul> + </dd> + <dt><scheme-source></dt> + <dd><code>http:</code> ãŸã㯠<code>https:</code> ã®ãããªã¹ããŒã ã§ããã³ãã³ã¯å¿
èŠã§ãã以äžã®ä»ã®å€ãšã¯ç°ãªããåäžåŒçšç¬Šã¯äœ¿çšããªãã§ãã ãããdata ã¹ããŒã ãæå®ããããšãã§ããŸã (éæšå¥š)ã + <ul> + <li><code>data:</code> ã³ã³ãã³ãã®ãœãŒã¹ãšã㊠<a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"><code>data:</code> ã® URI</a> ã䜿ãããšãã§ããããã«ããŸãã<em>ããã¯å®å
šã§ã¯ãããŸãããæ»æè
ã¯ä»»æã® data: URI ãæ¿å
¥ããããšãã§ããŸãã䜿çšã¯æ§ããã¹ã¯ãªããã«ã¯çµ¶å¯Ÿã«äœ¿çšããªãã§ãã ããã</em></li> + <li><code>mediastream:</code> <a href="/ja/docs/Web/API/MediaStream_API"><code>mediastream:</code> ã® URI</a> ãã³ã³ãã³ãã®ãœãŒã¹ãšããŠäœ¿çšããããšãã§ããããã«ããŸãã</li> + <li><code>blob:</code> <a href="/ja/docs/Web/API/Blob"><code>blob:</code> ã® URI</a> ãã³ã³ãã³ãã®ãœãŒã¹ãšããŠäœ¿çšããããšãã§ããããã«ããŸãã</li> + <li><code>filesystem:</code> <a href="/ja/docs/Web/API/FileSystem"><code>filesystem:</code> ã® URI</a> ãã³ã³ãã³ãã®ãœãŒã¹ãšããŠäœ¿çšããããšãã§ããããã«ããŸãã</li> + </ul> + </dd> + <dt><code>'self'</code></dt> + <dd>ä¿è·ãããææžãæäŸããããªãªãžã³ããåã URL ã¹ããŒã ããã³ããŒãçªå·ã§åç
§ããŸããåäžåŒçšç¬Šãå¿
èŠã§ãããã©ãŠã¶ãŒã«ãã£ãŠã¯ source ãã£ã¬ã¯ãã£ããã <code>blob</code> ããã³ <code>filesystem</code> ãç¬èªã«é€å€ããŠããããšããããŸãããããã®ã³ã³ãã³ãçš®å¥ãèš±å¯ããå¿
èŠããããµã€ãã¯ãData å±æ§ã䜿çšããŠæå®ããããšãã§ããŸãã</dd> + <dt><code>'unsafe-eval'</code></dt> + <dd>æååããã³ãŒããçæãã <code>eval()</code> ããã³åæ§ã®ã¡ãœããã®å©çšãèš±å¯ããŸããåäžåŒçšç¬Šãå¿
èŠã§ãã</dd> + <dt id="unsafe-hashes"><code>'unsafe-hashes'</code></dt> + <dd>ç¹å®ã®ã€ã³ã©ã€ã³ã®<a href="/ja/docs/Web/Guide/Events/Event_handlers">ã€ãã³ããã³ãã©ãŒ</a>ãèš±å¯ããŸããã€ã³ã©ã€ã³ã€ãã³ããã³ãã©ãŒãèš±å¯ãããããã€ã³ã©ã€ã³ã® {{HTMLElement("script")}} èŠçŽ ã <code>javascript:</code> URL ã¯äžèŠãªå Žåããã㯠<code>unsafe-inline</code> ã䜿ããããå®å
šãªã¡ãœããã§ãã</dd> + <dt><code>'unsafe-inline'</code></dt> + <dd>ã€ã³ã©ã€ã³ã® {{HTMLElement("script")}} èŠçŽ ã<code>javascript:</code> ã® URLãã€ã³ã©ã€ã³ã€ãã³ããã³ãã©ãŒãã€ã³ã©ã€ã³ {{HTMLElement("style")}} èŠçŽ ã®ãããªãã€ã³ã©ã€ã³ãªãœãŒã¹ã®äœ¿çšãèš±å¯ããŸããåäžåŒçšç¬Šãå¿
èŠã§ãã</dd> + <dt><code>'none'</code></dt> + <dd>空ã®ã»ãããåç
§ããŸããã€ãŸããäžèŽãã URL ã¯ãããŸãããåäžåŒçšç¬Šãå¿
èŠã§ãã</dd> + <dt>'nonce-<base64-value>'</dt> + <dd>æå·åãã³ã¹ (äžåºŠã ã䜿ãããæ°å€) ã䜿çšããç¹å®ã®ã€ã³ã©ã€ã³ã¹ã¯ãªããã®ããã®èš±å¯ãªã¹ãã§ãããµãŒããŒã¯ããªã·ãŒã転éãããã³ã«åºæã®ãã³ã¹ãçæããå¿
èŠããããŸãããªãœãŒã¹ã®ããªã·ãŒãåé¿ããããšãé£ãããããããæšæž¬ã§ããªããã³ã¹ãæäŸããããšãéèŠã§ããäŸãã°<a href="/ja/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#Unsafe_inline_script">å®å
šã§ãªãã€ã³ã©ã€ã³ã¹ã¯ãªãã</a>ãåç
§ããŠãã ããããã³ã¹ãæå®ãããšãæè¿ã®ãã©ãŠã¶ãŒã¯ããã³ã¹ã®å¯Ÿå¿ããªãå€ããã©ãŠã¶ãŒã®ããã«èšå®ãããŠããå¯èœæ§ããã <code>'unsafe-inline'</code> ãç¡èŠããããã«ãªããŸãã</dd> + <dt>'<hash-algorithm>-<base64-value>'</dt> + <dd>ã¹ã¯ãªãããŸãã¯ã¹ã¿ã€ã«ã® sha256, sha384, sha512 ã®äœããã®ããã·ã¥ã§ãããã®ãœãŒã¹ã¯ãããã·ã¥ãçæããããã«äœ¿çšããæå·åã¢ã«ãŽãªãºã ãšãã¹ã¯ãªãããŸãã¯ã¹ã¿ã€ã«ã®ããã·ã¥ã base64 ã§ãšã³ã³ãŒããããã®ã®äºã€ã®éšåãããã·ã¥ã§åºåã£ããã®ã§æ§æãããŸããããã·ã¥ãçæãããšãã¯ã<script> ãŸã㯠<style> ã¿ã°ãå«ããªãããã«ãã倧æåã»å°æåã®åºå¥ãšããã¯ã€ãã¹ããŒã¹ã®æ±ã (å
é ãæ«å°Ÿã®ãã¯ã€ãã¹ããŒã¹ãå«ã) ã«æ³šæããŠãã ãããäŸãã°<a href="/ja/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#Unsafe_inline_script">å®å
šã§ãªãã€ã³ã©ã€ã³ã¹ã¯ãªãã</a>ãåç
§ããŠãã ããã CSP 2.0 ã§ã¯ãããã¯ã€ã³ã©ã€ã³ã¹ã¯ãªããã«ã®ã¿é©çšãããŸãã CSP 3.0 ã§ã¯ <code>script-src</code> ã§å€éšã¹ã¯ãªãããæå®ãããå Žåã«ãå©çšã§ããŸãã</dd> +</dl> +</div> + +<div id="strict-dynamic"> +<dl> + <dt>'strict-dynamic'</dt> + <dd><code>strict-dynamic</code> ãœãŒã¹è¡šçŸã¯ããã³ã¹ãããã·ã¥ãä»å ããŠãããããã«ãŒãã¹ã¯ãªããã«èªã¿èŸŒãŸãããã¹ãŠã®ã¹ã¯ãªããã«äŒæ¬ããããšã§ãããŒã¯ã¢ããå
ã®ã¹ã¯ãªããã«æ瀺çãªä¿¡çšãæå®ããŸãããããšåæã«ã<code>'self'</code> ã <code>'unsafe-inline'</code> ãšãã£ããããããèš±å¯ãªã¹ãããœãŒã¹è¡šçŸãç¡èŠãããŸãã<a href="/ja/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#strict-dynamic">script-src</a> ã®äŸãèŠãŠãã ããã</dd> +</dl> +</div> + +<div id="report-sample"> +<dl> + <dt>'report-sample'</dt> + <dd>éåã¬ããŒãã«å
¥ããéåã³ãŒãã®ãµã³ãã«ãèŠæ±ããŸãã</dd> +</dl> +</div> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="No_inheritance_with_default-src" name="No_inheritance_with_default-src">default-src ã§ç¶æ¿ãããªã</h3> + +<p>ä»ã®ãã£ã¬ã¯ãã£ããæå®ãããŠããå Žåã<code>default-src</code> ã¯åœ±é¿ããŸããã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: default-src 'self'; script-src https://example.com</pre> + +<p>ã¯ãäžèšã®ãã®ãšåãã§ãã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: connect-src 'self'; + font-src 'self'; + frame-src 'self'; + img-src 'self'; + manifest-src 'self'; + media-src 'self'; + object-src 'self'; + script-src https://example.com; + style-src 'self'; + worker-src 'self'</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-default-src", "default-src")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>æ¢å®ãšã㊠<code>frame-src</code>, <code>manifest-src</code>, <code>worker-src</code> ãè¿œå ã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-default-src", "default-src")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã<a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.default-src")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>CSP directives (<a href="https://www.w3.org/TR/CSP/#csp-directives">https://www.w3.org/TR/CSP/#csp-directives</a>): + <ul> + <li>{{Glossary("Fetch directive")}}</li> + <li>{{Glossary("Document directive")}}</li> + <li>{{Glossary("Navigation directive")}}</li> + <li>{{Glossary("Reporting directive")}}</li> + <li><code><a href="/docs/Web/HTTP/Headers/Content-Security-Policy/upgrade-insecure-requests">upgrade-insecure-requests</a></code></li> + <li><code><a href="/docs/Web/HTTP/Headers/Content-Security-Policy/block-all-mixed-content">block-all-mixed-content</a></code></li> + <li><code><a href="/docs/Web/HTTP/Headers/Content-Security-Policy/require-sri-for">require-sri-for</a></code> {{experimental_inline}}</li> + </ul> + </li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/frame-ancestors/index.html b/files/ja/web/http/headers/content-security-policy/frame-ancestors/index.html new file mode 100644 index 0000000000..3e2dbed062 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/frame-ancestors/index.html @@ -0,0 +1,127 @@ +--- +title: 'CSP: frame-ancestors' +slug: Web/HTTP/Headers/Content-Security-Policy/frame-ancestors +tags: + - Ancestors + - CSP + - Content-Security-Policy + - Directive + - Frame + - HTTP + - Security + - frame-ancestors +translation_of: Web/HTTP/Headers/Content-Security-Policy/frame-ancestors +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã§ãã <code><strong>frame-ancestors</strong></code> ãã£ã¬ã¯ãã£ã㯠{{HTMLElement("frame")}}ã {{HTMLElement("iframe")}}ã {{HTMLElement("object")}} ã {{HTMLElement("embed")}}ã {{HTMLElement("applet")}} ãªã©ã䜿ã£ãŠããŒãžãåã蟌ãããšã®ã§ãã芪ãæå®ããŸãã</p> + +<p>ãã®ãã£ã¬ã¯ãã£ãã <code>'none'</code> ã«ããããšã¯ã {{HTTPHeader("X-Frame-Options")}}<code>: deny</code> (ããã¯å€ããã©ãŠã¶ãŒãåæ§ã«å¯Ÿå¿ããŠããŸã) ãèšå®ããã®ã«äŒŒãŠããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>2</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Navigation directive", "ããã²ãŒã·ã§ã³ãã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} ã«ãã代æ¿</th> + <td>ãªããèšå®ããªãå Žåã¯ãã¹ãŠãèš±å¯ããŸãã</td> + </tr> + <tr> + <th colspan="2" scope="row">ãã®ãã£ã¬ã¯ãã£ã㯠{{HTMLElement("meta")}} èŠçŽ ã§ã¯å¯Ÿå¿ããŠããŸããã</th> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>frame-ancestors</code> ããªã·ãŒããã®ããã«äžã€ä»¥äžã»ããã§ããŸãã</p> + +<pre class="syntaxbox notranslate">Content-Security-Policy: frame-ancestors <source>; +Content-Security-Policy: frame-ancestors <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p><source> ã¯ä»¥äžã®ãã¡ã®ããããã§ãã</p> + +<div class="note"> +<p><code>frame-ancestors</code> ãã£ã¬ã¯ãã£ãã®æ§æã¯ä»ã®ãœãŒã¹ãªã¹ã ({{CSP("default-src")}} ãªã©) ã®ãã®ãšåæ§ã§ããã <code>'unsafe-eval'</code> ã <code>'unsafe-inline'</code> ãªã©ã¯èš±å¯ãããŠããŸããããŸãããã㯠<code>default-src</code> ã®èšå®ã«ãã©ãŒã«ããã¯ããããšããããŸãããäžèšã«ç€ºããããœãŒã¹ã®ã¿ãèš±å¯ãããŸãã</p> +</div> + +<dl> + <dt><host-source></dt> + <dd>ã¹ããŒã¹ã§åºåãããã<a href="/ja/docs/URIs_and_URLs">URL scheme</a>ãããŒãçªå·ããµããããšãã§ããIPã¢ãã¬ã¹ãååã«ããã€ã³ã¿ãŒããããã¹ãåã§ãããµã€ãã®ã¢ãã¬ã¹ã®åã«ã¯ã€ã«ãã«ãŒã (ã¢ã¹ã¿ãªã¹ã¯ã <code>'*'</code>)ãå«ããããšãã§ããããã«ãã¹ãŠã®ããŒãããœãŒã¹ãšããŠæå¹ã§ããããšã瀺ãããã«ããŒãçªå·ãšããŠã¯ã€ã«ãã«ãŒã (<code>'*'</code>) ã䜿ãããšãã§ããŸãããã¹ãåãã·ã³ã°ã«ã¯ãªãŒãã§å²ãããšã¯ã§ããŸããã<br> + äŸïŒ + <ul> + <li><code>http://*.example.com</code>: <code>http:</code> ã®ã¹ããŒã ã䜿çšãããexample.com ã®ãã¹ãŠã®ãµããã¡ã€ã³ããã®ãã¹ãŠã®èªã¿èŸŒã¿ã®è©Šè¡ã«äžèŽããŸãã</li> + <li><code>mail.example.com:443</code>: mail.example.com ã® 443çªããŒããžã®ã¢ã¯ã»ã¹ã®è©Šè¡ã«äžèŽããŸãã</li> + <li><code>https://store.example.com</code>: <code>https:</code> ã䜿çšãã store.example.com ãžã®ã¢ã¯ã»ã¹ã®è©Šè¡ã«äžèŽããŸãã</li> + </ul> + + <div class="blockIndicator warning"> + <p><code>host-source</code> ã«URLã¹ããŒã ãæå®ãããŠãããã iframe ã <code>https</code> URLããèªã¿èŸŒãŸããŠããå Žåã iframe ãèªã¿èŸŒãã§ããããŒãžã® URL ã <code>https</code> ã§ãªããã°ãªããŸããã W3C ä»æ§æžã® <a href="https://w3c.github.io/webappsec-csp/2/#match-source-expression">matching source expressions</a> ã«ãããã®ã§ãã</p> + </div> + </dd> + <dt><scheme-source></dt> + <dd><code>http:</code> ãŸã㯠<code>https:</code> ã®ãããªã¹ããŒã ã§ããã³ãã³ã¯å¿
èŠã§ãã以äžã®ä»ã®å€ãšã¯ç°ãªããåäžåŒçšç¬Šã¯äœ¿çšããªãã§ãã ãããdata ã¹ããŒã ãæå®ããããšãã§ããŸã (éæšå¥š)ã + <ul> + <li><code>data:</code> ã³ã³ãã³ãã®ãœãŒã¹ãšã㊠<a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"><code>data:</code> ã® URI</a> ã䜿ãããšãã§ããããã«ããŸãã<em>ããã¯å®å
šã§ã¯ãããŸãããæ»æè
ã¯ä»»æã® data: URI ãæ¿å
¥ããããšãã§ããŸãã䜿çšã¯æ§ããã¹ã¯ãªããã«ã¯çµ¶å¯Ÿã«äœ¿çšããªãã§ãã ããã</em></li> + <li><code>mediastream:</code> <a href="/ja/docs/Web/API/MediaStream_API"><code>mediastream:</code> ã® URI</a> ãã³ã³ãã³ãã®ãœãŒã¹ãšããŠäœ¿çšããããšãã§ããããã«ããŸãã</li> + <li><code>blob:</code> <a href="/ja/docs/Web/API/Blob"><code>blob:</code> ã® URI</a> ãã³ã³ãã³ãã®ãœãŒã¹ãšããŠäœ¿çšããããšãã§ããããã«ããŸãã</li> + <li><code>filesystem:</code> <a href="/ja/docs/Web/API/FileSystem"><code>filesystem:</code> ã® URI</a> ãã³ã³ãã³ãã®ãœãŒã¹ãšããŠäœ¿çšããããšãã§ããããã«ããŸãã</li> + </ul> + </dd> + <dt><code>'self'</code></dt> + <dd>ä¿è·ãããææžãæäŸããããªãªãžã³ããåã URL ã¹ããŒã ããã³ããŒãçªå·ã§åç
§ããŸããåäžåŒçšç¬Šãå¿
èŠã§ãããã©ãŠã¶ãŒã«ãã£ãŠã¯ source ãã£ã¬ã¯ãã£ããã <code>blob</code> ããã³ <code>filesystem</code> ãç¬èªã«é€å€ããŠããããšããããŸãããããã®ã³ã³ãã³ãçš®å¥ãèš±å¯ããå¿
èŠããããµã€ãã¯ãData å±æ§ã䜿çšããŠæå®ããããšãã§ããŸãã</dd> + <dt><code>'none'</code></dt> + <dd>空ã®ã»ãããåç
§ããŸããã€ãŸããäžèŽãã URL ã¯ãããŸãããåäžåŒçšç¬Šãå¿
èŠã§ãã</dd> +</dl> + +<h2 id="äŸ">äŸ</h2> + +<pre class="brush: bash notranslate">Content-Security-Policy: frame-ancestors 'none'; + +Content-Security-Policy: frame-ancestors 'self' https://www.example.org;</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-frame-ancestors", "frame-ancestors")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>å€æŽãªã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-frame-ancestors", "frame-ancestors")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã<a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.frame-ancestors")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTTPHeader("X-Frame-Options")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/frame-src/index.html b/files/ja/web/http/headers/content-security-policy/frame-src/index.html new file mode 100644 index 0000000000..98a6061b79 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/frame-src/index.html @@ -0,0 +1,99 @@ +--- +title: 'CSP: frame-src' +slug: Web/HTTP/Headers/Content-Security-Policy/frame-src +tags: + - CSP + - Content-Security-Policy + - Directive + - Frame + - HTTP + - Reference + - Security + - frame-src + - source + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã + - ãã¬ãŒã +translation_of: Web/HTTP/Headers/Content-Security-Policy/frame-src +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã«ããã <code><strong>frame-src</strong></code> ãã£ã¬ã¯ãã£ãã¯ã {{HTMLElement("frame")}} ã {{HTMLElement("iframe")}} ã®ãããªèŠçŽ ã䜿çšããå
éšã®é²èŠ§ã³ã³ããã¹ãã®èªã¿èŸŒã¿ã«æå¹ãªãœãŒã¹ãæå®ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>1</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">代æ¿</th> + <td>ãã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠{{CSP("child-src")}} ãã£ã¬ã¯ãã£ããæ¢ã (ããã«ãã®ä»£æ¿ã¯ {{CSP("default-src")}} ãã£ã¬ã¯ãã£ãã§ãã)ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>frame-src</code> ããªã·ãŒã«ã¯ã1ã€ä»¥äžã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy: frame-src <source>; +Content-Security-Policy: frame-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("/ja/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src", "Sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Violation_cases" name="Violation_cases">éåäŸ</h3> + +<p>ãã® CSP ããããŒãããå Žåã</p> + +<pre class="brush: bash">Content-Security-Policy: frame-src https://example.com/</pre> + +<p>以äžã® {{HTMLElement("iframe")}} ã¯ãããã¯ãããèªã¿èŸŒãŸããŸããã</p> + +<pre class="brush: html"><iframe src="https://not-example.com/"></iframe></pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-frame-src", "frame-src")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td><code>frame-src</code> ã®éæšå¥šåã解é€</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-frame-src", "frame-src")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td><code>frame-src</code> ãéæšå¥šå</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.frame-src")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTMLElement("frame")}} ããã³ {{HTMLElement("iframe")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/img-src/index.html b/files/ja/web/http/headers/content-security-policy/img-src/index.html new file mode 100644 index 0000000000..5d02035fe9 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/img-src/index.html @@ -0,0 +1,99 @@ +--- +title: 'CSP: img-src' +slug: Web/HTTP/Headers/Content-Security-Policy/img-src +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Image + - Reference + - Security + - img-src + - source + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã + - ç»å +translation_of: Web/HTTP/Headers/Content-Security-Policy/img-src +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Content-Security-Policy")}} ã«ããã <code><strong>img-src</strong></code> ãã£ã¬ã¯ãã£ãã¯ãç»åããã¡ãã³ã³ã®æå¹ãªãœãŒã¹ãæå®ããŸãã</span></p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>1</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} ã«ãã代æ¿</th> + <td>ããããã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠<code>default-src</code> ãã£ã¬ã¯ãã£ããæ¢ããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>img-src</code> ããªã·ãŒã«ã¯ã1ã€ä»¥äžã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy: img-src <source>; +Content-Security-Policy: img-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("/ja/docs/Web/HTTP/Headers/Content-Security-Policy/default-src", "Sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Violation_cases" name="Violation_cases">éåäŸ</h3> + +<p>ãã® CSP ããããŒãããå Žåã</p> + +<pre class="brush: bash">Content-Security-Policy: img-src https://example.com/</pre> + +<p>以äžã® {{HTMLElement("img")}} ã®åèŠçŽ ã¯ãããã¯ãããèªã¿èŸŒãŸããŸããã</p> + +<pre class="brush: html"><img src="https://not-example.com/foo.jpg" alt="example picture"></pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-img-src", "img-src")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>å€æŽãªã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-img-src", "img-src")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.img-src")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTMLElement("img")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/index.html b/files/ja/web/http/headers/content-security-policy/index.html new file mode 100644 index 0000000000..2abcbd7d1b --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/index.html @@ -0,0 +1,262 @@ +--- +title: Content-Security-Policy +slug: Web/HTTP/Headers/Content-Security-Policy +tags: + - CSP + - HTTP + - Reference + - Security + - header + - ã»ãã¥ãªã㣠+translation_of: Web/HTTP/Headers/Content-Security-Policy +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>Content-Security-Policy</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ããŠã§ããµã€ã管çè
ããããããŒãžã«ãŠãŒã¶ãŒãšãŒãžã§ã³ããèªã¿èŸŒã¿ãèš±å¯ããããªãœãŒã¹ã管çã§ããããã«ããŸããããã€ãã®äŸå€ãé€ããŠã倧åã®ããªã·ãŒã«ã¯ãµãŒããŒãªãªãžã³ãšã¹ã¯ãªãããšã³ããã€ã³ãã®æå®ãå«ãã§ããŸããããã¯ã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã°æ»æ ({{Glossary("XSS")}}) ãé²ãã®ã«åœ¹ç«ã¡ãŸãã</p> + +<p>ãã詳现ãªæ
å ±ã¯ã <a href="/ja/docs/Web/HTTP/CSP">Content Security Policy (CSP)</a> ã®å
¥éèšäºãåç
§ããŠãã ããã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Content-Security-Policy: <policy-directive>; <policy-directive> +</pre> + +<p>ããã§ã <code><policy-directive></code> ã¯æ¬¡ã®èŠçŽ ã§æ§æãããŸã: <code><directive> <value></code> å
éšã®å¥èªç¹ãªãã</p> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<h3 id="Fetch_directives" name="Fetch_directives">{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</h3> + +<p>ãã§ãããã£ã¬ã¯ãã£ãã¯ãç¹å®ã®ãªãœãŒã¹çš®å¥ãããŒãããããå Žæãå¶åŸ¡ããŸãã</p> + +<h4 id="List_of_Content_Security_Policy_Fetch_directives" name="List_of_Content_Security_Policy_Fetch_directives">Content Security Policy ãã§ãããã£ã¬ã¯ãã£ãã®äžèŠ§</h4> + +<dl> + <dt>{{CSP("child-src")}}</dt> + <dd><a href="/ja/docs/Web/API/Web_Workers_API">ãŠã§ãã¯ãŒã«ãŒ</a>ãšã {{HTMLElement("frame")}} ã {{HTMLElement("iframe")}} ã®ãããªèŠçŽ ã«ãã£ãŠããŒããããå
¥ãåç¶ã®é²èŠ§ã³ã³ããã¹ãã«å¯Ÿããæå¹ãªãœãŒã¹ãå®çŸ©ããŸãã + <div class="warning"> + <p>è€åããé²èŠ§ã³ã³ããã¹ããã¯ãŒã«ãŒãå¶åŸ¡ããã«ã¯ã ãããã {{CSP("frame-src")}} ããã³ {{CSP("worker-src")}} ã <strong><code>child-src</code></strong> ã®ä»£ããã«äœ¿çšããŠãã ããã</p> + </div> + </dd> + <dt>{{CSP("connect-src")}}</dt> + <dd>script ã€ã³ã¿ãŒãã§ãŒã¹ã«ãã£ãŠããŒãããã URL ãå¶éããŸãã</dd> + <dt>{{CSP("default-src")}}</dt> + <dd>å¥ã® {{Glossary("Fetch directive", "Fetch ãã£ã¬ã¯ãã£ã")}}ã«å¯Ÿãã代æ¿ãšããŠæäŸããŸãã</dd> + <dt>{{CSP("font-src")}}</dt> + <dd>{{cssxref("@font-face")}} ã«ãã£ãŠããŒãããããã©ã³ãã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dt>{{CSP("frame-src")}}</dt> + <dd>{{HTMLElement("frame")}} ã {{HTMLElement("iframe")}} ã®ãããªèŠçŽ ã«ãã£ãŠããŒããããå
¥ãåç¶ã®ã³ã³ãã³ãã®é²èŠ§ã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dt>{{CSP("img-src")}}</dt> + <dd>ç»åã favicon ã«å¯Ÿããæå¹ãªãœãŒã¹ãå®çŸ©ããŸãã</dd> + <dt>{{CSP("manifest-src")}}</dt> + <dd>ã¢ããªã±ãŒã·ã§ã³ã®ãããã§ã¹ããã¡ã€ã«ã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dt>{{CSP("media-src")}}</dt> + <dd>{{HTMLElement("audio")}}ã{{HTMLElement("video")}} ã {{HTMLElement("track")}} èŠçŽ ã«ãã£ãŠããŒãããã¡ãã£ã¢ã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dt>{{CSP("object-src")}}</dt> + <dd>{{HTMLElement("object")}}ã {{HTMLElement("embed")}} ã {{HTMLElement("applet")}} èŠçŽ ã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dd class="note"><code>object-src</code> ã§å¶åŸ¡ãããèŠçŽ ã¯ãããããå€ã HTML èŠçŽ ã«è©²åœãããšèŠãªãããæ°ããæšæºæ©èœãå©çšã§ããŸãã (ã»ãã¥ãªãã£å±æ§ã® <code>sandbox</code> ã <code><iframe></code> ã® <code>allow</code> ãªã©)ãåŸã£ãŠããã®ãã§ãããã£ã¬ã¯ãã£ãã§å¶éãæããããšã<strong>æšå¥šãããŸã</strong> (äŸãã°ãå¯èœã§ããã° <code>object-src 'none'</code> ãèšå®ãããªã©)ã</dd> + <dt>{{CSP("prefetch-src")}}{{experimental_inline}}</dt> + <dd>äºåã«ãã§ããããããæç»ãããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dt>{{CSP("script-src")}}</dt> + <dd>JavaScript ã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dt>{{CSP("script-src-elem")}}{{experimental_inline}}</dt> + <dd>JavaScript ã® {{HTMLElement("script")}} èŠçŽ ã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dt>{{CSP("script-src-attr")}}{{experimental_inline}}</dt> + <dd>JavaScript ã®ã€ã³ã©ã€ã³ã€ãã³ããã³ãã©ãŒã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> +</dl> + +<dl> + <dt>{{CSP("style-src")}}</dt> + <dd>ã¹ã¿ã€ã«ã·ãŒãã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dt>{{CSP("style-src-elem")}}{{experimental_inline}}</dt> + <dd>ã¹ã¿ã€ã«ã·ãŒãã® {{HTMLElement("style")}} ããã³ {{HTMLElement("link")}} èŠçŽ ã« <code>rel="stylesheet"</code> ãã€ãããã®ã®ã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dt>{{CSP("style-src-attr")}}{{experimental_inline}}</dt> + <dd>åã
ã® DOM èŠçŽ ã«é©çšãããã€ã³ã©ã€ã³ã¹ã¿ã€ã«ã®æå¹ãªãœãŒã¹ãæå®ããŸãã</dd> + <dt>{{CSP("worker-src")}}{{experimental_inline}}</dt> + <dd>{{domxref("Worker")}}, {{domxref("SharedWorker")}}, {{domxref("ServiceWorker")}} ã¹ã¯ãªããã«å¯Ÿããæå¹ãªãœãŒã¹ãæå®ããŸãã</dd> +</dl> + +<h3 id="Document_directives" name="Document_directives">{{Glossary("Document directive", "ææžãã£ã¬ã¯ãã£ã")}}</h3> + +<p>ææžãã£ã¬ã¯ãã£ãã¯ãããªã·ãŒãé©çšãããææžããã㯠<a href="/ja/docs/Web/API/Web_Workers_API">Worker</a> ç°å¢ã®ããããã£ã管çããŸãã</p> + +<h4 id="List_of_Content_Security_Policy_Document_directives" name="List_of_Content_Security_Policy_Document_directives">Content Security Policy ææžãã£ã¬ã¯ãã£ãã®äžèŠ§</h4> + +<dl> + <dt>{{CSP("base-uri")}}</dt> + <dd>ææžã® {{HTMLElement("base")}} èŠçŽ ã§äœ¿çšããã URL ãå¶éããŸãã</dd> + <dt>{{CSP("plugin-types")}}</dt> + <dd>ããŒãããããªãœãŒã¹ã®ã¿ã€ããéå®ããããšã§ãææžã«åã蟌ãŸãããã©ã°ã€ã³ã®çµãå¶éããŸãã</dd> + <dt>{{CSP("sandbox")}}</dt> + <dd>{{HTMLElement("iframe")}} ãš {{htmlattrxref("sandbox", "iframe")}} å±æ§ã«é¡äŒŒããèŠæ±ãªãœãŒã¹ã«å¯ŸããŠãµã³ãããã¯ã¹ãæå¹ã«ããŸãã</dd> +</dl> + +<h3 id="Navigation_directives" name="Navigation_directives">{{Glossary("Navigation directive", "ããã²ãŒã·ã§ã³ãã£ã¬ã¯ãã£ã")}}</h3> + +<p>ããã²ãŒã·ã§ã³ãã£ã¬ã¯ãã£ãã¯ãäŸãã°ãŠãŒã¶ãŒã移åããå Žæããã©ãŒã ãéä¿¡ããå Žæã管çããŸãã</p> + +<h4 id="List_of_Content_Security_Policy_Navigation_directives" name="List_of_Content_Security_Policy_Navigation_directives">Content Security Policy ããã²ãŒã·ã§ã³ãã£ã¬ã¯ãã£ãã®äžèŠ§</h4> + +<dl> + <dt>{{CSP("form-action")}}</dt> + <dd>æå®ã®ã³ã³ããã¹ããããã©ãŒã ã®éä¿¡å
ãšããŠäœ¿çšããã URL ãå¶éããŸãã</dd> + <dt>{{CSP("frame-ancestors")}}</dt> + <dd>{{HTMLElement("frame")}}, {{HTMLElement("iframe")}}, {{HTMLElement("object")}}, {{HTMLElement("embed")}}, ããã㯠{{HTMLElement("applet")}} ã«ãã£ãŠããŒãžã«åã蟌ãŸããæå¹ãªèŠªãæå®ããŸãã</dd> + <dt>{{CSP("navigate-to")}}{{experimental_inline}}</dt> + <dd>{{HTMLElement("form")}} ({{CSP("form-action")}} ãæå®ãããŠããªãå Žå), {{HTMLElement("a")}}, {{DOMxRef("window.location")}}, {{DOMxRef("window.open")}}, ãªã©ãããããæ¹æ³ã§ææžããããã²ãŒã·ã§ã³ãè¡ãããšãã§ãã URL ãå¶éããŸãã</dd> +</dl> + +<h3 id="Reporting_directives" name="Reporting_directives">{{Glossary("Reporting directive", "å ±åãã£ã¬ã¯ãã£ã")}}</h3> + +<p>å ±åãã£ã¬ã¯ãã£ã㯠CSP éåã®å ±åéçšãå¶åŸ¡ããŸãã {{HTTPHeader("Content-Security-Policy-Report-Only")}} ããããŒãåç
§ããŠãã ããã</p> + +<h4 id="List_of_Content_Security_Policy_Reporting_directives" name="List_of_Content_Security_Policy_Reporting_directives">Content Security Policy å ±åãã£ã¬ã¯ãã£ãã®äžèŠ§</h4> + +<dl> + <dt>{{CSP("report-uri")}}{{deprecated_inline}}</dt> + <dd>ãŠãŒã¶ãŒãšãŒãžã§ã³ãã«ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒã®éåãå ±åããããæ瀺ããŸãããããã®éåã®å ±åã¯ã {{Glossary("JSON")}} ææžã HTTP ã® <code>POST</code> ãªã¯ãšã¹ãã§æå®ããã URI ã«éä¿¡ããããšã§è¡ãããŸãã + <div class="warning"> + <p>{{CSP("report-to")}} ãã£ã¬ã¯ãã£ãã¯éæšå¥šã® <code><strong>report-uri</strong></code> ãã£ã¬ã¯ãã£ãã眮ãæããããšãæå³ããŠããŸããã {{CSP("report-to")}} ã¯ãŸã å€ãã®ãã©ãŠã¶ãŒã§å¯Ÿå¿ãããŠããŸããããã®ããããã©ãŠã¶ãŒã§ {{CSP("report-to")}} ã®å¯Ÿå¿ãè¡ããããŸã§ã¯çŸåšã®ãã©ãŠã¶ãŒãšã®äºææ§ã®ããã <code><strong>report-uri</strong></code> ããã³ {{CSP("report-to")}} ã®äž¡æ¹ãæå®ããããšãã§ããŸãã</p> + + <pre class="syntaxbox notranslate">Content-Security-Policy: ...; report-uri https://endpoint.example.com; report-to groupname</pre> + + <p>{{CSP("report-to")}} ã«å¯Ÿå¿ãããã©ãŠã¶ãŒã§ã¯ã <code><strong>report-uri</strong></code> ãã£ã¬ã¯ãã£ãã¯ç¡èŠãããŸãã</p> + </div> + </dd> + <dt>{{CSP("report-to")}}{{experimental_inline}}</dt> + <dd><code>SecurityPolicyViolationEvent</code> ãçºçãããŸãã</dd> +</dl> + +<h3 id="Other_directives" name="Other_directives">ãã®ä»ã®ãã£ã¬ã¯ãã£ã</h3> + +<dl> + <dt>{{CSP("block-all-mixed-content")}}</dt> + <dd>ããŒãžã HTTPS ã䜿çšããŠèªã¿èŸŒãŸããéã«ã HTTP ã䜿çšããŠè³ç£ãèªã¿èŸŒãããšãé²æ¢ããŸãã</dd> + <dt>{{CSP("referrer")}}{{deprecated_inline}}{{non-standard_inline}}</dt> + <dd>ããŒãžããé¢ããéã® Referer ããããŒå
ã®æ
å ±ãæå®ããããã«äœ¿çšãããŠããŸããã代ããã« {{HTTPHeader("Referrer-Policy")}} ããããŒã䜿çšããŠãã ããã</dd> + <dt>{{CSP("require-sri-for")}}{{experimental_inline}}</dt> + <dd>ããŒãžäžã®ã¹ã¯ãªãããã¹ã¿ã€ã«ã« {{Glossary("SRI")}} ã®äœ¿çšãèŠæ±ããŸãã</dd> + <dt>{{CSP("require-trusted-types-for")}}{{experimental_inline}}</dt> + <dd>DOM XSS ã€ã³ãžã§ã¯ã·ã§ã³ã·ã³ã¯ã§ <a href="https://w3c.github.io/webappsec-trusted-types/dist/spec/">Trusted Types</a> ã匷å¶ããŸãã</dd> +</dl> + +<dl> + <dt>{{CSP("trusted-types")}}{{experimental_inline}}</dt> + <dd><a href="https://w3c.github.io/webappsec-trusted-types/dist/spec/">Trusted Types</a> ããªã·ãŒã®ãã¯ã€ããªã¹ããæå®ããããã«äœ¿çšããŸã (Trusted Types ã¯ãã¢ããªã±ãŒã·ã§ã³ã DOM XSS ã€ã³ãžã§ã¯ã·ã§ã³ã·ã³ã¯ãããã¯ããŠã³ããŠãæååã®ä»£ããã«ã¹ããŒãã£ã³ã°äžå¯èœãªåä»ãã®å€ã®ã¿ãåãå
¥ããããã«ããŸã)ã</dd> +</dl> + +<dl> + <dt>{{CSP("upgrade-insecure-requests")}}</dt> + <dd>å®å
šã§ãªã URL (HTTP ã§æäŸãããŠãããã®) ããã¹ãŠå®å
šãª URL (HTTPS ã§æäŸãããŠãããã®) ã«çœ®ãæãããã®ããã«æ±ãããã«ãŠãŒã¶ãšãŒãžã§ã³ãã«æ瀺ããŸãããã®ãã£ã¬ã¯ãã£ãã¯ãæžãæããå¿
èŠãªå®å
šã§ãªãå€ã URL ã倧éã«ãããŠã§ããµã€ãã察象ãšããŠããŸãã</dd> +</dl> + +<h2 id="CSP_in_workers" name="CSP_in_workers">Worker å
ã® CSP</h2> + +<p><a href="/ja/docs/Web/API/Worker">Worker</a> ã¯ãäžè¬çã«ææž (ãããã¯èŠª Worker) ã® Content Security Policy ã«ãã£ãŠç®¡çãããŸãããWorker ã«å¯Ÿãã Content Security Policy ãæå®ããã«ã¯ãWorker ã¹ã¯ãªããèªèº«ãèŠæ±ãããªã¯ãšã¹ãã«å¯Ÿã㊠<code>Content-Security-Policy</code> ã¬ã¹ãã³ã¹ããããŒãèšå®ããŠäžããã</p> + +<p>Worker ã¹ã¯ãªããã®ãªãªãžã³ãã°ããŒãã«ã§äžæã®èå¥åã®å Žåã(äŸãã°ãURL ãããŒã¿ããããã®ã¹ããŒãã®å Žå)ãäŸå€ã«åœãããŸãããã®å ŽåãWorker ã¯ææžãããã¯äœæå
ã® Worker ã® Content Security Policy ãç¶æ¿ããŸãã</p> + +<h2 id="Multiple_content_security_policies" name="Multiple_content_security_policies">è€æ°ã® CSP</h2> + +<p>CSP ã§ã¯ã<code>Content-Security-Policy</code> ããããŒã{{HTTPHeader("Content-Security-Policy-Report-Only")}} ããããŒã {{HTMLElement("meta")}} èŠçŽ ãçµç±ãããã®ãå«ãããªãœãŒã¹ã«å¯ŸããŠè€æ°ã®ããªã·ãŒãæå®ããããšãã§ããŸãã</p> + +<p>以äžã®äŸã®ããã«ã <code>Content-Security-Policy</code> ããããŒãè€æ°å䜿ãããšãã§ããŸããããã§ã¯ {{CSP("connect-src")}} ãã£ã¬ã¯ãã£ãã«ç¹ã«æ³šæããŠãã ããã2ã€ç®ã®ããªã·ãŒã§ã¯æ¥ç¶ãèš±å¯ããŠããã«ããããããã1ã€ç®ã®ããªã·ãŒã«ã¯ <code>connect-src 'none'</code> ãå«ãŸããŠããŸããè¿œå ã®ããªã·ãŒãè¿œå ãããšãä¿è·ããããªãœãŒã¹ã®æ©èœã<em>ããã«å¶éããããšãã§ãã</em>ã ãã§ãæ¥ç¶ã¯èš±å¯ããããæãå³å¯ãªããªã·ãŒãšã㊠<code>connect-src 'none'</code> ã匷å¶ãããŸãã</p> + +<pre class="notranslate">Content-Security-Policy: default-src 'self' http://example.com; + connect-src 'none'; +Content-Security-Policy: connect-src http://example.com/; + script-src http://example.com/</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>äŸ: å®å
šã§ãªã inline/eval ãç¡å¹ã«ããhttps çµç±ã§ã®ãªãœãŒã¹ (ç»åããã©ã³ããã¹ã¯ãªãããªã©) ã®ããŒããèš±ããŸãã</p> + +<pre class="notranslate">// ããã㌠+Content-Security-Policy: default-src https: + +// ã¡ã¿ã¿ã° +<meta http-equiv="Content-Security-Policy" content="default-src https:"> +</pre> + +<p>äŸ: ä¿®æ£ã®ããã«ã€ã³ã©ã€ã³ã³ãŒããå€çšããŠããæ¢åã®ãµã€ãã§ãhttps çµç±ã§ã®ã¿ããŒãããããªãœãŒã¹ãæ確ã«ãããã©ã°ã€ã³ãç¡å¹ã«ããŸãã</p> + +<pre class="notranslate">Content-Security-Policy: default-src https: 'unsafe-eval' 'unsafe-inline'; object-src 'none'</pre> + +<p>äŸ: äžèšã®ããªã·ãŒãå®è£
ããã代ããã«ãçºçããã§ãããéåãå ±åããŸãã</p> + +<pre class="notranslate">Content-Security-Policy-Report-Only: default-src https:; report-uri /csp-violation-report-endpoint/</pre> + +<p>ãã®ä»ã®äŸã¯ã <a href="https://infosec.mozilla.org/guidelines/web_security#Examples_5">Mozilla Web Security Guidelines</a> ãåç
§ããŠäžããã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0")}}</td> + <td>{{Spec2("CSP 3.0")}}</td> + <td><code>manifest-src</code>, <code>navigate-to</code>, <code>report-to</code>, <code>strict-dynamic</code>, <code>worker-src</code> ãè¿œå ã <code>frame-src</code> ã®éæšå¥šã解é€ã <code>report-uri</code> ã <code>report-to</code> ã®ä»£ããã«éæšå¥šåã</td> + </tr> + <tr> + <td>{{specName("Mixed Content")}}</td> + <td>{{Spec2("Mixed Content")}}</td> + <td><code>block-all-mixed-content</code> ãè¿œå ã</td> + </tr> + <tr> + <td>{{specName("Subresource Integrity")}}</td> + <td>{{Spec2("Subresource Integrity")}}</td> + <td><code>require-sri-for</code> ãè¿œå ã</td> + </tr> + <tr> + <td>{{specName("Upgrade Insecure Requests")}}</td> + <td>{{Spec2("Upgrade Insecure Requests")}}</td> + <td><code>upgrade-insecure-requests</code> ãè¿œå ã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1")}}</td> + <td>{{Spec2("CSP 1.1")}}</td> + <td><code>base-uri</code>, <code>child-src</code>, <code>form-action</code>, <code>frame-ancestors</code>, <code>plugin-types</code>, <code>referrer</code>, <code>report-uri</code> ãè¿œå ã <code>frame-src</code> ãéæšå¥šåã</td> + </tr> + <tr> + <td>{{specName("CSP 1.0")}}</td> + <td>{{Spec2("CSP 1.0")}}</td> + <td><code>connect-src</code>, <code>default-src</code>, <code>font-src</code>, <code>frame-src</code>, <code>img-src</code>, <code>media-src</code>, <code>object-src</code>, report-uri, <code>sandbox</code>, <code>script-src,</code>, <code>style-src</code> ãå®çŸ©ã</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp.Content-Security-Policy")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy-Report-Only")}}</li> + <li><a href="/ja/docs/Web/HTTP/CSP">ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒãåŠã¶</a></li> + <li><a href="/ja/docs/Mozilla/Add-ons/WebExtensions/Content_Security_Policy">WebExtensions ã®ã³ã³ãã³ãã»ãã¥ãªãã£</a></li> + <li><a href="https://csp.withgoogle.com/docs/strict-csp.html">Adopting a strict policy</a></li> + <li><a href="https://github.com/google/csp-evaluator">CSP Evaluator</a> - ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒãè©äŸ¡ãã</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/manifest-src/index.html b/files/ja/web/http/headers/content-security-policy/manifest-src/index.html new file mode 100644 index 0000000000..e5678daf69 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/manifest-src/index.html @@ -0,0 +1,95 @@ +--- +title: 'CSP: manifest-src' +slug: Web/HTTP/Headers/Content-Security-Policy/manifest-src +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Manifest + - Reference + - Security + - manifest-src + - source + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã + - ãããã§ã¹ã +translation_of: Web/HTTP/Headers/Content-Security-Policy/manifest-src +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}}<code>: <strong>manifest-src</strong></code> ãã£ã¬ã¯ãã£ãã¯ãã©ã®<a href="/ja/docs/Web/Manifest">ãããã§ã¹ã</a>ããªãœãŒã¹ã«é©çšãããããæå®ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>3</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} ã«ãã代æ¿</th> + <td>ããããã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠<code>default-src</code> ãã£ã¬ã¯ãã£ããæ¢ããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>manifest-src</code> ããªã·ãŒã«ã¯ã1ã€ä»¥äžã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy: manifest-src <source>; +Content-Security-Policy: manifest-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("/ja/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src", "Sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Violation_cases" name="Violation_cases">éåäŸ</h3> + +<p>ãã® CSP ããããŒãããå Žåã</p> + +<pre class="brush: bash">Content-Security-Policy: manifest-src https://example.com/</pre> + +<p>以äžã® {{HTMLElement("link")}} ã®åèŠçŽ ã¯ãããã¯ãããèªã¿èŸŒãŸããŸããã</p> + +<pre class="brush: html"><link rel="manifest" href="https://not-example.com/manifest"></pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-manifest-src", "manifest-src")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.manifest-src")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li><a href="/ja/docs/Web/Manifest">ãŠã§ãã¢ããªãããã§ã¹ã</a></li> + <li>{{HTMLElement("link")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/media-src/index.html b/files/ja/web/http/headers/content-security-policy/media-src/index.html new file mode 100644 index 0000000000..a3d3caf71e --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/media-src/index.html @@ -0,0 +1,103 @@ +--- +title: 'CSP: media-src' +slug: Web/HTTP/Headers/Content-Security-Policy/media-src +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Media + - Reference + - Security + - media-src + - source + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã + - ã¡ãã£ã¢ +translation_of: Web/HTTP/Headers/Content-Security-Policy/media-src +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã«ããã <code><strong>media-src</strong></code> ãã£ã¬ã¯ãã£ãã¯ã {{HTMLElement("audio")}} ããã³ {{HTMLElement("video")}} èŠçŽ ã䜿çšããŠèªã¿èŸŒãã¡ãã£ã¢ã®æå¹ãªãœãŒã¹ãæå®ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>1</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} ã«ãã代æ¿</th> + <td>ããããã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠<code>default-src</code> ãã£ã¬ã¯ãã£ããæ¢ããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>media-src</code> ããªã·ãŒã«ã¯ã1ã€ä»¥äžã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy: media-src <source>; +Content-Security-Policy: media-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("/ja/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src", "Sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Violation_cases" name="Violation_cases">éåäŸ</h3> + +<p>ãã® CSP ããããŒãããå Žåã</p> + +<pre class="brush: bash">Content-Security-Policy: media-src https://example.com/</pre> + +<p>以äžã® {{HTMLElement("audio")}}, {{HTMLElement("video")}}, {{HTMLElement("track")}} ã®åèŠçŽ ã¯ãããã¯ãããèªã¿èŸŒãŸããŸããã</p> + +<pre class="brush: html"><audio src="https://not-example.com/audio"></audio> + +<video src="https://not-example.com/video"> + <track kind="subtitles" src="https://not-example.com/subtitles"> +</video></pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-media-src", "media-src")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>å€æŽãªã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-media-src", "media-src")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.media-src")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTMLElement("audio")}}, {{HTMLElement("video")}}, {{HTMLElement("track")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/object-src/index.html b/files/ja/web/http/headers/content-security-policy/object-src/index.html new file mode 100644 index 0000000000..ebff246395 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/object-src/index.html @@ -0,0 +1,105 @@ +--- +title: 'CSP: object-src' +slug: Web/HTTP/Headers/Content-Security-Policy/object-src +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Object + - Reference + - Security + - object-src + - source + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã +translation_of: Web/HTTP/Headers/Content-Security-Policy/object-src +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} ã® <code><strong>object-src</strong></code> ãã£ã¬ã¯ãã£ãã¯ã {{HTMLElement("object")}}, {{HTMLElement("embed")}}, {{HTMLElement("applet")}} ã®åèŠçŽ ã®åŠ¥åœãªãœãŒã¹ãæå®ããŸãã</p> + +<p>{{HTMLElement("object")}}, {{HTMLElement("embed")}}, {{HTMLElement("applet")}} ã®åèŠçŽ ã®èš±å¯ãããçš®é¡ãèšå®ããã«ã¯ã {{CSP("plugin-types")}} ãã£ã¬ã¯ãã£ãã䜿çšããŠãã ããã</p> + +<p class="note"><code>object-src</code> ã§å¶åŸ¡ãããèŠçŽ ã¯ãããããå¶ç¶ã«ãå€ã HTML èŠçŽ ãšèŠãªãããŠãããæ°ããæšæºæ©èœãæèŒãããŠããŸãã (<code><iframe></code> ã® <code>sandbox</code> ã <code>allow</code> ãªã©ã®ã»ãã¥ãªãã£å±æ§ãªã©)ããããã£ãŠããã®ãã§ãããã£ã¬ã¯ãã£ãã§å¶éããããšã<a href="https://csp.withgoogle.com/docs/strict-csp.html">æšå¥šããŸã</a> (äŸãã°ãå¯èœã§ããã°æ瀺çã« <code>object-src 'none'</code> ãèšå®ãããªã©)ã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>1</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} ã«ãã代æ¿</th> + <td>ããããã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠<code>default-src</code> ãã£ã¬ã¯ãã£ããæ¢ããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p>object-src ããªã·ãŒã«ã¯ãïŒã€ãŸãã¯è€æ°ã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy: object-src <source>; +Content-Security-Policy: object-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("/ja/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src", "Sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Violation_case" name="Violation_case">éåäŸ</h3> + +<p>ãã® CSP ããããŒãããå Žåã</p> + +<pre class="brush: bash">Content-Security-Policy: object-src https://example.com/</pre> + +<p>以äžã® {{HTMLElement("object")}}, {{HTMLElement("embed")}}, {{HTMLElement("applet")}} ã®åèŠçŽ ã¯ãããã¯ãããèªã¿èŸŒãŸããŸããã</p> + +<pre class="brush: html"><embed src="https://not-example.com/flash"></embed> +<object data="https://not-example.com/plugin"></object> +<applet archive="https://not-example.com/java"></applet></pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-object-src", "object-src")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>å€æŽãªã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-object-src", "object-src")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.object-src")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTMLElement("object")}}, {{HTMLElement("embed")}}, and {{HTMLElement("applet")}}</li> + <li>{{CSP("plugin-types")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/plugin-types/index.html b/files/ja/web/http/headers/content-security-policy/plugin-types/index.html new file mode 100644 index 0000000000..e0c4814eff --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/plugin-types/index.html @@ -0,0 +1,123 @@ +--- +title: 'CSP: plugin-types' +slug: Web/HTTP/Headers/Content-Security-Policy/plugin-types +tags: + - CSP + - Content-Security-Policy + - Directive + - Flash + - HTTP + - Java + - Plugin + - Plugins + - Security + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã + - ãã©ã°ã€ã³ +translation_of: Web/HTTP/Headers/Content-Security-Policy/plugin-types +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã® <code><strong>plugin-types</strong></code> ãã£ã¬ã¯ãã£ãã¯ãææžã«åã蟌ãããšãã§ãããã©ã°ã€ã³ã®ã»ããããèªã¿èŸŒãããšãã§ãããªãœãŒã¹ã®çš®é¡ãå¶éããããšã«ãã£ãŠå¶éããŸãã</p> + +<p>{{HTMLElement("embed")}}, {{HTMLElement("object")}}, {{HTMLElement("applet")}} ã®åèŠçŽ ã®ã€ã³ã¹ã¿ã³ã¹åã¯ã次ã®å Žåã«å€±æããŸãã</p> + +<ul> + <li>èŠçŽ ã劥åœãª MIME åã宣èšããŠããªãã£ãå Žå</li> + <li>宣èšãããåã <code>plugin-types</code> ãã£ã¬ã¯ãã£ãã§æå®ããããã®ã®ãããã«ãäžèŽããªãã£ãå Žå</li> + <li>èªã¿èŸŒãŸãããªãœãŒã¹ã宣èšãããåã«äžèŽããªãã£ãå Žå</li> +</ul> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>2</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Document directive", "ææžãã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} ã«ãã代æ¿</th> + <td>ãªãããããèšå®ããªããšäœãèš±å¯ãããªãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p>1ã€ä»¥äžã® <a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME å</a>ã <code>plugin-types</code> ããªã·ãŒã«èšå®ããããšãã§ããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy: plugin-types <type>/<subtype>; +Content-Security-Policy: plugin-types <type>/<subtype> <type>/<subtype>; +</pre> + +<dl> + <dt><type>/<subtype></dt> + <dd>劥åœãª <a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types">MIME å</a>ã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Disallowing_plugins" name="Disallowing_plugins">ãã©ã°ã€ã³ãäžèš±å¯ã«ãã</h3> + +<p>å
šãŠã®ãã©ã°ã€ã³ãäžèš±å¯ã«ããã«ã¯ã {{CSP("object-src")}} ãã£ã¬ã¯ãã£ãã <code>'none'</code> ã«èšå®ããã°ãã©ã°ã€ã³ãäžèš±å¯ã«ãªããŸãã <code>plugin-types</code> ãã£ã¬ã¯ãã£ãã¯ã <code>object-src</code> ã§ãã©ã°ã€ã³ãèš±å¯ããŠããå Žåã«éã£ãŠäœ¿çšããããšãã§ããŸãã</p> + +<pre class="brush: html"><meta http-equiv="Content-Security-Policy" content="object-src 'none'"></pre> + +<h3 id="Allowing_Flash_content" name="Allowing_Flash_content">Flash ã³ã³ãã³ãã®èš±å¯</h3> + +<p>以äžã®ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒã¯ã</p> + +<pre class="brush: bash">Content-Security-Policy: plugin-types application/x-shockwave-flash</pre> + +<p>次ã®ãã㪠Flash ãªããžã§ã¯ãã®èªã¿èŸŒã¿ãèš±å¯ããŸãã</p> + +<pre class="brush: html"><object data="https://example.com/flash" type="application/x-shockwave-flash"></object></pre> + +<h3 id="Allowing_Java_applets" name="Allowing_Java_applets">Java ã¢ãã¬ããã®èš±å¯</h3> + +<p>{{HTMLElement("applet")}} ãèªã¿èŸŒãã«ã¯ã <code>application/x-java-applet</code> ãæå®ããå¿
èŠããããŸãã</p> + +<pre class="brush: bash">Content-Security-Policy: plugin-types application/x-java-applet</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-plugin-types", "plugin-types")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>å€æŽãªã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-plugin-types", "plugin-types")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.plugin-types")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}: {{CSP("object-src")}}</li> + <li>{{HTMLElement("object")}}</li> + <li>{{HTMLElement("embed")}}</li> + <li>{{HTMLElement("applet")}}</li> + <li>{{HTTPHeader("X-Content-Type-Options")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/prefetch-src/index.html b/files/ja/web/http/headers/content-security-policy/prefetch-src/index.html new file mode 100644 index 0000000000..27365cada8 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/prefetch-src/index.html @@ -0,0 +1,89 @@ +--- +title: 'CSP: prefetch-src' +slug: Web/HTTP/Headers/Content-Security-Policy/prefetch-src +tags: + - CSP + - Content Security Policy + - Directive + - HTTP + - Reference + - prefetch-src + - ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒ + - ãã£ã¬ã¯ãã£ã +translation_of: Web/HTTP/Headers/Content-Security-Policy/prefetch-src +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã«ããã <code><strong>prefetch-src</strong></code> ãã£ã¬ã¯ãã£ãã¯ãäºåèªã¿èŸŒã¿ãŸãã¯äºåæç»ããããšãã§ããæå¹ãªãªãœãŒã¹ãæå®ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>3</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} fallback</th> + <td>ããããã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠<code>default-src</code> ãã£ã¬ã¯ãã£ããæ¢ããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>prefetch-src</code> ããªã·ãŒã«ã¯ã1ã€ä»¥äžã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy: prefetch-src <source>; +Content-Security-Policy: prefetch-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("/ja/docs/Web/HTTP/Headers/Content-Security-Policy/default-src", "common_sources")}}</p> + +<h2 id="Example" name="Example">äŸ</h2> + +<h3 id="Prefetch_resources_do_not_match_header" name="Prefetch_resources_do_not_match_header">ããããŒãäžèŽããªããªãœãŒã¹ã®äºåèªã¿èŸŒã¿</h3> + +<p>次ã®ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒãæã€ããŒãžããã£ããšããŸãã</p> + +<pre>Content-Security-Policy: prefetch-src https://example.com/ +</pre> + +<p>次ã®ã³ãŒãã§èªã¿èŸŒãããšãããšãæå®ããã URL ã <code>prefetch-src</code> ã®ãœãŒã¹äžèŠ§ã«ãªãã®ã§ããããã¯ãŒã¯ãšã©ãŒã«ãªããŸãã</p> + +<pre><link rel="prefetch" src="https://example.org/"></link> +<link rel="prerender" src="https://example.org/"></link></pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#prefetch-src", "prefetch-src")}}</td> + <td>{{Spec2("CSP 3.0")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.prefetch-src")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/referrer/index.html b/files/ja/web/http/headers/content-security-policy/referrer/index.html new file mode 100644 index 0000000000..faa4078d95 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/referrer/index.html @@ -0,0 +1,61 @@ +--- +title: 'CSP: referrer' +slug: Web/HTTP/Headers/Content-Security-Policy/referrer +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Obsolete + - Reference + - Security + - referrer +translation_of: Web/HTTP/Headers/Content-Security-Policy/referrer +--- +<div>{{HTTPSidebar}} {{deprecated_header}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã® <code><strong>referrer</strong></code> ãã£ã¬ã¯ãã£ãã¯ãããŒãžããé¢ãããªã³ã¯ã® {{HTTPHeader("Referer")}} ããã㌠(å
ã®ä»æ§æžã®ç¶Žããã¹ã®ãã <code>r</code> ã¯åäž) ã®æ
å ±ãæå®ããããã«äœ¿çšãããŸãããã® API ã¯éæšå¥šã§ããããã©ãŠã¶ãŒããåé€ãããŸããã</p> + +<div class="note"> +<p>代ããã« {{HTTPHeader("Referrer-Policy")}} ããããŒã䜿çšããŠãã ããã</p> +</div> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Content-Security-Policy: referrer <referrer-policy>;</pre> + +<p><code><referrer-policy></code> ã¯ä»¥äžã®ããããã®å€ã«ãªããŸã:</p> + +<dl> + <dt>"no-referrer"</dt> + <dd>{{HTTPHeader("Referer")}} ããããŒã¯å®å
šã«é€å€ãããŸãããªãã¡ã©ãŒæ
å ±ã¯ãªã¯ãšã¹ããšå
±ã«éä¿¡ãããŸããã</dd> + <dt>"none-when-downgrade"</dt> + <dd>ãããããªã·ãŒãæå®ãããŠããªãå Žåã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®æ¢å®ã®åäœã§ãã以åãšåãå®å
šæ§ (HTTPS->HTTPS) ã®å®å
ã«ã¯ãªãªãžã³ãéä¿¡ãããŸãããå®å
šæ§ã®äœãå®å
(HTTPS->HTTP) ã«ã¯éä¿¡ãããŸããã</dd> + <dt>"origin"</dt> + <dd>ãã¹ãŠã®å Žåã§ããªãã¡ã©ãŒãšããŠææžã®ã®ãªãªãžã³ã®ã¿éä¿¡ãããŸãã<br> + <code>https://example.com/page.html</code> ã®ææžã®å Žå㯠<code>https://example.com/</code> ãšãããªãã¡ã©ãŒãéä¿¡ãããŸãã</dd> + <dt>"origin-when-cross-origin" / "origin-when-crossorigin"</dt> + <dd>åäžãªãªãžã³ã®ãªã¯ãšã¹ããå®è¡ããéã¯å®å
šãª URL ãéä¿¡ãããŸããããã以å€ã®å Žåã¯ææžã®ãªãªãžã³ã®ã¿éä¿¡ãããŸãã</dd> + <dt>"unsafe-url"</dt> + <dd>åäžãªãªãžã³ãŸãã¯ãªãªãžã³éã®ãªã¯ãšã¹ããå®è¡ããéã¯å®å
šãª URL (åŒæ°ã¯é€å€) ãéä¿¡ãããŸãããã®ããªã·ãŒã¯ã TLS ã§ä¿è·ããããªãœãŒã¹ããä¿è·ãããŠããªããªãªãžã³ãžã®ãªãªãžã³ãšãã¹ãæŒæŽ©ãããŸãããã®èšå®ã®åœ±é¿ãæ
éã«æ€èšããŠãã ããã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Content-Security-Policy: referrer "none";</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<p>ãããã®ä»æ§æžã®äžéšã§ããããŸããã</p> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>{{Compat("http.headers.csp.referrer")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTTPHeader("Referrer-Policy")}} ããããŒ</li> + <li>{{HTTPHeader("Referer")}} ããããŒ</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/report-to/index.html b/files/ja/web/http/headers/content-security-policy/report-to/index.html new file mode 100644 index 0000000000..dc2c8d4546 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/report-to/index.html @@ -0,0 +1,83 @@ +--- +title: 'CSP: report-to' +slug: Web/HTTP/Headers/Content-Security-Policy/report-to +tags: + - CSP + - Content-Security-Policy + - HTTP + - report-to + - ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒ + - ã»ãã¥ãªã㣠+ - ã¬ã¹ãã³ã¹ããã㌠+ - å ±å +translation_of: Web/HTTP/Headers/Content-Security-Policy/report-to +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><code>Content-Security-Policy</code> ã® <dfn><code>Report-To</code></dfn> 㯠HTTP ã®ã¬ã¹ãã³ã¹ããããŒãã£ãŒã«ãã§ããŠãŒã¶ãŒãšãŒãžã§ã³ãã«ãªãªãžã³ã®å ±åå
ã®ãšã³ããã€ã³ããä¿åããããæ瀺ããŸãã</span></p> + +<pre class="syntaxbox">Content-Security-Policy: ...; report-to groupname +</pre> + +<p>ãã®ãã£ã¬ã¯ãã£ãã¯åäœã§ã¯å¹æããããŸããããä»ã®ãã£ã¬ã¯ãã£ããšã®çµã¿åããã§ã®ã¿æå³ãæã¡ãŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP version</th> + <td>1</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Reporting directive", "å ±åãã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th colspan="2" scope="row">ãã®ãã£ã¬ã¯ãã£ã㯠{{HTMLElement("meta")}} èŠçŽ ã§ã¯å¯Ÿå¿ããŠããŸããã</th> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre>Content-Security-Policy: report-to <json-field-value>;</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>詳ããæ
å ±ãäŸã¯ã {{HTTPHeader("Content-Security-Policy-Report-Only")}} ãåç
§ããŠãã ããã</p> + +<pre><a href="http://wicg.github.io/reporting/#report-to" id="ref-for-report-toâ ">Report-To</a>: { "<a href="http://wicg.github.io/reporting/#group" id="ref-for-groupâ ">group</a>": "csp-endpoint", + "<a href="http://wicg.github.io/reporting/#max-age" id="ref-for-max-ageâ ">max_age</a>": 10886400, + "<a href="http://wicg.github.io/reporting/#endpoints" id="ref-for-endpointsâ¡">endpoints</a>": [ + { "<a href="http://wicg.github.io/reporting/#url" id="ref-for-urlâ¡">url</a>": "https://example.com/csp-reports" } + ] }, + { "<a href="http://wicg.github.io/reporting/#group" id="ref-for-groupâ¡">group</a>": "hpkp-endpoint", + "<a href="http://wicg.github.io/reporting/#max-age" id="ref-for-max-ageâ¡">max_age</a>": 10886400, + "<a href="http://wicg.github.io/reporting/#endpoints" id="ref-for-endpointsâ¢">endpoints</a>": [ + { "<a href="http://wicg.github.io/reporting/#url" id="ref-for-urlâ¢">url</a>": "https://example.com/hpkp-reports" } + ] } +<a href="https://w3c.github.io/webappsec-csp/#content-security-policy" id="ref-for-content-security-policyâ ">Content-Security-Policy</a>: ...; <a href="https://w3c.github.io/webappsec-csp/#directives-reporting" id="ref-for-directives-reportingâ ">report-to</a> csp-endpoint +</pre> + +<pre><a href="http://wicg.github.io/reporting/#report-to" id="ref-for-report-to">Report-To</a>: { "<a href="http://wicg.github.io/reporting/#group" id="ref-for-group">group</a>": "endpoint-1", + "<a href="http://wicg.github.io/reporting/#max-age" id="ref-for-max-age">max_age</a>": 10886400, + "<a href="http://wicg.github.io/reporting/#endpoints" id="ref-for-endpointsâ ">endpoints</a>": [ + { "<a href="http://wicg.github.io/reporting/#url" id="ref-for-url">url</a>": "https://example.com/reports" }, + { "<a href="http://wicg.github.io/reporting/#url" id="ref-for-urlâ ">url</a>": "https://backup.com/reports" } + ] } + +<a href="https://w3c.github.io/webappsec-csp/#content-security-policy" id="ref-for-content-security-policy">Content-Security-Policy</a>: ...; <a href="https://w3c.github.io/webappsec-csp/#directives-reporting" id="ref-for-directives-reporting">report-to</a> endpoint-1</pre> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden"> +<p>ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> +</div> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.report-to")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTTPHeader("Content-Security-Policy-Report-Only")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/require-sri-for/index.html b/files/ja/web/http/headers/content-security-policy/require-sri-for/index.html new file mode 100644 index 0000000000..be2bc8edd9 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/require-sri-for/index.html @@ -0,0 +1,59 @@ +--- +title: 'CSP: require-sri-for' +slug: Web/HTTP/Headers/Content-Security-Policy/require-sri-for +tags: + - CSP + - Directive + - HTTP + - Reference + - Security + - Subresource Integrity + - require-sri-for +translation_of: Web/HTTP/Headers/Content-Security-Policy/require-sri-for +--- +<div>{{Obsolete_header}}</div> + +<p><a href="/ja/docs/Web/HTTP">HTTP</a> ã® {{HTTPHeader("Content-Security-Policy")}} ã«ããã <code><strong>require-sri-for</strong></code> ãã£ã¬ã¯ãã£ãã¯ãã¯ã©ã€ã¢ã³ãã«ããŒãžäžã§ã¹ã¯ãªãããã¹ã¿ã€ã«ã®<a href="/ja/docs/Web/Security/Subresource_Integrity">ãµããªãœãŒã¹å®å
šæ§</a>ãèŠæ±ããããšãæ¯æããŸãã</p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Content-Security-Policy: require-sri-for script; +Content-Security-Policy: require-sri-for style; +Content-Security-Policy: require-sri-for script style; +</pre> + +<dl> + <dt><code>script</code></dt> + <dd>{{Glossary("SRI")}} ãã¹ã¯ãªããã«èŠæ±ããŸãã</dd> + <dt><code>style</code></dt> + <dd>{{Glossary("SRI")}} ãã¹ã¿ã€ã«ã·ãŒãã«èŠæ±ããŸãã</dd> + <dt><code>script style</code></dt> + <dd>{{Glossary("SRI")}} ãã¹ã¯ãªãããšã¹ã¿ã€ã«ã·ãŒãã®äž¡æ¹ã«èŠæ±ããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>ãã®ãã£ã¬ã¯ãã£ãã䜿ã£ãŠã¹ã¯ãªãããã¹ã¿ã€ã«ã« SRI ãèŠæ±ããããã«ãµã€ããèšå®ããŠããå Žåã®èšå®ã§ãã</p> + +<pre class="notranslate">Content-Security-Policy: require-sri-for script style</pre> + +<p>以äžã®ãã㪠{{HTMLElement("script")}} èŠçŽ ã¯æ£ãã <code>integrity</code> å±æ§ã䜿çšããŠããå Žåã«éããèªã¿èŸŒãŸããŸãã</p> + +<pre class="brush: html; example-good notranslate"><script src="https://code.jquery.com/jquery-3.1.1.slim.js" + integrity="sha256-5i/mQ300M779N2OVDrl16lbohwXNUdzL/R2aVUXyXWA=" + crossorigin="anonymous"></script></pre> + +<p>ãããã <code>integrity</code> ã®ãªãã¹ã¯ãªããã¯èªã¿èŸŒãŸããªããªããŸãã</p> + +<pre class="brush: html; example-bad notranslate"><script src="https://code.jquery.com/jquery-3.1.1.slim.js"></script></pre> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.require-sri-for")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li><a href="/ja/docs/Web/Security/Subresource_Integrity">ãµããªãœãŒã¹å®å
šæ§</a></li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/sandbox/index.html b/files/ja/web/http/headers/content-security-policy/sandbox/index.html new file mode 100644 index 0000000000..dbb381f9d4 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/sandbox/index.html @@ -0,0 +1,113 @@ +--- +title: 'CSP: sandbox' +slug: Web/HTTP/Headers/Content-Security-Policy/sandbox +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Sandbox + - Security + - ãµã³ãããã¯ã¹ + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã +translation_of: Web/HTTP/Headers/Content-Security-Policy/sandbox +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã® <code><strong>sandbox</strong></code> ãã£ã¬ã¯ãã£ãã¯ã {{HTMLElement("iframe")}} ã® {{htmlattrxref("sandbox", "iframe")}} å±æ§ãšåæ§ã«ãèŠæ±ããããªãœãŒã¹ã«å¯ŸããŠãµã³ãããã¯ã¹ãæå¹ã«ããŸããããã¯ããããã¢ããã®é²æ¢ããã©ã°ã€ã³ãã¹ã¯ãªããã®å®è¡ã®é²æ¢ãåäžãªãªãžã³ããªã·ãŒã®åŒ·å¶ãªã©ãå«ãããŒãžæäœã®å¶éãé©çšããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>1.1 / 2</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Document directive", "ææžãã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th colspan="2" scope="row">ãã®ãã£ã¬ã¯ãã£ã㯠{{HTMLElement("meta")}} èŠçŽ ã {{HTTPHeader("Content-Security-policy-Report-Only")}} ããããŒãã£ãŒã«ãã§ã¯å¯Ÿå¿ããŠããŸããã</th> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Content-Security-Policy: sandbox; +Content-Security-Policy: sandbox <value>; +</pre> + +<p><code><value></code> ã¯çç¥å¯èœã§ã以äžã®å€ã®å
ã®äžã€ã§ãã</p> + +<dl> + <dt><code>allow-downloads-without-user-activation</code> {{experimental_inline}}</dt> + <dd>ãŠãŒã¶ãŒã«ããæ瀺ã®ãªãããŠã³ããŒããèš±å¯ããŸãã</dd> +</dl> + +<dl> + <dt><code>allow-forms</code></dt> + <dd>åã蟌ã¿é²èŠ§ã³ã³ããã¹ããããã©ãŒã ãéä¿¡ããããšãèš±å¯ããŸãããã®ããŒã¯ãŒãã䜿çšãããªãã£ãå Žåããã®æäœã¯èš±å¯ãããŸããã</dd> + <dt><code>allow-modals</code></dt> + <dd>åã蟌ã¿é²èŠ§ã³ã³ããã¹ãããã¢ãŒãã«ãŠã£ã³ããŠãéãããšãèš±å¯ããŸãã</dd> + <dt><code>allow-orientation-lock</code></dt> + <dd>åã蟌ã¿é²èŠ§ã³ã³ããã¹ãããç»é¢ã®åããããã¯ããæ©èœãç¡å¹åããããšãèš±å¯ããŸãã</dd> + <dt><code>allow-pointer-lock</code></dt> + <dd>åã蟌ã¿é²èŠ§ã³ã³ããã¹ããã <a href="/ja/docs/WebAPI/Pointer_Lock">Pointer Lock API</a> ã䜿çšããããšãèš±å¯ããŸãã</dd> + <dt><code>allow-popups</code></dt> + <dd>ãããã¢ãã (<code>window.open</code>, <code>target="_blank"</code>, <code>showModalDialog</code> ãªã©ã«ãããã®) ãèš±å¯ããŸãããã®ããŒã¯ãŒãã䜿çšãããªãã£ãå Žåããã®æ©èœã¯æé»ã«å€±æããŸãã</dd> + <dt><code>allow-popups-to-escape-sandbox</code></dt> + <dd>ãµã³ãããã¯ã¹åãããææžãããµã³ãããã¯ã¹ãã©ã°ã匷å¶ããããšãªãæ°ãããŠã£ã³ããŠãéãããšãèš±å¯ããŸããããã«ãã£ãŠãäŸãã°ããµãŒãããŒãã£ã®åºåãå®å
šã«ãµã³ãããã¯ã¹åãããäžæ¹ãã©ã³ãã£ã³ã°ããŒãžã«ã¯åãå¶éã匷å¶ãããªããªããŸãã</dd> + <dt><code>allow-presentation</code></dt> + <dd>åã蟌ã¿ãè¡ã£ãè
ãã iframe ããã¬ãŒã³ããŒã·ã§ã³ã»ãã·ã§ã³ãéå§ã§ãããã©ãããå¶åŸ¡ã§ããããã«ãªããŸãã</dd> + <dt><code>allow-same-origin</code></dt> + <dd>ã³ã³ãã³ããéåžžã®ãªãªãžã³ããã®ãã®ãšããŠæ±ãããããšãèš±å¯ããŸãããã®ããŒã¯ãŒãã䜿çšãããªãã£ãå Žåã¯ãåã蟌ãŸããã³ã³ãã³ãã¯ç¬èªã®ãªãªãžã³ããã®ãã®ãšããŠæ±ãããŸãã</dd> + <dt><code>allow-scripts</code></dt> + <dd>åã蟌ã¿é²èŠ§ã³ã³ããã¹ããã¹ã¯ãªãããå®è¡ããããšãèš±å¯ããŸã (ãããã¢ãããŠã£ã³ããŠã®çæãé€ã)ããã®ããŒã¯ãŒãã䜿çšãããªãã£ãå Žåã¯ããã®æäœã¯èš±å¯ãããŸããã</dd> + <dt><code>allow-storage-access-by-user-activation</code> {{experimental_inline}}</dt> + <dd>ãªãœãŒã¹ã芪ã®ã¹ãã¬ãŒãžæ©èœã« <a href="/ja/docs/Web/API/Storage_Access_API">Storage Access API</a> ã§ã¢ã¯ã»ã¹ãèŠæ±ã§ããããã«ããŸãã</dd> + <dt><code>allow-top-navigation</code></dt> + <dd>åã蟌ã¿é²èŠ§ã³ã³ããã¹ãããæäžäœã®é²èŠ§ã³ã³ããã¹ãã移åããã (èªã¿èŸŒãŸãã) ããšãèš±å¯ããŸãããã®ããŒã¯ãŒãã䜿çšãããªãã£ãå Žåããã®æäœã¯èš±å¯ãããŸããã</dd> + <dt><code>allow-top-navigation-by-user-activation</code></dt> + <dd>ãŠãŒã¶ãŒã®æ瀺ã§éå§ãããå Žåã«éãããªãœãŒã¹ãæäžäœã®é²èŠ§ã³ã³ããã¹ãã移åãããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="brush: bash">Content-Security-Policy: sandbox allow-scripts;</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + <tr> + <td>{{specName("CSP 3.0", "#directive-sandbox", "sandbox")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>å€æŽãªã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-sandbox", "sandbox")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.sandbox")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTMLElement("iframe")}} èŠçŽ ã® {{htmlattrxref("sandbox", "iframe")}} å±æ§</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/script-src-elem/index.html b/files/ja/web/http/headers/content-security-policy/script-src-elem/index.html new file mode 100644 index 0000000000..8dd1e35631 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/script-src-elem/index.html @@ -0,0 +1,98 @@ +--- +title: 'CSP: script-src-elem' +slug: Web/HTTP/Headers/Content-Security-Policy/script-src-elem +tags: + - CSP + - Content + - Content-Security-Policy + - Directive + - HTTP + - Reference + - Script + - Security + - script-src + - source +translation_of: Web/HTTP/Headers/Content-Security-Policy/script-src-elem +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã«ããã <strong><code>script-src-elem</code></strong> ãã£ã¬ã¯ãã£ãã¯ã JavaScript ã® {{HTMLElement("script")}} èŠçŽ ã®æå¹ãªãœãŒã¹ãæå®ããŸããã <code>onclick</code> ã®ãããªã€ã³ã©ã€ã³ã¹ã¯ãªããã®ã€ãã³ããã³ãã©ãŒã¯æå®ããŸããã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>3</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} ã«ãã代æ¿</th> + <td>ããããã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠{{CSP("script-src")}} ãã£ã¬ã¯ãã£ããæ¢ããäž¡æ¹ãšããªãå Žåã¯ã <code>default-src</code> ãã£ã¬ã¯ãã£ãã§ä»£æ¿ããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>script-src-elem</code> ããªã·ãŒã«ã¯ãïŒã€ãŸãã¯è€æ°ã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox notranslate">Content-Security-Policy: script-src-elem <source>; +Content-Security-Policy: script-src-elem <source> <source>; +</pre> + +<p><code>script-src-elem</code> 㯠{{CSP("script-src")}} ãšã®çµã¿åããã§äœ¿çšããããšãã§ããŸãã</p> + +<pre class="syntaxbox notranslate">Content-Security-Policy: script-src <source>; +Content-Security-Policy: script-src-elem <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("/ja/docs/Web/HTTP/Headers/Content-Security-Policy/default-src", "Sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Fallback_to_script-src" name="Fallback_to_script-src">script-src ãžã®ãã©ãŒã«ããã¯</h3> + +<p><code>script-src-elem</code> ååšããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠{{CSP("script-src")}} ãã£ã¬ã¯ãã£ãã§ä»£æ¿ãããã¡ããåæ§ã«ãªãå Žåã¯ã {{CSP("default-src")}} ã§ä»£æ¿ããŸãã</p> + +<div class="hidden"> +<p>TODO: Add comprehensive examples.</p> +</div> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-script-src-elem", "script-src-elem")}}</td> + <td>{{Spec2("CSP 3.0")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.script-src-elem")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTMLElement("script")}}</li> + <li>{{CSP("script-src")}}</li> + <li>{{CSP("script-src-attr")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/script-src/index.html b/files/ja/web/http/headers/content-security-policy/script-src/index.html new file mode 100644 index 0000000000..f5eaee0890 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/script-src/index.html @@ -0,0 +1,176 @@ +--- +title: 'CSP: script-src' +slug: Web/HTTP/Headers/Content-Security-Policy/script-src +tags: + - CSP + - Content + - Content-Security-Policy + - Directive + - HTTP + - Reference + - Script + - Security + - script-src + - source +translation_of: Web/HTTP/Headers/Content-Security-Policy/script-src +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã® <code><strong>script-src</strong></code> ãã£ã¬ã¯ãã£ãã¯ã JavaScript ã®æ
å ±ãªãœãŒã¹ãæå®ããŸãããã㯠{{HTMLElement("script")}} èŠçŽ ã®äžã«çŽæ¥èªã¿èŸŒãŸãã URL ã ãã§ãªããã€ã³ã©ã€ã³ã®ã¹ã¯ãªããã€ãã³ããã³ãã©ãŒ (<code>onclick</code>) ãã¹ã¯ãªããå®è¡ã®ããªã¬ãŒãšãªããã <a href="/ja/docs/Web/XSLT">XSLT ã¹ã¿ã€ã«ã·ãŒã</a>ã®ãããªãã®ãå«ãŸããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>1</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} ã«ãã代æ¿</th> + <td>ããããã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠<code>default-src</code> ãã£ã¬ã¯ãã£ããæ¢ããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>script-src</code> ããªã·ãŒã«ã¯ãïŒã€ãŸãã¯è€æ°ã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox notranslate">Content-Security-Policy: script-src <source>; +Content-Security-Policy: script-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("Web/HTTP/Headers/Content-Security-Policy/default-src", "Sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Violation_case" name="Violation_case">éåäŸ</h3> + +<p>ãã® CSP ããããŒãããå Žåã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: script-src https://example.com/</pre> + +<p>以äžã®ã¹ã¯ãªããã¯ãããã¯ãããèªã¿èŸŒã¿ãå®è¡ãè¡ãããŸããã</p> + +<pre class="brush: html notranslate"><script src="https://not-example.com/js/library.js"></script></pre> + +<p>ãªããã€ã³ã©ã€ã³ã®ã€ãã³ããã³ãã©ãŒãåæ§ã«ãããã¯ãããŸãã</p> + +<pre class="brush: html notranslate"><button id="btn" onclick="doSomething()"></pre> + +<p>ããã {{domxref("EventTarget.addEventListener", "addEventListener")}} ã®åŒã³åºãã«çœ®ãæããŠãã ããã</p> + +<pre class="brush: js notranslate">document.getElementById("btn").addEventListener('click', doSomething);</pre> + +<h3 id="Unsafe_inline_script" name="Unsafe_inline_script">å®å
šã§ã¯ãªãã€ã³ã©ã€ã³ã®ã¹ã¯ãªãã</h3> + +<div class="note"> +<p><strong>泚:</strong> ã€ã³ã©ã€ã³ã¹ã¿ã€ã«ãšã€ã³ã©ã€ã³ã¹ã¯ãªãããçŠæ¢ããããšã¯ã CSP ãæäŸããæ倧ã®ã»ãã¥ãªãã£äžã®å©ç¹ã®äžã€ã§ããããããã©ãããŠã䜿çšããªããã°ãªããªãå Žåã¯ãããããèš±å¯ããä»çµã¿ãããã€ããããŸãã</p> +</div> + +<p>ã€ã³ã©ã€ã³ã¹ã¯ãªãããšã€ã³ã©ã€ã³ã®ã€ãã³ããã³ãã©ãŒãèš±å¯ããããã« <code>'unsafe-inline'</code> ããã€ã³ã©ã€ã³ãããã¯ã«äžèŽãããã³ã¹ãœãŒã¹ãŸãã¯ããã·ã¥ãœãŒã¹ãæå®ããããšãã§ããŸãã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: script-src 'unsafe-inline'; +</pre> + +<p>äžèšã®ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒã¯ãã€ã³ã©ã€ã³ã® {{HTMLElement("script")}} èŠçŽ ãèš±å¯ããŸãã</p> + +<pre class="brush: html notranslate"><script> + var inline = 1; +</script></pre> + +<p>nonce-source ã䜿çšããŠãç¹å®ã®ã€ã³ã©ã€ã³ã¹ã¯ãªãããããã¯ã®ã¿èš±å¯ããããšãã§ããŸãã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: script-src 'nonce-2726c7f26c'</pre> + +<p>åããã³ã¹ã {{HTMLElement("script")}} èŠçŽ ã«æå®ããå¿
èŠããããŸãã</p> + +<pre class="brush: html notranslate"><script nonce="2726c7f26c"> + var inline = 1; +</script></pre> + +<p>ä»ã«ããã€ã³ã©ã€ã³ã¹ã¯ãªããããããã·ã¥ãçæããããšãã§ããŸãã CSP ã§ã¯ sha256, sha384, sha512 ã«å¯Ÿå¿ããŠããŸãã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: script-src 'sha256-B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF8='</pre> + +<p>ããã·ã¥ãçæãããšãã {{HTMLElement("script")}} ã¿ã°ãå«ããªãããã«ãã倧æåå°æåãšããã¯ã€ãã¹ããŒã¹ãç¹ã«ååŸã®ãã¯ã€ãã¹ããŒã¹ã«æ³šæããŠãã ããã</p> + +<pre class="brush: html notranslate"><script>var inline = 1;</script></pre> + +<h3 id="Unsafe_eval_expressions" name="Unsafe_eval_expressions">å®å
šã§ã¯ãªã eval åŒ</h3> + +<p><code>'unsafe-eval'</code> ãœãŒã¹åŒã¯ãæååããã³ãŒããçæããããã€ãã®ã¹ã¯ãªããå®è¡ã¡ãœãããå¶åŸ¡ããŸãããã <code>'unsafe-eval'</code> ã <code>script-src</code> ãã£ã¬ã¯ãã£ãã§æå®ãããŠããªãªãã£ãå Žåã以äžã®ã¡ãœããã¯ãããã¯ãããŠäœã®å¹æãçŸããŸããã</p> + +<ul> + <li>{{jsxref("eval", "eval()")}}</li> + <li>{{jsxref("Function", "Function()")}}</li> + <li>ã¡ãœããã®æååãªãã©ã«ã <code>window.setTimeout("alert(\"Hello World!\");", 500);</code> ã®ããã«æž¡ããå Žå + <ul> + <li>{{domxref("window.setTimeout")}}</li> + <li>{{domxref("window.setInterval")}}</li> + <li>{{domxref("window.setImmediate")}}</li> + </ul> + </li> + <li>{{domxref("window.execScript")}} {{non-standard_inline}} (IE < 11 ã®ã¿)</li> +</ul> + +<h3 id="strict-dynamic" name="strict-dynamic">strict-dynamic</h3> + +<p><code>'strict-dynamic'</code> ãœãŒã¹åŒã¯ãããŒã¯ã¢ããäžã®ã¹ã¯ãªããã«æ瀺çã«äžããããä¿¡é Œãããã³ã¹ãããã·ã¥ã䌎ã£ãŠããã®ã«ãŒãã¹ã¯ãªããã«ãã£ãŠèªã¿èŸŒãŸãããã¹ãŠã®ã¹ã¯ãªããã«äŒæ¬ãããããšãæå®ããŸããåæã«ã <code>'self'</code> ã <code>'unsafe-inline'</code> ã®ãããªãã¯ã€ããªã¹ãããœãŒã¹è¡šçŸã¯ç¡èŠãããŸããäŸãã°ã <code>script-src 'strict-dynamic' 'nonce-R4nd0m' https://whitelisted.com/</code> ã®ãããªããªã·ãŒã§ã¯ã <code><script nonce="R4nd0m" src="https://example.com/loader.js"></code> ãæå®ããã«ãŒãã¹ã¯ãªããã®èªã¿èŸŒã¿ãèš±å¯ãã <code>loader.js</code> ã§èªã¿èŸŒãŸãããã¹ãŠã®ã¹ã¯ãªããã«ãã®ä¿¡é Œæ§ãäŒæãããŸããã <code>https://whitelisted.com/</code> ããã®ã¹ã¯ãªããã®èªã¿èŸŒã¿ã¯ããã³ã¹ã䌎ã£ãŠããããä¿¡é Œãããã¹ã¯ãªããããèªã¿èŸŒãŸãããã®ã§ãªãéããèš±å¯ããŸããã</p> + +<pre class="brush: bash notranslate">script-src 'strict-dynamic' 'nonce-<em>someNonce</em>'</pre> + +<p><em>ãŸãã¯</em></p> + +<pre class="brush: bash notranslate">script-src 'strict-dynamic' 'sha256-<em>base64EncodedHash</em>'</pre> + +<p>ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®ã¹ãããã£ã³ã°ãå¿
èŠãšãããåŸæ¹äºææ§ã®ããæ¹æ³ãšããŠã <code>strict-dynamic</code> ãæå®ããããšãã§ããŸãã.<br> + 以äžã®ããªã·ãŒã</p> + +<pre class="brush: bash notranslate">script-src 'unsafe-inline' https: 'nonce-abcdefg' 'strict-dynamic'</pre> + +<p>ã¯ã CSP1 ã«å¯Ÿå¿ãããã©ãŠã¶ãŒã§ã¯ <code>'unsafe-inline' https:</code> ã®ããã«åäœãã CSP2 ã«å¯Ÿå¿ãããã©ãŠã¶ãŒã§ã¯ <code>https: 'nonce-abcdefg'</code> ã®ããã«ãCSP3 ã«å¯Ÿå¿ãããã©ãŠã¶ãŒã§ã¯ <code>'nonce-abcdefg' 'strict-dynamic'</code> ã®ããã«åäœããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-script-src", "script-src")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>å€æŽãªã</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-script-src", "script-src")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.script-src")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTMLElement("script")}}</li> + <li>{{CSP("script-src-elem")}}</li> + <li>{{CSP("script-src-attr")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/style-src/index.html b/files/ja/web/http/headers/content-security-policy/style-src/index.html new file mode 100644 index 0000000000..a3af102659 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/style-src/index.html @@ -0,0 +1,180 @@ +--- +title: 'CSP: style-src' +slug: Web/HTTP/Headers/Content-Security-Policy/style-src +tags: + - CSP + - Content + - Content-Security-Policy + - Directive + - HTTP + - Reference + - Security + - Style + - source + - style-src +translation_of: Web/HTTP/Headers/Content-Security-Policy/style-src +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã® <strong><code>style-src</code></strong> ãã£ã¬ã¯ãã£ãã¯ãã¹ã¿ã€ã«ã·ãŒãã®æå¹ãªãœãŒã¹ãæå®ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>1</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">{{CSP("default-src")}} ã«ãã代æ¿</th> + <td>ããããã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ã㯠<code>default-src</code> ãã£ã¬ã¯ãã£ããæ¢ããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>style-src</code> ããªã·ãŒã«ã¯ãïŒã€ãŸãã¯è€æ°ã®ãœãŒã¹ãèš±å¯ãããŠããŸãã</p> + +<pre class="syntaxbox notranslate">Content-Security-Policy: style-src <source>; +Content-Security-Policy: style-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("/ja/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src", "Sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Violation_cases" name="Violation_cases">éåäŸ</h3> + +<p>ãã® CSP ããããŒãããå Žåã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: style-src https://example.com/</pre> + +<p>以äžã®ã¹ã¿ã€ã«ã·ãŒãã¯ãããã¯ãããèªã¿èŸŒãŸããŸããã</p> + +<pre class="brush: html notranslate"><link href="https://not-example.com/styles/main.css" rel="stylesheet" type="text/css" /> + +<style> +#inline-style { background: red; } +</style> + +<style> + @import url("https://not-example.com/styles/print.css") print; +</style></pre> + +<p>{{HTTPHeader("Link")}} ããããŒã§èªã¿èŸŒãŸãããã®ãåæ§ã§ãã</p> + +<pre class="brush: bash notranslate">Link: <https://not-example.com/styles/stylesheet.css>;rel=stylesheet +</pre> + +<p>ã€ã³ã©ã€ã³ã® style å±æ§ããããã¯ãããŸãã</p> + +<pre class="brush: html notranslate"><div style="display:none">Foo</div></pre> + +<p>JavaScript ã§çŽæ¥ <code>style</code> å±æ§ãèšå®ãããã {{domxref("CSSStyleDeclaration.cssText", "cssText")}} ãèšå®ãããããã¹ã¿ã€ã«ãåæ§ã§ãã</p> + +<pre class="brush: js notranslate">document.querySelector('div').setAttribute('style', 'display:none;'); +document.querySelector('div').style.cssText = 'display:none;';</pre> + +<p>ããããèŠçŽ ã® {{domxref("HTMLElement.style", "style")}} ããããã£ã«çŽæ¥èšå®ãããã¹ã¿ã€ã«ããããã£ã¯ãããã¯ãããã JavaScript ããå®å
šã«ã¹ã¿ã€ã«ãæäœããããšãã§ããŸãã</p> + +<pre class="brush: js notranslate">document.querySelector('div').style.display = 'none';</pre> + +<p>ãã®æã®æäœã¯ã CSP ã® {{CSP("script-src")}} ãã£ã¬ã¯ãã£ã㧠JavaScript ãç¡å¹ã«ããããšã§é²ãããšãã§ããŸãã</p> + +<h3 id="Unsafe_inline_styles" name="Unsafe_inline_styles">å®å
šã§ã¯ãªãã€ã³ã©ã€ã³ã¹ã¿ã€ã«</h3> + +<div class="note"> +<p><strong>泚:</strong> ã€ã³ã©ã€ã³ã¹ã¿ã€ã«ãšã€ã³ã©ã€ã³ã¹ã¯ãªãããçŠæ¢ããããšã¯ã CSP ãæäŸããæ倧ã®ã»ãã¥ãªãã£äžã®å©ç¹ã®äžã€ã§ããããããã©ãããŠã䜿çšããªããã°ãªããªãå Žåã¯ãããããèš±å¯ããä»çµã¿ãããã€ããããŸãã</p> +</div> + +<p>ã€ã³ã©ã€ã³ã¹ã¿ã€ã«ãèš±å¯ããããã«ã <code>'unsafe-inline'</code> ãæå®ããããã€ã³ã©ã€ã³ãããã¯ã«äžèŽãããã³ã¹ãœãŒã¹ãŸãã¯ããã·ã¥ãœãŒã¹ãæå®ããããšãã§ããŸãã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: style-src 'unsafe-inline'; +</pre> + +<p>äžèšã®ã³ã³ãã³ãã»ãã¥ãªãã£ããªã·ãŒã¯ {{HTMLElement("style")}} èŠçŽ ãããããèŠçŽ ã® <code>style</code> å±æ§ãªã©ã®ã€ã³ã©ã€ã³ã¹ã¿ã€ã«ãèš±å¯ããŸãã</p> + +<pre class="brush: html notranslate"><style> +#inline-style { background: red; } +</style> + +<div style="display:none">Foo</div> +</pre> + +<p>ãã³ã¹ãœãŒã¹ã䜿çšããŠãç¹å®ã®ã€ã³ã©ã€ã³ã¹ã¿ã€ã«ã®ã¿èš±å¯ããããšãã§ããŸãã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: style-src 'nonce-2726c7f26c'</pre> + +<p>åããã³ã¹ã {{HTMLElement("style")}} èŠçŽ ã«ãèšå®ããå¿
èŠããããŸãã</p> + +<pre class="brush: html notranslate"><style nonce="2726c7f26c"> +#inline-style { background: red; } +</style></pre> + +<p>ä»ã«ããã€ã³ã©ã€ã³ã¹ã¿ã€ã«ããããã·ã¥ãçæããããšãã§ããŸãã CSP ã§ã¯ sha256, sha384, sha512 ã«å¯Ÿå¿ããŠããŸãã</p> + +<pre class="brush: bash notranslate">Content-Security-Policy: style-src 'sha256-a330698cbe9dc4ef1fb12e2ee9fc06d5d14300262fa4dc5878103ab7347e158f'</pre> + +<p>ããã·ã¥ãçæãããšãã¯ã {{HTMLElement("style")}} ã¿ã°ãå«ããªãããã«ãã倧æåå°æåãšããã¯ã€ãã¹ããŒã¹ãç¹ã«ååŸã®ãã¯ã€ãã¹ããŒã¹ã«æ³šæããŠãã ããã</p> + +<pre class="brush: html notranslate"><style>#inline-style { background: red; }</style></pre> + +<h3 id="Unsafe_style_expressions" name="Unsafe_style_expressions">å®å
šã§ã¯ãªã style åŒ</h3> + +<p><code>'unsafe-eval'</code> ãœãŒã¹åŒã¯ãæååããã¹ã¿ã€ã«å®£èšãçæããããã€ãã®ã¹ã¿ã€ã«ã¡ãœãããå¶åŸ¡ããŸãããã <code>'unsafe-eval'</code> ã <code>style-src</code> ãã£ã¬ã¯ãã£ãã§æå®ãããŠããªãªãã£ãå Žåã以äžã®ã¡ãœããã¯ãããã¯ãããŠäœã®å¹æãçŸããŸããã</p> + +<ul> + <li>{{domxref("CSSStyleSheet.insertRule()")}}</li> + <li>{{domxref("CSSGroupingRule.insertRule()")}}</li> + <li>{{domxref("CSSStyleDeclaration.cssText")}}</li> +</ul> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-style-src", "style-src")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>No changes.</td> + </tr> + <tr> + <td>{{specName("CSP 1.1", "#directive-style-src", "style-src")}}</td> + <td>{{Spec2('CSP 1.1')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.style-src")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{CSP("style-src-elem")}}</li> + <li>{{CSP("style-src-attr")}}</li> + <li>{{HTTPHeader("Link")}} header</li> + <li>{{HTMLElement("style")}}, {{HTMLElement("link")}}</li> + <li>{{cssxref("@import")}}</li> + <li>{{domxref("CSSStyleSheet.insertRule()")}}</li> + <li>{{domxref("CSSGroupingRule.insertRule()")}}</li> + <li>{{domxref("CSSStyleDeclaration.cssText")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/trusted-types/index.html b/files/ja/web/http/headers/content-security-policy/trusted-types/index.html new file mode 100644 index 0000000000..b4ec5ee180 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/trusted-types/index.html @@ -0,0 +1,70 @@ +--- +title: 'CSP: trusted-types' +slug: Web/HTTP/Headers/Content-Security-Policy/trusted-types +tags: + - CSP + - Directive + - HTTP + - Security + - ãã£ã¬ã¯ãã£ã +translation_of: Web/HTTP/Headers/Content-Security-Policy/trusted-types +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) ã® <code><strong>trusted-types</strong></code> {{experimental_inline}} ãã£ã¬ã¯ãã£ãã¯ãæ¢ç¥ã® DOM XSS ã·ã³ã¯ã®äœ¿çšããæååã®ä»£ããã«ã¹ããŒãã£ã³ã°äžå¯èœãªåä»ãã®å€ã®ã¿ãåãå
¥ããå®çŸ©æžã¿ã®é¢æ°ã®ã»ããã«å¶éããããã«ãŠãŒã¶ãšãŒãžã§ã³ãã«æ瀺ããŸããããã«ãããäœè
㯠DOM ãžã®å€ã®æžã蟌ã¿ãå®ãã«ãŒã«ãå®çŸ©ããããšãã§ãã DOM XSS æ»æã®å¯Ÿè±¡ããŠã§ãã¢ããªã±ãŒã·ã§ã³ã®ã³ãŒãããŒã¹ã®å°ããªå€ç«ããéšåã«æžããããšãã§ããç£èŠãã³ãŒãã¬ãã¥ãŒã容æã«ãªããŸãããã®ãã£ã¬ã¯ãã£ãã¯ã Trusted Types API ãã <code>TrustedTypes.createPolicy</code> ã§äœæãããä¿¡é Œã§ããåã®ããªã·ãŒåã®ãã¯ã€ããªã¹ãã宣èšããŸãã</p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre>Content-Security-Policy: trusted-types; +Content-Security-Policy: trusted-types <policyName>; +Content-Security-Policy: trusted-types <policyName> <policyName> 'allow-duplicates'; +</pre> + +<dl> + <dt><DOMString></dt> + <dd>Trusted Type ããªã·ãŒåãšããããšãã§ããä»»æã®æååã§ãã</dd> + <dt><code>'allow-duplicates'</code></dt> + <dd>ããªã·ãŒåãæ¢ã«äœ¿çšãããŠããŠããçæãèš±å¯ããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>TODO</p> + +<h2 id="Polyfill" name="Polyfill">ããªãã£ã«</h2> + +<p>A <a href="https://github.com/w3c/webappsec-trusted-types#polyfill">Trusted Types ã®ããªãã£ã«</a>ã Github äžã§å©çšã§ããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td><a href="https://w3c.github.io/webappsec-trusted-types/dist/spec/">Trusted Types</a></td> + <td>Draft</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.csp.Content-Security-Policy.trusted-types")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li><a href="/ja/docs/Glossary/Cross-site_scripting">ã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã° (XSS)</a></li> + <li><a href="https://developers.google.com/web/updates/2019/02/trusted-types">Google Developers: Intro to Trusted-Types</a></li> + <li>Trusted Types with <a href="https://github.com/cure53/DOMPurify#what-about-dompurify-and-trusted-types">DOMPurify</a> XSS sanitizer</li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/upgrade-insecure-requests/index.html b/files/ja/web/http/headers/content-security-policy/upgrade-insecure-requests/index.html new file mode 100644 index 0000000000..d8683ba580 --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/upgrade-insecure-requests/index.html @@ -0,0 +1,90 @@ +--- +title: 'CSP: upgrade-insecure-requests' +slug: Web/HTTP/Headers/Content-Security-Policy/upgrade-insecure-requests +tags: + - CSP + - HTTP + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Content-Security-Policy/upgrade-insecure-requests +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) <code><strong>upgrade-insecure-requests</strong></code> ãã£ã¬ã¯ãã£ãã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ãã«ããã¹ãŠã®ãµã€ãã®å®å
šã§ãªãURL (HTTPçµç±ã§æäŸãããURL) ãã»ãã¥ãªãã£ã§ä¿è·ããã URL (HTTPSãä»ããŠæäŸããããã®) ã§çœ®ãæãããããã®ããã«åŠçããããæ瀺ããŸãããã®ãã£ã¬ã¯ãã£ãã¯ãæžãæããå¿
èŠãªå®å
šã§ã¯ãªãå€ã URL ãå€æ°ååšãããŠã§ããµã€ãã®ããã®ãã®ã§ãã</p> + +<p><code>upgrade-insecure-requests</code> ãã£ã¬ã¯ãã£ãã¯ã {{CSP("block-all-mixed-content")}} ãããåã«åŠçãããããèšå®ãããŠããã°åŸè
ã¯äœãããŸãããã©ã¡ããã®ãã£ã¬ã¯ãã£ããèšå®ããããšããå§ãããŸããã HTTP ã«ãªãã€ã¬ã¯ãããåŸã§ HTTPS ã匷å¶ããããšãã§ããªãå€ããã©ãŠã¶ãŒã§ HTTPS ã匷å¶ãããããªãéããäž¡æ¹ãæå®ããããšã¯ã§ããŸããã</p> + +<p><code>upgrade-insecure-requests</code> ãã£ã¬ã¯ãã£ãã¯ã第äžè
ã®ãµã€ãã®ãªã³ã¯ãçµç±ããŠãµã€ãã«ã¢ã¯ã»ã¹ãããŠãŒã¶ãŒãæäžäœã®ããã²ãŒã·ã§ã³çšã« HTTPS ã«ã¢ããã°ã¬ãŒããããããšãä¿èšŒããªãããã {{HTTPHeader("Strict-Transport-Security")}} ({{Glossary("HSTS")}}) ããããŒã眮æããããŠãŒã¶ãŒãSSLã¹ããªããã³ã°æ»æã®å¯Ÿè±¡ã«ãªããªãããã«ãé©å㪠<code>max-age</code> ãèšå®ããããã«ããŠãã ããã</p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Content-Security-Policy: upgrade-insecure-requests;</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>// ããã㌠+Content-Security-Policy: upgrade-insecure-requests; + +// meta ã¿ã° +<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> +</pre> + +<p>HTTP ãã HTTPS ãžã®ç§»è¡ãæããã¡ã€ã³ example.com ã«äžèšã®ããããŒãèšå®ãããšãããŒãžç§»åã䌎ããªãå®å
šã§ã¯ãªããªãœãŒã¹ã®ãªã¯ãšã¹ããèªåçã«ã¢ããã°ã¬ãŒããããŸã (第äžè
ã®ãªã¯ãšã¹ããèªåã®ãã®ãšåæ§ã«)ã</p> + +<pre class="brush: html"><img src="http://example.com/image.png"> +<img src="http://not-example.com/image.png"></pre> + +<p>ãããã® URL ã¯ããªã¯ãšã¹ããè¡ãããåã«æžãçŽãããŸããã€ãŸããå®å
šã§ãªãèŠæ±ããããã¯ãŒã¯ã«äŸµå
¥ããªãããã«ããŸãããªããèŠæ±ããããªãœãŒã¹ãå®éã« HTTPS çµç±ã§å©çšå¯èœã§ã¯ãªãå Žåããªã¯ãšã¹ã㯠HTTP ã§ä»£æ¿ãããã«å€±æããããšã«æ³šæããŠãã ããã</p> + +<pre class="brush: html"><img src="https://example.com/image.png"> +<img src="https://not-example.com/image.png"></pre> + +<p>第äžè
ã®ãªãœãŒã¹ãžã®ããã²ãŒã·ã§ã³ãã¢ããã°ã¬ãŒããããšãç Žå£ã®å¯èœæ§ã倧å¹
ã«é«ãŸããŸãã®ã§ããããã¯ã¢ããã°ã¬ãŒããããŸããã</p> + +<pre class="brush: html"><a href="https://example.com/">Home</a> +<a href="http://not-example.com/">Home</a></pre> + +<h3 id="Finding_insecure_requests" name="Finding_insecure_requests">å®å
šã§ã¯ãªããªã¯ãšã¹ãã®çºèŠ</h3> + +<p>{{HTTPHeader("Content-Security-Policy-Report-Only")}} ããããŒãš {{CSP("report-uri")}} ãã£ã¬ã¯ãã£ããå©çšããŠã匷å¶ããªã·ãŒãšå ±åãããããªã·ãŒã次ã®ããã«èšå®ããããšãã§ããŸãã</p> + +<pre>Content-Security-Policy: upgrade-insecure-requests; default-src https: +Content-Security-Policy-Report-Only: default-src https:; report-uri /endpoint</pre> + +<p>ãã®ããã«ããŠãå®å
šãªãµã€ãäžã®å®å
šã§ãªãèŠæ±ã¯åŒãç¶ãã¢ããã°ã¬ãŒããããŸãããç£èŠããªã·ãŒã«éåããå Žåã ãããå®å
šã§ãªããªãœãŒã¹ããšã³ããã€ã³ãã«å ±åãããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("Upgrade Insecure Requests", "#delivery", "upgrade-insecure-requests")}}</td> + <td>{{Spec2('Upgrade Insecure Requests')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååãããã®ã§ããã°ã <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp.upgrade-insecure-requests")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTTPHeader("Upgrade-Insecure-Requests")}} ããããŒ</li> + <li>{{HTTPHeader("Strict-Transport-Security")}} ({{Glossary("HSTS")}}) ããããŒ</li> + <li>{{CSP("block-all-mixed-content")}}</li> + <li><a href="/ja/docs/Web/Security/Mixed_content">æ··åã³ã³ãã³ã</a></li> +</ul> diff --git a/files/ja/web/http/headers/content-security-policy/worker-src/index.html b/files/ja/web/http/headers/content-security-policy/worker-src/index.html new file mode 100644 index 0000000000..2164488eee --- /dev/null +++ b/files/ja/web/http/headers/content-security-policy/worker-src/index.html @@ -0,0 +1,97 @@ +--- +title: 'CSP: worker-src' +slug: Web/HTTP/Headers/Content-Security-Policy/worker-src +tags: + - CSP + - HTTP + - ã»ãã¥ãªã㣠+ - ãã£ã¬ã¯ãã£ã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Content-Security-Policy/worker-src +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® {{HTTPHeader("Content-Security-Policy")}} (CSP) <code><strong>worker-src</strong></code> ãã£ã¬ã¯ãã£ãã¯ã {{domxref("Worker")}}, {{domxref("SharedWorker")}}, {{domxref("ServiceWorker")}} ã¹ã¯ãªããã®æå¹ãªãœãŒã¹ãæå®ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">CSP ããŒãžã§ã³</th> + <td>3</td> + </tr> + <tr> + <th scope="row">ãã£ã¬ã¯ãã£ãçš®å¥</th> + <td>{{Glossary("Fetch directive", "ãã§ãããã£ã¬ã¯ãã£ã")}}</td> + </tr> + <tr> + <th scope="row">ãã©ãŒã«ããã¯</th> + <td> + <p>ãã®ãã£ã¬ã¯ãã£ãããªãå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ã¯ãŒã«ãŒã®å®è¡ã®ç®¡çã®ããã«ãæåã« {{CSP("child-src")}} ãã£ã¬ã¯ãã£ãã次㫠{{CSP("script-src")}} ãã£ã¬ã¯ãã£ããæåŸã« {{CSP("default-src")}} ãã£ã¬ã¯ãã£ããæ¢ããŸãã</p> + + <p>Chrome 59 以é㯠{{CSP("child-src")}} ãã£ã¬ã¯ãã£ããé£ã°ããŸãã</p> + + <p>Edge 17 㯠{{CSP("script-src")}} ãã£ã¬ã¯ãã£ããé£ã°ããŸã (<a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/17415478/">bug</a>)ã</p> + </td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>worker-src</code> ããªã·ãŒã«ã¯ïŒã€ä»¥äžã®ãœãŒã¹ãæå®ããããšãã§ããŸãã</p> + +<pre class="syntaxbox">Content-Security-Policy: worker-src <source>; +Content-Security-Policy: worker-src <source> <source>; +</pre> + +<h3 id="Sources" name="Sources">ãœãŒã¹</h3> + +<p>{{page("Web/HTTP/Headers/Content-Security-Policy/default-src", "Sources")}}</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Violation_cases" name="Violation_cases">éåã®å Žå</h3> + +<p>ãã® CSP ããããŒãäžããããŠããæã</p> + +<pre class="brush: bash">Content-Security-Policy: worker-src https://example.com/</pre> + +<p>{{domxref("Worker")}}, {{domxref("SharedWorker")}}, {{domxref("ServiceWorker")}} ã¯ãããã¯ãããèªã¿èŸŒãŸããŸããã</p> + +<pre class="brush: html"><script> + var blockedWorker = new Worker("data:application/javascript,..."); + blockedWorker = new SharedWorker("https://not-example.com/"); + navigator.serviceWorker.register('https://not-example.com/sw.js'); +</script></pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("CSP 3.0", "#directive-worker-src", "worker-src")}}</td> + <td>{{Spec2('CSP 3.0')}}</td> + <td>ååå®çŸ©ã</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååãããã®ã§ããã°ã <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.csp.worker-src")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{domxref("Worker")}}, {{domxref("SharedWorker")}}, {{domxref("ServiceWorker")}}</li> +</ul> diff --git a/files/ja/web/http/headers/content-type/index.html b/files/ja/web/http/headers/content-type/index.html new file mode 100644 index 0000000000..2c52bb966b --- /dev/null +++ b/files/ja/web/http/headers/content-type/index.html @@ -0,0 +1,124 @@ +--- +title: Content-Type +slug: Web/HTTP/Headers/Content-Type +tags: + - Content-Type + - HTTP + - Reference + - ãšã³ãã£ãã£ããã㌠+ - ããã㌠+translation_of: Web/HTTP/Headers/Content-Type +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Content-Type</code></strong> ãšã³ãã£ãã£ããããŒã¯ããªãœãŒã¹ã®{{Glossary("MIME type","ã¡ãã£ã¢çš®å¥")}}ã瀺ãããã«äœ¿çšããŸãã</p> + +<p>ã¬ã¹ãã³ã¹ã«ãããŠã¯ã <code>Content-Type</code> ããããŒã¯ã¯ã©ã€ã¢ã³ãã«è¿ãããã³ã³ãã³ããå®éã«ã¯ã©ã®ãããªçš®é¡ã®ãã®ã§ããããäŒããŸããå Žåã«ãã£ãŠã¯ãã©ãŠã¶ãŒã¯ MIME ãæšå®ãããã®ããããŒã®å€ã«åŸããªãããšããããŸãã {{HTTPHeader("X-Content-Type-Options")}} ã <code>nosniff</code> ã«èšå®ãããšããã®æ¯èããé²ãããšãã§ããŸãã</p> + +<p>èŠæ±ã«ãããŠã¯ ({{HTTPMethod("POST")}} ãŸã㯠{{HTTPMethod("PUT")}} ãªã©ã§)ãã¯ã©ã€ã¢ã³ãããµãŒããŒã«ã©ã®ãããªçš®é¡ã®ããŒã¿ãå®éã«éãããããäŒããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Entity header", "ãšã³ãã£ãã£ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + <tr> + <th scope="row">{{Glossary("CORS-safelisted response header", "CORS ã»ãŒããªã¹ãã¬ã¹ãã³ã¹ããããŒ")}}</th> + <td>ã¯ã</td> + </tr> + <tr> + <th scope="row">{{Glossary("CORS-safelisted request header", "CORS ã»ãŒããªã¹ããªã¯ãšã¹ãããããŒ")}}</th> + <td>ã¯ãã <em>CORS å±éºãªã¯ãšã¹ãããããŒãã€ã</em>: <code>"():<>?@[\]{}</code>, Delete, Tab, å¶åŸ¡æåã® 0x00 ãã 0x19 ãŸã§ãå€ã«å«ãããšãã§ããªããšããå¶éä»ãã§ãã<br> + ãŸãã MIME ã¿ã€ãã®è§£éå€ (åŒæ°ãé€ãããã®) ã <code>application/x-www-form-urlencoded</code>, <code>multipart/form-data</code>, <code>text/plain</code> ã®äœããã§ããå¿
èŠããããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Content-Type: text/html; charset=UTF-8 +Content-Type: multipart/form-data; boundary=something +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>media-type</code></dt> + <dd>ãªãœãŒã¹ãããŒã¿ã® <a href="/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME ã¿ã€ã</a>ã§ãã</dd> + <dt>charset</dt> + <dd>æšæºã®æåãšã³ã³ãŒãã£ã³ã°ã§ãã</dd> + <dt>boundary</dt> + <dd>ãã«ãããŒãã®æ¬æã§ã¯ <code>boundary</code> ãã£ã¬ã¯ãã£ããå¿
èŠã§ãããã¯ã¡ãŒã«ã²ãŒããŠã§ã€ãééããŠã倧äžå€«ã ãšç¥ãããŠããæåã®äžãã1ïœ70æåã§æ§æããããã¯ã€ãã¹ããŒã¹ã§çµäºããªããã®ã§ããããã¯ã¡ãã»ãŒãžã®è€æ°ããŒãã®å¢çãå²ãããã«äœ¿çšããŸãããµã€ããããããŒã®å¢çã¯2æ¬ã®ããã·ã¥ã§å§ãŸããæåŸã®å¢çã«ã¯æåŸã«ã2æ¬ã®ããã·ã¥ãå
¥ããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Content-Type_in_HTML_forms" name="Content-Type_in_HTML_forms">HTML ãã©ãŒã ã«ããã <code>Content-Type</code></h3> + +<p>HTML ãã©ãŒã ãéä¿¡ããçµæãšããŠã® {{HTTPMethod("POST")}} èŠæ±ã«ãããŠã <code>Content-Type</code> 㯠{{HTMLElement("form")}} èŠçŽ ã® <code>enctype</code> å±æ§ã§æå®ããŸãã</p> + +<pre class="brush: html"><form action="/" method="post" enctype="multipart/form-data"> + <input type="text" name="description" value="some text"> + <input type="file" name="myFile"> + <button type="submit">Submit</button> +</form> +</pre> + +<p>ãã®èŠæ±ã¯ãã®ããã«èŠããŸãã (ããã§ã¯ããŸãéèŠã§ãªãããããŒã¯çç¥ããŠããŸã)</p> + +<pre>POST /foo HTTP/1.1 +Content-Length: 68137 +Content-Type: multipart/form-data; boundary=---------------------------974767299852498929531610575 + +-----------------------------974767299852498929531610575 +Content-Disposition: form-data; name="description" + +some text +-----------------------------974767299852498929531610575 +Content-Disposition: form-data; name="myFile"; filename="foo.txt" +Content-Type: text/plain + +(content of the uploaded file foo.txt) +-----------------------------974767299852498929531610575-- +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7233", "Content-Type in multipart", "4.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</td> + </tr> + <tr> + <td>{{RFC("7231", "Content-Type", "3.1.1.5")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Content-Type")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Accept")}} ããã³ {{HTTPHeader("Accept-Charset")}}</li> + <li>{{HTTPHeader("Content-Disposition")}}</li> + <li>{{HTTPStatus("206")}} Partial Content</li> + <li>{{HTTPHeader("X-Content-Type-Options")}}</li> +</ul> diff --git a/files/ja/web/http/headers/cookie/index.html b/files/ja/web/http/headers/cookie/index.html new file mode 100644 index 0000000000..cc8bc302a8 --- /dev/null +++ b/files/ja/web/http/headers/cookie/index.html @@ -0,0 +1,76 @@ +--- +title: Cookie +slug: Web/HTTP/Headers/Cookie +tags: + - HTTP + - cookie + - ã¯ãã㌠+ - ããã㌠+ - ãªã¯ãšã¹ãããã㌠+ - ãªãã¡ã¬ã³ã¹ + - çŠæ¢ããããŒå +translation_of: Web/HTTP/Headers/Cookie +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Cookie</code></strong> 㯠HTTP ã®ãªã¯ãšã¹ãããããŒã§ã以åãµãŒããŒã {{HTTPHeader("Set-Cookie")}} ããããŒã§éä¿¡ããä¿åããã <a href="/ja/docs/Web/HTTP/Cookies">HTTP ã¯ãããŒ</a>ãå«ã¿ãŸãã</p> + +<p><code>Cookie</code> ããããŒã¯ä»»æã§ãããäŸãã°ããã©ãŠã¶ãŒã®ãã©ã€ãã·ãŒèšå®ã§ã¯ãããŒããããã¯ããŠããå Žåãªã©ã¯çç¥ã§ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Cookie: <cookie-list> +Cookie: name=value +Cookie: name=value; name2=value2; name3=value3</pre> + +<dl> + <dt><cookie-list></dt> + <dd>ååãšå€ã®ãªã¹ãã <code><cookie-name>=<cookie-value></code> ã®åœ¢ã§è¡šãããã®ã§ãããªã¹ãã®çµã¯ã»ãã³ãã³ãšç©ºçœ (<code>'; '</code>) ã§åºåãããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Cookie: PHPSESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("6265", "Cookie", "5.4")}}</td> + <td>HTTP State Management Mechanism</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Cookie")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Set-Cookie")}}</li> + <li>{{domxref("Document.cookie")}}</li> +</ul> diff --git a/files/ja/web/http/headers/cookie2/index.html b/files/ja/web/http/headers/cookie2/index.html new file mode 100644 index 0000000000..99a1b1ba30 --- /dev/null +++ b/files/ja/web/http/headers/cookie2/index.html @@ -0,0 +1,59 @@ +--- +title: Cookie2 +slug: Web/HTTP/Headers/Cookie2 +tags: + - HTTP + - Obsolete + - ããã㌠+ - ãªã¯ãšã¹ã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Cookie2 +--- +<p>{{HTTPSidebar}} {{obsolete_header}}</p> + +<p>æ代é
ãã® <strong><code>Cookie2</code></strong> HTTP ãªã¯ãšã¹ããããã¯ããŠãŒã¶ãšãŒãžã§ã³ãã "æ°ããã¹ã¿ã€ã«ã®"ã¯ãããŒãç解ããŠããããšããµãŒãã«ç¥ãããããã«äœ¿ãããŸããããæè¿ã®ãŠãŒã¶ãšãŒãžã§ã³ãã¯ããã§ã¯ãªãã {{HTTPHeader("Cookie")}} ãããã䜿çšããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒã¿ã€ã</th> + <td>{{Glossary("Request header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>yes</td> + </tr> + </tbody> +</table> + +<h2 id="äŸ">äŸ</h2> + +<pre>Cookie2: $Version="1"</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("2965", "Cookie2")}}</td> + <td>Historic specification of HTTP State Management Mechanism, obsoleted by {{RFC("6265")}}</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®å®è£
ç¶æ³">ãã©ãŠã¶ã®å®è£
ç¶æ³</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Cookie2")}}</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Cookie")}}</li> + <li>{{domxref("Document.cookie")}}</li> +</ul> diff --git a/files/ja/web/http/headers/cross-origin-resource-policy/index.html b/files/ja/web/http/headers/cross-origin-resource-policy/index.html new file mode 100644 index 0000000000..1ed34f2bb6 --- /dev/null +++ b/files/ja/web/http/headers/cross-origin-resource-policy/index.html @@ -0,0 +1,78 @@ +--- +title: Cross-Origin-Resource-Policy +slug: Web/HTTP/Headers/Cross-Origin-Resource-Policy +tags: + - HTTP + - HTTP Header + - HTTP ããã㌠+ - Reference + - Response Header + - header + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Cross-Origin-Resource-Policy +--- +<div>{{HTTPSidebar}}</div> + +<div class="note"> +<p><strong>泚:</strong> <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1074261">Chrome ã®ãã°</a>ã®ããã Cross-Origin-Resource-Policy ãèšå®ãããš PDF ã®ã¬ã³ããªã³ã°ãäžæãããäžéšã® PDF ã®æåã®ããŒãžãè¶
ããŠèªãããšãã§ããªããªãããšããããŸãã <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1638323">Firefox ã®ãã°</a>ã®ãããCross-Origin-Resource-Policy ãèšå®ãããšãç¶æ³ã«ãã£ãŠã¯äžéšã®ãªãœãŒã¹ïŒPDF ãªã©ïŒã®ããŠã³ããŒããã§ããªããªãããšããããŸããæ¬çªç°å¢ã§ã¯ããã®ããããŒã®äœ¿çšã«æ³šæããŠãã ããã</p> +</div> + +<p>HTTP ã® <strong><code>Cross-Origin-Resource-Policy</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ããã©ãŠã¶ãŒãæå®ããããªãœãŒã¹ãžã® no-cors ã®ã¯ãã¹ãªãªãžã³/ã¯ãã¹ãµã€ãã®ãªã¯ãšã¹ãããããã¯ãããšããèŠæãäŒããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Cross-Origin-Resource-Policy: same-site | same-origin | cross-origin +</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>以äžã®ã¬ã¹ãã³ã¹ããããŒã«ãããäºææ§ã®ãããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ã¯ãã¹ãªãªãžã³ã® no-cors ãªã¯ãšã¹ããèš±å¯ããªããªããŸãã</p> + +<pre>Cross-Origin-Resource-Policy: same-origin +</pre> + +<p>ãã®ä»ã®äŸã¯ã <a href="https://resourcepolicy.fyi/">https://resourcepolicy.fyi/</a> ãåç
§ããŠãã ããã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("Fetch", '#cross-origin-resource-policy-header')}}</td> + <td>{{Spec2("Fetch", '#cross-origin-resource-policy-header')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Cross-Origin-Resource-Policy")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)">Cross-Origin Resource Policy (CORP) ã®èª¬æ</a></li> +</ul> diff --git a/files/ja/web/http/headers/date/index.html b/files/ja/web/http/headers/date/index.html new file mode 100644 index 0000000000..01d7cf1bde --- /dev/null +++ b/files/ja/web/http/headers/date/index.html @@ -0,0 +1,100 @@ +--- +title: Date +slug: Web/HTTP/Headers/Date +tags: + - HTTP + - Reference + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - äžè¬ããã㌠+ - æ±çšããã㌠+translation_of: Web/HTTP/Headers/Date +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Date</code></strong> äžè¬ HTTP ããããŒã«ã¯ãã¡ãã»ãŒãžãçºä¿¡ãããæ¥æãå«ãŸããŠããŸãã</p> + +<div class="blockIndicator warning"> +<p><code>Date</code> 㯠fetch ä»æ§æžã«ãããŠ<a href="https://fetch.spec.whatwg.org/#forbidden-header-name" rel="nofollow noreferrer">çŠæ¢ããããŒå</a>ã«æããããŠããŸãã - ãã®ããããã®ã³ãŒã㯠<code>Date</code> ããããŒãéä¿¡ããŸããã</p> + +<pre class="brush: js">fetch('https://httpbin.org/get', { + 'headers': { + 'Date': (new Date()).toUTCString() + } +})</pre> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("General header", "äžè¬ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Date: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><day-name></dt> + <dd>"Mon"ã"Tue"ã"Wed"ã"Thu"ã"Fri"ã"Sat"ã"Sun" ã®ãããã (倧æåå°æåãåºå¥)ã</dd> + <dt><day></dt> + <dd>2æ¡ã®æ¥çªå·ãäŸãã° "04" ãŸã㯠"23"ã</dd> + <dt><month></dt> + <dd>"Jan"ã"Feb"ã"Mar"ã"Apr"ã"May"ã"Jun"ã"Jul"ã"Aug"ã"Sep"ã "Oct"ã"Nov"ã"Dec" ã®ãããã (倧æåãšå°æåãåºå¥)ã</dd> + <dt><year></dt> + <dd>4æ¡ã®å¹Žã®æ°åãããšãã° "1990" ãŸã㯠"2016"ã</dd> + <dt><hour></dt> + <dd>2æ¡ã®æã®æ°åãããšãã° "09" ãŸã㯠"23"ã</dd> + <dt><minute></dt> + <dd>2æ¡ã®åã®æ°åãããšãã° "04" ãŸã㯠"59"ã</dd> + <dt><second></dt> + <dd>2æ¡ã®ç§ã®æ°åãããšãã° "04" ãŸã㯠"59"ã</dd> + <dt>GMT</dt> + <dd> + <p>ã°ãªãããžæšæºæãHTTP ã®æ¥ä»ã¯åžžã« GMT ã§è¡šããã決ããŠçŸå°æéã§è¡šãããããšã¯ãããŸããã</p> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Date: Wed, 21 Oct 2015 07:28:00 GMT +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Date", "7.1.1.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Date")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Age")}}</li> +</ul> diff --git a/files/ja/web/http/headers/device-memory/index.html b/files/ja/web/http/headers/device-memory/index.html new file mode 100644 index 0000000000..1c431536ab --- /dev/null +++ b/files/ja/web/http/headers/device-memory/index.html @@ -0,0 +1,85 @@ +--- +title: Device-Memory +slug: Web/HTTP/Headers/Device-Memory +tags: + - Client hints + - Device Memory API + - HTTP + - HTTP Header +translation_of: Web/HTTP/Headers/Device-Memory +--- +<div>{{HTTPSidebar}}{{securecontext_header}}{{SeeCompatTable}}</div> + +<p><strong><code>Device-Memory</code></strong> ããããŒã¯ã<a href="/ja/docs/Glossary/Client_hints">ã¯ã©ã€ã¢ã³ããã³ã</a>ã®ããããŒã®ããã«æ©èœãã <a href="/ja/docs/Web/API/Device_Memory_API">Device Memory API</a> ã®ããããŒã§ãã¯ã©ã€ã¢ã³ãããã€ã¹ã® RAM ã®æŠç®éãè¡šããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header","ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name","çŠæ¢ããããŒå")}}</th> + <td>?</td> + </tr> + </tbody> +</table> + +<div class="blockIndicator note"> +<p><strong>泚</strong>: ã¯ã©ã€ã¢ã³ããã³ãã«ã¯ãå®å
šãªãªãªãžã³ïŒTLS çµç±ïŒã§ã®ã¿ã¢ã¯ã»ã¹ã§ããŸãã ãµãŒããŒã¯ã{{HTTPHeader("Accept-CH")}} ããã³ {{HTTPHeader("Accept-CH-Lifetime")}} ã®ã¬ã¹ãã³ã¹ããããŒãéä¿¡ããããšã«ãã£ãŠãã¯ã©ã€ã¢ã³ããã <code>Device-Memory</code> ããããŒãåä¿¡ããããšãéžæããå¿
èŠããããŸãã</p> +</div> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p>ããã€ã¹ RAM ã®éã¯ããã£ã³ã¬ãŒããªã³ãå€æ°ãšããŠäœ¿çšã§ãããããããããŒã§ã®å€ã¯ã誀çšã®å¯èœæ§ãæžããããã«æå³çã«ç²ããªã£ãŠããŸãã ããããŒã¯æ¬¡ã®å€ãåããŸã: <code>0.25</code>ã<code>0.5</code>ã<code>1</code>ã<code>2</code>ã<code>4</code>ã<code>8</code>ã</p> + +<pre class="syntaxbox notranslate">Device-Memory: <number> +</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>ãµãŒããŒã¯ãŸããã¬ã¹ãã³ã¹ããããŒãšã㊠<code>Device-Memory</code> ãå«ã {{HTTPHeader("Accept-CH")}} ãš {{HTTPHeader("Accept-CH-Lifetime")}} ãéä¿¡ããããšã«ãã£ãŠã<code>Device-Memory</code> ããããŒãåä¿¡ããããã«éžæããå¿
èŠããããŸãã</p> + +<pre class="notranslate">Accept-CH: Device-Memory +Accept-CH-Lifetime: 86400 +</pre> + +<p>次ã«ãåŸç¶ã®ãªã¯ãšã¹ãã§ã¯ã©ã€ã¢ã³ãã¯ã次ã®ããã« <code>Device-Memory</code> ããããŒãéãè¿ãå ŽåããããŸãã</p> + +<pre class="notranslate">Device-Memory: 1 +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("Device Memory","#sec-device-memory-client-hint-header","Device-Memory")}}</td> + <td>{{Spec2('Device Memory')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Device-Memory")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/API/Device_Memory_API">Device Memory API</a></li> + <li>{{HTTPHeader("Accept-CH")}}</li> + <li>{{HTTPHeader("Accept-CH-Lifetime")}}</li> + <li>{{HTTPHeader("Vary")}}</li> + <li>{{DOMxRef("Navigator.deviceMemory")}}</li> +</ul> diff --git a/files/ja/web/http/headers/dnt/index.html b/files/ja/web/http/headers/dnt/index.html new file mode 100644 index 0000000000..71631dc81d --- /dev/null +++ b/files/ja/web/http/headers/dnt/index.html @@ -0,0 +1,91 @@ +--- +title: DNT +slug: Web/HTTP/Headers/DNT +tags: + - DNT + - HTTP + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/DNT +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>DNT</code></strong> (<strong>D</strong>o <strong>N</strong>ot <strong>T</strong>rack) ãªã¯ãšã¹ãããããŒã¯ããŠãŒã¶ãŒã®ãã©ããã³ã°ã®èšå®ã瀺ããŸãã ããã«ããããŠãŒã¶ãŒã¯ããŒãœãã©ã€ãºãããã³ã³ãã³ãã§ã¯ãªãããã©ã€ãã·ãŒãåªå
ãããã©ãããæå®ã§ããŸã.</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒã¿ã€ã</th> + <td>{{Glossary("Request header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="æ§æ">æ§æ</h2> + +<pre class="syntaxbox notranslate">DNT: 0 +DNT: 1 +DNT: null +</pre> + +<h2 id="宣èš">宣èš</h2> + +<dl> + <dt>0</dt> + <dd>ãŠãŒã¶ãŒã¯å¯Ÿè±¡ã®ãµã€ãã§ãã©ããã³ã°ãèš±å¯ããŠããã</dd> + <dt>1</dt> + <dd>ãŠãŒã¶ãŒã¯å¯Ÿè±¡ã®ãµã€ãã§ãã©ããã³ã°ãæåŠããŠããã</dd> + <dt>null</dt> + <dd>ãŠãŒã¶ãŒã¯ãã©ããã³ã°ã«é¢ããèšå®ãæå®ããŠããªãã</dd> +</dl> + +<h2 id="äŸ">äŸ</h2> + +<h3 id="JavaScript_ãã_Do_Not_Track_ã®ç¶æ
ãèªã¿åã">JavaScript ãã Do Not Track ã®ç¶æ
ãèªã¿åã</h3> + +<p>ãŠãŒã¶ãŒã® DNT èšå®ã¯ {{domxref("Navigator.doNotTrack")}} ããããã£ã䜿çšã㊠JavaScript ããèªã¿åãããšãã§ããŸã:</p> + +<pre class="brush: js notranslate">navigator.doNotTrack; // "0" or "1"</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§</th> + <th scope="col">ã¹ããŒã¿ã¹</th> + <th scope="col">ã³ã¡ã³ã</th> + </tr> + <tr> + <td>{{SpecName('Tracking','#dnt-header-field', 'DNT Header Field for HTTP Requests')}}</td> + <td>{{Spec2("Tracking")}}</td> + <td>åæå®çŸ©ã</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ãŒå®è£
ç¶æ³">ãã©ãŠã¶ãŒå®è£
ç¶æ³</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.DNT")}}</p> + +<h2 id="é¢é£é
ç®">é¢é£é
ç®</h2> + +<ul> + <li>{{domxref("Navigator.doNotTrack")}}</li> + <li>{{HTTPHeader("Tk")}} ããããŒ</li> + <li><a href="https://en.wikipedia.org/wiki/Do_Not_Track">Do Not Track on Wikipedia</a></li> + <li><a href="https://www.eff.org/deeplinks/2011/02/what-does-track-do-not-track-mean">What Does the "Track" in "Do Not Track" Mean? â EFF</a></li> + <li><a href="http://donottrack.us/">donottrack.us</a></li> + <li>DNT ãã©ãŠã¶ãŒèšå®ã®ãã«ã: + <ul> + <li><a href="https://www.mozilla.org/ja/firefox/dnt/">Firefox</a></li> + <li><a href="https://support.google.com/chrome/answer/2790761">Chrome</a></li> + </ul> + </li> +</ul> diff --git a/files/ja/web/http/headers/dpr/index.html b/files/ja/web/http/headers/dpr/index.html new file mode 100644 index 0000000000..5c696673e1 --- /dev/null +++ b/files/ja/web/http/headers/dpr/index.html @@ -0,0 +1,61 @@ +--- +title: DPR +slug: Web/HTTP/Headers/DPR +tags: + - Client hints + - HTTP + - HTTP Header +translation_of: Web/HTTP/Headers/DPR +--- +<div>{{HTTPSidebar}}{{securecontext_header}}{{SeeCompatTable}}</div> + +<p><strong><code>DPR</code></strong> ããããŒã¯ãCSS ãã¯ã»ã«æ¯ã«å¯Ÿå¿ããç©çããã€ã¹ãã¯ã»ã«ã®æ°ã§ããã¯ã©ã€ã¢ã³ãã®ããã€ã¹ãã¯ã»ã«æ¯ (device pixel ratioã{{Glossary("DPR")}})) ãè¡šã<a href="/ja/docs/Glossary/Client_hints">ã¯ã©ã€ã¢ã³ããã³ã</a>ã®ããããŒã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header","ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name","çŠæ¢ããããŒå")}}</th> + <td>?</td> + </tr> + </tbody> +</table> + +<div class="blockIndicator note"> +<p><strong>泚</strong>: ã¯ã©ã€ã¢ã³ããã³ãã«ã¯ãå®å
šãªãªãªãžã³ïŒTLS çµç±ïŒã§ã®ã¿ã¢ã¯ã»ã¹ã§ããŸãã ãµãŒããŒã¯ã{{HTTPHeader("Accept-CH")}} ããã³ {{HTTPHeader("Accept-CH-Lifetime")}} ã®ã¬ã¹ãã³ã¹ããããŒãéä¿¡ããããšã«ãã£ãŠãã¯ã©ã€ã¢ã³ããã <code>DPR</code> ããããŒãåä¿¡ããããšãéžæããå¿
èŠããããŸãã</p> +</div> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">DPR: <number> +</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>ãµãŒããŒã¯ãŸããã¬ã¹ãã³ã¹ããããŒãšã㊠<code>DPR</code> ãå«ã {{HTTPHeader("Accept-CH")}} ãš {{HTTPHeader("Accept-CH-Lifetime")}} ãéä¿¡ããããšã«ãã£ãŠã<code>DPR</code> ããããŒãåä¿¡ããããã«éžæããå¿
èŠããããŸãã</p> + +<pre class="notranslate">Accept-CH: DPR +Accept-CH-Lifetime: 86400 +</pre> + +<p>次ã«ãåŸç¶ã®ãªã¯ãšã¹ãã§ã¯ã©ã€ã¢ã³ãã¯ã次ã®ããã« <code>DPR</code> ããããŒãéãè¿ãå ŽåããããŸãã</p> + +<pre class="notranslate">DPR: 1.0 +</pre> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.DPR")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Accept-CH")}}</li> + <li>{{HTTPHeader("Accept-CH-Lifetime")}}</li> + <li>{{HTTPHeader("Vary")}}</li> +</ul> diff --git a/files/ja/web/http/headers/early-data/index.html b/files/ja/web/http/headers/early-data/index.html new file mode 100644 index 0000000000..31a0c68b64 --- /dev/null +++ b/files/ja/web/http/headers/early-data/index.html @@ -0,0 +1,62 @@ +--- +title: Early-Data +slug: Web/HTTP/Headers/Early-Data +tags: + - HTTP + - ã¯ã©ã€ã¢ã³ããã³ã + - ããã㌠+ - ãªã¯ãšã¹ã +translation_of: Web/HTTP/Headers/Early-Data +--- +<div>{{SeeCompatTable}}{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><code><strong>Early-Data</strong></code> ããããŒã¯äžéè
ã«ããèšå®ããããªã¯ãšã¹ãã <a href="/ja/docs/Web/Security/Transport_Layer_Security#TLS_1.3">TLS æ©æããŒã¿</a>ã§äŒããããããšããããŠäžéè
ã {{HTTPStatus("425", "425 (Too Early)")}} ã¹ããŒã¿ã¹ã³ãŒããç解ããŠããããšã瀺ããŸãã</span></p> + +<p><code><strong>Early-Data</strong></code> ããããŒã¯ãªã¯ãšã¹ãã®çºä¿¡è
(ã€ãŸãããã©ãŠã¶ãŒ) ã«ãã£ãŠèšå®ãããããšã¯ãããŸããã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Early-Data: 1 +</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>GET /resource HTTP/1.0 +Host: example.com +Early-Data: 1</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("8470", "The Early-Data Header Field", "5.1")}}</td> + <td>Using Early Data in HTTP</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Early-Data")}}</p> diff --git a/files/ja/web/http/headers/etag/index.html b/files/ja/web/http/headers/etag/index.html new file mode 100644 index 0000000000..a1e11da4b8 --- /dev/null +++ b/files/ja/web/http/headers/etag/index.html @@ -0,0 +1,107 @@ +--- +title: ETag +slug: Web/HTTP/Headers/ETag +tags: + - HTTP + - Reference + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã¹ãã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/ETag +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>ETag</code></strong> 㯠HTTP ã®ã¬ã¹ãã³ã¹ããããŒã§ããªãœãŒã¹ã®ç¹å®ããŒãžã§ã³ã®èå¥åã§ãããŠã§ããµãŒããŒã¯ãã³ã³ãã³ããå€æŽãããŠããªãå Žåã¯ã¬ã¹ãã³ã¹å
šäœãåéããå¿
èŠããªãã®ã§ããã£ãã·ã¥ãããå¹ççã«ãªãé信垯åãç¯çŽããããšãã§ããŸããå ããŠã ETag ã¯ãªãœãŒã¹ãåæã«æŽæ°ãããŠäºããäžæžãããããš (<a href="#Caching_of_unchanged_resources">ã空äžè¡çªã</a>) ãé²ãã®ã«åœ¹ç«ã¡ãŸãã</p> + +<p>æå®ããã URL ã®ãªãœãŒã¹ãå€æŽãããå Žåã¯ãæ°ãã <code>Etag</code> å€ãçæããå¿
èŠããããŸãããããã£ãŠ Etags ã¯ãã£ã³ã¬ãŒããªã³ãã«äŒŒãŠãããäžéšã®ãµãŒããŒã§ã®è¿œè·¡ç®çã§ã䜿çšãããå¯èœæ§ããããŸããããããæ¯èŒããããšã§ããªãœãŒã¹ã®2ã€ã®è¡šçŸãåããã©ãããçŽ æ©ãå€æã§ããŸããããã©ããã³ã°ãµãŒããŒã«ãã£ãŠç¡éã«ä¿æãããããã«èšå®ããããšãã§ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">ETag: W/"<etag_value>" +ETag: "<etag_value>" +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>W/</code> {{optional_inline}}</dt> + <dd><code>'W/'</code> (倧æå) ã¯<a href="/ja/docs/Web/HTTP/Conditional_requests#Weak_validation">匱ãããªããŒã¿ãŒ</a>ã䜿çšããããšã瀺ããŸãã匱ã ETag ã¯çæãç°¡åã§ãããæ¯èŒã«ã¯ããŸã圹ç«ã¡ãŸããã匷åãªããªããŒã¿ãŒã¯æ¯èŒã«ã¯çæ³çã§ãããå¹ççã«çæããã®ã¯ãšãŠãå°é£ã§ããåããªãœãŒã¹ãè¡šçŸãã2ã€ã®åŒ±ã <code>Etag</code> ã®å€ããã£ãå Žåãæå³çã«ã¯åçã§ããããã€ãåäœã§ã¯åãã§ã¯ãªãå¯èœæ§ããããŸããããªãã¡ã匱ã ETag ã¯<a href="/ja/docs/Web/HTTP/Headers/Accept-Ranges">ãã€ãç¯å²æå®ã®ãªã¯ãšã¹ã</a>ãè¡ããããšãã«ãã£ãã·ã¥ãããŸãããã匷ã ETag ã¯ç¯å²æå®ã®ãªã¯ãšã¹ãããã£ãã·ã¥ããŸãã</dd> + <dt>"<etag_value>"</dt> + <dd>èŠæ±ããããªãœãŒã¹ãäžæã«è¡šããšã³ãã£ãã£ã¿ã°ã§ããããã¯äºéåŒçšç¬Šã§å²ãŸãã ASCII æååã§ããã <code>"675af34563dc-tr34"</code>ã®ãããªåœ¢ã§ãã <code>ETag</code> å€ãçæãããæ¹æ³ã¯æå®ãããŠããŸãããã³ã³ãã³ãã®ããã·ã¥ãæçµæŽæ°ã¿ã€ã ã¹ã¿ã³ãã®ããã·ã¥ãåãªããªããžã§ã³çªå·ãªã©ããã䜿çšãããŸããããšãã°ã MDN 㯠Wiki èšäºã³ã³ãã³ãã®ããã·ã¥ã䜿çšããŠããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4" +ETag: W/"0815"</pre> + +<h3 id="Avoiding_mid-air_collisions" name="Avoiding_mid-air_collisions">空äžè¡çªã®åé¿</h3> + +<p><code>ETag</code> ãš {{HTTPHeader("If-Match")}} ãããã®å©ããåããŠãç·šéã®ç©ºäžè¡çªãæ€åºããããšãã§ããŸãã</p> + +<p>ããšãã°ã MDN ãç·šéããå ŽåãçŸåšã® Wiki ã³ã³ãã³ãã®ããã·ã¥ãç®åºããããã®ã¬ã¹ãã³ã¹ã§ <code>Etag</code> ã«å
¥ããããŸãã</p> + +<pre>ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"</pre> + +<p>Wiki ããŒãžã«å€æŽãä¿å (ããŒã¿ã®æçš¿) ãããšãã {{HTTPMethod("POST")}} ãªã¯ãšã¹ãã«ã¯ã {{HTTPHeader("If-Match")}} ããããŒã« <code>ETag</code> å€ãå
¥ããŠãæ°ãããã©ããããã§ãã¯ããŸãã</p> + +<pre>If-Match: "33a64df551425fcc55e4d42a148795d9f25f89d4"</pre> + +<p>ããã·ã¥ãäžèŽããªãå Žåã¯ãææžãéäžã§ç·šéãããããšãæå³ãã {{HTTPStatus("412")}} <code> Precondition Failed</code> ãšã©ãŒãçºçããŸãã</p> + +<h3 id="Caching_of_unchanged_resources" name="Caching_of_unchanged_resources">å€æŽãããŠããªããªãœãŒã¹ã®ãã£ãã·ã¥</h3> + +<p>ããäžã€ã® <code>ETag</code> ããããŒã®å
žåçãªäœ¿çšäŸãšããŠãå€æŽãããŠããªããªãœãŒã¹ããã£ãã·ã¥ããããšããããŸãããŠãŒã¶ãŒã (<code>ETag</code> ãèšå®ãããŠãã) æå®ããã URL ãå床蚪åããæãããã<em>å€ããªã£ããã®</em> (å€ãããŠäœ¿çšã§ããªã) ã§ãã£ãå Žåãã¯ã©ã€ã¢ã³ã㯠{{HTTPHeader("If-None-Match")}} ããããŒæ¬ã§ <code>ETag</code> ã®å€ãéããŸãã</p> + +<pre>If-None-Match: "33a64df551425fcc55e4d42a148795d9f25f89d4"</pre> + +<p>ãµãŒããŒã¯ãã¯ã©ã€ã¢ã³ãã® <code>ETag</code> (<code>If-None-Match</code> ã§éä¿¡ããããã®) ãçŸåšã®ããŒãžã§ã³ã® <code>ETag</code> ãšæ¯èŒããäž¡æ¹ã®å€ãäžèŽãã (ã€ãŸããªãœãŒã¹ã¯å€æŽãããŠããªã) å ŽåããµãŒããŒã¯ {{HTTPStatus("304")}} <code>Not Modified</code> ã¹ããŒã¿ã¹ãæ¬æãªãã§è¿éãããã£ãã·ã¥ãããã¬ã¹ãã³ã¹ã®ããŒãžã§ã³ããŸã 䜿çšå¯èœ (æ°ãã) ã§ããããšãã¯ã©ã€ã¢ã³ãã«éç¥ããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7232", "ETag", "2.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.ETag")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("If-Match")}}</li> + <li>{{HTTPHeader("If-None-Match")}}</li> + <li>{{HTTPStatus("304")}}<code> Not Modified</code></li> + <li>{{HTTPStatus("412")}}<code> Precondition Failed</code></li> + <li> + <p><a href="https://www.w3.org/1999/04/Editing/">W3C Note: Editing the Web â Detecting the Lost Update Problem Using Unreserved Checkout</a></p> + </li> +</ul> diff --git a/files/ja/web/http/headers/expect-ct/index.html b/files/ja/web/http/headers/expect-ct/index.html new file mode 100644 index 0000000000..96b8f694fb --- /dev/null +++ b/files/ja/web/http/headers/expect-ct/index.html @@ -0,0 +1,89 @@ +--- +title: Expect-CT +slug: Web/HTTP/Headers/Expect-CT +tags: + - HTTP + - Reference + - ããã㌠+ - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Expect-CT +--- +<p>{{HTTPSidebar}}</p> + +<p><code>Expect-CT</code> ããããŒã¯ããµã€ããèªèšŒééæ§ã®èŠä»¶ã®å ±åã匷å¶ã«åå ããŠããµã€ãã®äžæ£ãªèªèšŒæ
å ±ãéç¥ãããªãç¶æ
ãé²ãããšãã§ããŸãã</p> + +<div class="note"> +<p>ãµã€ãã <code>Expect-CT</code> ããããŒãæå¹ã«ãããšããã©ãŠã¶ãŒã<strong><a href="https://www.certificate-transparency.org/known-logs">å
¬é CT ãã°</a></strong>ã«çŸãããµã€ãã®ãã¹ãŠã®èªèšŒæ
å ±ããã§ãã¯ããããèŠæ±ããŸãã</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre>Expect-CT: report-uri="<uri>", + enforce, + max-age=<age></pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt>max-age</dt> + <dd> + <p><code>Expect-CT</code> ããããŒãã£ãŒã«ããåä¿¡ããåŸã§ããŠãŒã¶ãŒãšãŒãžã§ã³ããã¡ãã»ãŒãžãåä¿¡ãããã¹ãããæ¢ç¥ã® Expect-CT ãã¹ããšèŠãªãã¹ãæéãç§æ°ã§æå®ããŸãã</p> + + <p>ãã£ãã·ã¥ãè¡šçŸå¯èœãªå€ããã倧ããªå€ãåä¿¡ããå Žåããèšç®ã§ãªãŒããŒãããŒãçºçããå Žåããã£ãã·ã¥ã¯å€ã 2147483648 (2^31) ãŸãã¯äœ¿çšããŠããè¡šçŸæ¹æ³ã§æã倧ããªæŽæ°å€ãšã¿ãªããŸãã</p> + </dd> + <dt>report-uri="<uri>" {{optional_inline}}</dt> + <dd> + <p>ãŠãŒã¶ãŒãšãŒãžã§ã³ãã Expect-CT ã®å€±æãå ±åãã URI ãæå®ããŸãã</p> + <code>enforce</code> ãã£ã¬ã¯ãã£ããš <code>report-uri</code> ãã£ã¬ã¯ãã£ããäž¡æ¹ãšãããå Žåãèšå®ã¯ "enforce-and-report" ã®èšå®ãšåŒã°ãããŠãŒã¶ãŒãšãŒãžã§ã³ãã«èªèšŒééæ§ããªã·ãŒã«åŸããéåãå ±åããããšãæ瀺ããŸãã + + <p> </p> + </dd> + <dt>enforce {{optional_inline}}</dt> + <dd> + <p>ãŠãŒã¶ãŒãšãŒãžã§ã³ãã« (å ±åããã ãã§ãªã) èªèšŒééæ§ããªã·ãŒã«åŸãããŠãŒã¶ãŒãšãŒãžã§ã³ããèªèšŒééæ§ããªã·ãŒã«éåããã³ãã¯ã·ã§ã³ãæåŠããããæ瀺ããŸãã</p> + + <p><code>enforce</code> ãã£ã¬ã¯ãã£ããš <code>report-uri</code> ãã£ã¬ã¯ãã£ããäž¡æ¹ãšãããå Žåãèšå®ã¯ "enforce-and-report" ã®èšå®ãšåŒã°ãããŠãŒã¶ãŒãšãŒãžã§ã³ãã«èªèšŒééæ§ããªã·ãŒã«åŸããéåãå ±åããããšãæ瀺ããŸãã</p> + </dd> +</dl> + +<h2 id="Example" name="Example">äŸ</h2> + +<p>以äžã®äŸã¯èªèšŒééæ§ã24æé匷å¶ããéåã foo.example ã«å ±åããããšã瀺ããŸãã</p> + +<pre>Expect-CT: max-age=86400, enforce, report-uri="https://foo.example/report"</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td><a href="https://tools.ietf.org/html/draft-ietf-httpbis-expect-ct-07">Internet Draft</a></td> + <td>Expect-CT Extension for HTTP</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Expect-CT")}}</p> diff --git a/files/ja/web/http/headers/expect/index.html b/files/ja/web/http/headers/expect/index.html new file mode 100644 index 0000000000..41a2144feb --- /dev/null +++ b/files/ja/web/http/headers/expect/index.html @@ -0,0 +1,96 @@ +--- +title: Expect +slug: Web/HTTP/Headers/Expect +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - ãªã¯ãšã¹ãããã㌠+translation_of: Web/HTTP/Headers/Expect +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>Expect</code></strong> ãªã¯ãšã¹ãããããŒã¯ããªã¯ãšã¹ããæ£ããæ±ãããã«ãµãŒããŒãå®è¡ããå¿
èŠããããšæåŸ
ãããŠããããšã瀺ããŸãã</p> + +<p>ä»æ§æžã§å®çŸ©ãããŠããæåŸ
㯠<code>Expect: 100-continue</code> ã ãã§ããµãŒããŒãå¿çããã¹ãããšã¯ä»¥äžã®éãã§ãã</p> + +<ul> + <li>ããããŒã«å«ãŸããŠããæ
å ±ã§ãçŽã¡ã«æåãšããæ¡ä»¶ãæºãããŠããã®ã§ããã° {{HTTPStatus("100")}}ã</li> + <li>æåŸ
ã«æ²¿ãããšãã§ããªããã° {{HTTPStatus("417")}} (Expectation Failed)ããã以å€ã§ããã°ä»ã® 4xx ç¶æ
ã«ãªããŸãã</li> +</ul> + +<p>äŸãã°ããµãŒããŒã¯ {{HTTPHeader("Content-Length")}} ãé·ããããšãªã¯ãšã¹ããæåŠããå¯èœæ§ããããŸãã</p> + +<p><code>Expect</code> ããããŒãéä¿¡ãããã©ãŠã¶ãŒã¯ããŸããããŸãããã cURL ã®ãããªäžéšã®ä»ã®ã¯ã©ã€ã¢ã³ãã¯æ¢å®ã§éä¿¡ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p>çŸåšã¯ "100-continue" 以å€ã®æåŸ
ã¯å®çŸ©ãããŠããŸããã</p> + +<pre class="syntaxbox">Expect: 100-continue +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt>100-continue</dt> + <dd>ã¯ã©ã€ã¢ã³ãããã®èŠæ±ã§ (ãããã倧èŠæš¡ãª) ã¡ãã»ãŒãžæ¬æãéä¿¡ããããšããŠããããšãåä¿¡è
ã«éç¥ãã {{HTTPStatus("100")}} (Continue) æ«å®å¿çãåä¿¡ããããšãæåŸ
ããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Large_message_body" name="Large_message_body">巚倧ãªã¡ãã»ãŒãžæ¬æ</h3> + +<p>ã¯ã©ã€ã¢ã³ã㯠Expect ããããŒã§èŠæ±ãéä¿¡ããã¡ãã»ãŒãžæ¬æãéä¿¡ããåã«ãµãŒããŒãå¿çããã®ãåŸ
ã¡ãŸãã</p> + +<pre>PUT /somewhere/fun HTTP/1.1 +Host: origin.example.com +Content-Type: video/h264 +Content-Length: 1234567890987 +Expect: 100-continue +</pre> + +<p>ãµãŒããŒã¯ãªã¯ãšã¹ãããããŒããã§ãã¯ãã {{HTTPStatus("100")}} (Continue) å¿çãè¿ä¿¡ããŠãã¯ã©ã€ã¢ã³ãã«ã¡ãã»ãŒãžæ¬äœãéä¿¡ããããæ瀺ããããåã¯æåŸ
ã«æ²¿ããªãå Žåã¯ã {{HTTPStatus("417")}} (Expectation Failed) ç¶æ
ã«ãªããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Expect", "5.1.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Expect")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("417")}}<code> Expectation Failed</code></li> + <li>{{HTTPStatus("100")}}<code> Continue</code></li> +</ul> diff --git a/files/ja/web/http/headers/expires/index.html b/files/ja/web/http/headers/expires/index.html new file mode 100644 index 0000000000..4d05a20a04 --- /dev/null +++ b/files/ja/web/http/headers/expires/index.html @@ -0,0 +1,85 @@ +--- +title: Expires +slug: Web/HTTP/Headers/Expires +tags: + - Caching + - HTTP + - HTTPResponse + - header + - ãã£ãã·ã³ã° + - ããã㌠+ - ã¬ã¹ãã³ã¹ +translation_of: Web/HTTP/Headers/Expires +--- +<div>{{HTTPSidebar}}</div> + +<p><code><strong>Expires</strong></code> ããããŒã«ã¯ãã¬ã¹ãã³ã¹ãå€ããªããšèŠãªãããæ¥æãå
¥ããŸãã</p> + +<p>å€ 0 ã®ãããªç¡å¹ãªæ¥ä»ã¯éå»ã®æ¥ä»ãè¡šãããªãœãŒã¹ããã§ã«æå¹æéåãã§ããããšãæå³ããŸãã</p> + +<div class="note">ã¬ã¹ãã³ã¹ã« <code>max-age</code> ãŸã㯠<code>s-maxage</code> ãã£ã¬ã¯ãã£ããæ〠{{HTTPHeader("Cache-Control")}} ããããŒãããå Žåã<code>Expires</code> ããããŒã¯ç¡èŠãããŸãã</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + <tr> + <th scope="row">{{Glossary("CORS-safelisted response header", "CORS ã»ãŒããªã¹ãã¬ã¹ãã³ã¹ããããŒ")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Expires: <http-date> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><http-date></dt> + <dd> + <p>HTTP-date ã¿ã€ã ã¹ã¿ã³ã</p> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Expires: Wed, 21 Oct 2015 07:28:00 GMT</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7234", "Expires", "5.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Caching</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Expires")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Cache-Control")}}</li> + <li>{{HTTPHeader("Age")}}</li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/autoplay/index.html b/files/ja/web/http/headers/feature-policy/autoplay/index.html new file mode 100644 index 0000000000..b5097026fb --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/autoplay/index.html @@ -0,0 +1,59 @@ +--- +title: 'Feature-Policy: autoplay' +slug: Web/HTTP/Headers/Feature-Policy/autoplay +tags: + - Feature-Policy + - HTTP + - Reference + - autoplay + - ãã£ã¬ã¯ãã£ã + - æ©èœããªã·ãŒ +translation_of: Web/HTTP/Headers/Feature-Policy/autoplay +--- +<div>{{HTTPSidebar}} {{SeeCompatTable}}</div> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒã«ããã <code>autoplay</code> ãã£ã¬ã¯ãã£ãã¯ãçŸåšã®ææžã§ {{domxref("HTMLMediaElement")}} ã€ã³ã¿ãŒãã§ã€ã¹ã«ãã£ãŠã¡ãã£ã¢ã®èªååçããªã¯ãšã¹ãããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</span>ãã®ããªã·ãŒãæå¹ã§ããã°ã {{domxref("HTMLMediaElement.play()")}} ããè¿åŽããã {{jsxref("Promise")}} ã <code>DOMException</code> ã§æåŠãããŸãã {{HTMLElement("audio")}} ããã³ {{HTMLElement("video")}} èŠçŽ ã® {{htmlattrxref("autoplay", "audio")}} å±æ§ã¯ç¡èŠãããŸãã</p> + +<p>èªååçãèªååçãããã¯ã®è©³çŽ°ã«ã€ããŠã¯ã <a href="/ja/docs/Web/Media/Autoplay_guide">ã¡ãã£ã¢ããã³ Web Audio API ã®èªååçã¬ã€ã</a> ã®èšäºãåç
§ããŠãã ããã</p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Feature-Policy: autoplay <allowlist>;</pre> + +<dl> + <dt><allowlist></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}æ¢å®å€ã¯ <code>'self'</code> ã§ãã</dd> +</dl> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Feature Policy')}}</td> + <td>{{Spec2('Feature Policy')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Feature-Policy.autoplay")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/battery/index.html b/files/ja/web/http/headers/feature-policy/battery/index.html new file mode 100644 index 0000000000..a644447d68 --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/battery/index.html @@ -0,0 +1,62 @@ +--- +title: 'Feature-Policy: battery' +slug: Web/HTTP/Headers/Feature-Policy/battery +translation_of: Web/HTTP/Headers/Feature-Policy/battery +--- +<p>{{HTTPSidebar}}{{SeeCompatTable}}</p> + +<p>HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒã«ããã <code>battery</code> ãã£ã¬ã¯ãã£ãã¯ãçŸåšã®ææžã§ {{DOMxRef("Navigator.getBattery","Navigator.getBattery()")}} ã§åŸããã {{DOMxRef("BatteryManager")}} ã€ã³ã¿ãŒãã§ã€ã¹ã«ãã£ãŠã端æ«ã®ããããªã«é¢ããæ
å ±ã®åéãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="notranslate">Feature-Policy: battery <allowlist>;</pre> + +<dl> + <dt><allowlist></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}</dd> +</dl> + +<h2 id="Default_policy" name="Default_policy">æ¢å®ã®ããªã·ãŒ</h2> + +<p>æ¢å®å€ã¯ <code>'self'</code> ã§ãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("Feature Policy")}}</td> + <td>{{Spec2("Feature Policy")}}</td> + <td>ååå®çŸ©</td> + </tr> + <tr> + <td>{{SpecName("Battery API","#feature-policy-integration","Feature Policy integration")}}</td> + <td>{{Spec2("Battery API")}}</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Feature-Policy.battery")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> + <li><a href="/ja/docs/Web/API/Battery_Status_API">Battery Status API</a></li> + <li>{{DOMxRef("Navigator.getBattery","Navigator.getBattery()")}}</li> + <li>{{DOMxRef("BatteryManager")}}</li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/camera/index.html b/files/ja/web/http/headers/feature-policy/camera/index.html new file mode 100644 index 0000000000..ce10a454f0 --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/camera/index.html @@ -0,0 +1,57 @@ +--- +title: 'Feature-Policy: camera' +slug: Web/HTTP/Headers/Feature-Policy/camera +tags: + - Feature-Policy + - HTTP + - Reference + - camera + - ãã£ã¬ã¯ãã£ã + - æ©èœããªã·ãŒ +translation_of: Web/HTTP/Headers/Feature-Policy/camera +--- +<div>{{HTTPSidebar}} {{SeeCompatTable}}</div> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒã«ããã <code>camera</code> ãã£ã¬ã¯ãã£ãã¯ãçŸåšã®ææžãåç»å
¥åæ©åšã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãæå¹ã§ããã°ã {{domxref("MediaDevices.getUserMedia()")}} ããè¿åŽããã {{jsxref("Promise")}} ã <code>NotAllowedError</code> ã§æåŠãããŸãã</span></p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Feature-Policy: camera <allowlist>;</pre> + +<dl> + <dt><allowlist></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}æ¢å®å€ã¯ <code>'self'</code> ã§ãã</dd> +</dl> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Feature Policy')}}</td> + <td>{{Spec2('Feature Policy')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Feature-Policy.camera")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/encrypted-media/index.html b/files/ja/web/http/headers/feature-policy/encrypted-media/index.html new file mode 100644 index 0000000000..54c34a8def --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/encrypted-media/index.html @@ -0,0 +1,67 @@ +--- +title: 'Feature-Policy: encrypted-media' +slug: Web/HTTP/Headers/Feature-Policy/encrypted-media +tags: + - Directive + - EME + - Feature-Policy + - HTTP + - Reference + - ãã£ã¬ã¯ãã£ã + - æ©èœããªã·ãŒ +translation_of: Web/HTTP/Headers/Feature-Policy/encrypted-media +--- +<p>{{HTTPSidebar}}{{SeeCompatTable}}</p> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒã«ããã <code>encrypted-media</code> ãã£ã¬ã¯ãã£ãã¯ãçŸåšã®ææžã <a href="/ja/docs/Web/API/Encrypted_Media_Extensions_API">Encrypted Media Extensions</a> API (EME) ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãæå¹ã§ããã°ã {{domxref("Navigator.requestMediaKeySystemAccess","Navigator.requestMediaKeySystemAccess()")}} ããè¿åŽããã {{jsxref("Promise")}} ã {{domxref("DOMException")}} ã§æåŠãããŸãã</span></p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Feature-Policy: encrypted-media <allowlist>;</pre> + +<dl> + <dt><allowlist></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}</dd> +</dl> + +<h2 id="Default_policy" name="Default_policy">æ¢å®ã®ããªã·ãŒ</h2> + +<p>èš±å¯ãªã¹ã㯠<code>'self'</code> ã§ãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("Feature Policy")}}</td> + <td>{{Spec2("Feature Policy")}}</td> + <td>ååå®çŸ©</td> + </tr> + <tr> + <td>{{SpecName("EME","#feature-policy-integration","Feature Policy integration")}}</td> + <td>{{Spec2("EME")}}</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Feature-Policy.encrypted-media")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/fullscreen/index.html b/files/ja/web/http/headers/feature-policy/fullscreen/index.html new file mode 100644 index 0000000000..79067b06f3 --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/fullscreen/index.html @@ -0,0 +1,89 @@ +--- +title: 'Feature-Policy:fullscreen' +slug: Web/HTTP/Headers/Feature-Policy/fullscreen +tags: + - Feature-Policy + - HTTP + - HTTP ã¬ã¹ãã³ã¹ããã㌠+ - fullscreen + - ããã㌠+ - å
šç»é¢ + - æ©èœããªã·ãŒ +translation_of: Web/HTTP/Headers/Feature-Policy/fullscreen +--- +<div>{{HTTPSidebar}} {{SeeCompatTable}}</div> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒã«ããã <code>fullscreen</code> ãã£ã¬ã¯ãã£ãã¯ãçŸåšã®ææžã {{domxref('Element.requestFullScreen()')}} ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãæå¹ã§ããã°ã è¿åŽããã {{jsxref('Promise')}} ã {{jsxref('TypeError')}} ã§æåŠãããŸãã</span></p> + +<p>æ¢å®ã§ã¯ãæäžäœã®ææžããã³ãã®åããªãªãžã³ã®åãã¬ãŒã ãå
šç»é¢ã¢ãŒããèŠæ±ããå
¥ãããšãã§ããŸãããã®ãã£ã¬ã¯ãã£ãã¯å¥ãªãªãžã³ã®ãã¬ãŒã ãå
šç»é¢ã¢ãŒãã䜿çšããããšãèš±å¯ãããæåŠãããããŸããåããªãªãžã³ã®ãã¬ãŒã ãå«ã¿ãŸãã</p> + +<div class="note"> +<p>ãã®ãã£ã¬ã¯ãã£ããš <code>allowfullscreen</code> ãåã <code><iframe></code> èŠçŽ ã«æå®ãããŠããå Žåããã®ãã£ã¬ã¯ãã£ããåªå
ããŸãã</p> +</div> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Feature-Policy: fullscreen <allowlist>;</pre> + +<dl> + <dt><allowlist></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}æ¢å®å€ã¯ <code>'self'</code> ã§ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="General_example" name="General_example">äžè¬çãªäŸ</h3> + +<p>SecureCorp Inc. ã¯ãèªåèªèº«ã®ãªãªãžã³ããã³ãªãªãžã³ã <code>https://example.com</code> ã®ãã®ãé€ããŠãã¹ãŠã® Fullscreen API ãç¡å¹ã«ãããã£ãŠãããšããŸãã以äžã®æ©èœããªã·ãŒãèšå®ãã HTTP ã¬ã¹ãã³ã¹ããããŒãé
ä¿¡ããããšã§å®çŸã§ããŸãã</p> + +<pre class="brush: bash">Feature-Policy: fullscreen 'self' https://example.com</pre> + +<h3 id="With_an_<iframe>_element" name="With_an_<iframe>_element"><iframe> èŠçŽ ãš</h3> + +<p>FastCorp Inc. ã¯ãç¹å®ã® <iframe> ãé€ãããã¹ãŠã®å¥ãªãªãžã³ã®åãã¬ãŒã ã® <code>fullscreen</code> ãç¡å¹ã«ãããã£ãŠãããšããŸãã以äžã®æ©èœããªã·ãŒãèšå®ãã HTTP ã¬ã¹ãã³ã¹ããããŒãé
ä¿¡ããããšã§å®çŸã§ããŸãã</p> + +<pre class="brush: bash">Feature-Policy: fullscreen 'self'</pre> + +<p>ãããã <code><iframe></code> èŠçŽ ã« {{HTMLElement('iframe','allow','#Attributes')}} å±æ§ãå«ããŸãã</p> + +<pre class="brush: html"><iframe src="https://other.com/videoplayer" allow="fullscreen"></iframe></pre> + +<p>iframe ã®å±æ§ã¯ãéžæçã«ç¹å®ã®ãã¬ãŒã ã®æ©èœãæå¹ã«ãããã®ä»ã¯ããšããããã®ãã¬ãŒã ãåããªãªãžã³ããããææžãå«ãã§ããŠãç¡å¹ã«ããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Feature Policy')}}</td> + <td>{{Spec2('Feature Policy')}}</td> + <td>ååå®çŸ©</td> + </tr> + <tr> + <td>{{SpecName('Fullscreen','#feature-policy-integration','Fullscreen')}}</td> + <td>{{Spec2('Feature Policy')}}</td> + <td><code>fullscreen</code> ããªã·ãŒãå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Feature-Policy.fullscreen")}}</p> + +<h2 id="See_also">See also</h2> + +<ul> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/geolocation/index.html b/files/ja/web/http/headers/feature-policy/geolocation/index.html new file mode 100644 index 0000000000..caa657ed56 --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/geolocation/index.html @@ -0,0 +1,78 @@ +--- +title: 'Feature-Policy:geolocation' +slug: Web/HTTP/Headers/Feature-Policy/geolocation +tags: + - Geolocation + - HTTP + - HTTP ã¬ã¹ãã³ã¹ããã㌠+ - ããã㌠+ - æ©èœããªã·ãŒ +translation_of: Web/HTTP/Headers/Feature-Policy/geolocation +--- +<div>{{HTTPSidebar}} {{SeeCompatTable}}</div> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒã«ããã <code>geolocation</code> ãã£ã¬ã¯ãã£ãã¯ãçŸåšã®ææžã {{domxref('Geolocation')}} ã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãæå¹ã§ããã°ã {{domxref('Geolocation.getCurrentPosition','getCurrentPosition()')}} ããã³ {{domxref('Geolocation.watchPosition','watchPosition()')}} ãåŒã³åºããšãé¢æ°ã®ã³ãŒã«ããã¯ãåŒã³åºããã {{domxref('PositionError')}} ã³ãŒãã <code>PERMISSION_DENIED</code> ã«ãªããŸãã</span></p> + +<p>æ¢å®ã§ã¯ã Geolocation API ã¯æäžäœã®ææžããã³ãã®åããªãªãžã³ã®åãã¬ãŒã ã®äžã§äœ¿çšããããšãã§ããŸãããã®ãã£ã¬ã¯ãã£ãã¯å¥ãªãªãžã³ã®ãã¬ãŒã ã«ããäœçœ®æ
å ±ãžã®ã¢ã¯ã»ã¹ãèš±å¯ãããæåŠãããããŸããåããªãªãžã³ã®ãã¬ãŒã ãå«ã¿ãŸãã</p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Feature-Policy: geolocation <allowlist>;</pre> + +<dl> + <dt><allowlist></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}æ¢å®å€ã¯ <code>'self'</code> ã§ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="General_example" name="General_example">äžè¬çãªäŸ</h3> + +<p>SecureCorp Inc. ã¯ãèªåèªèº«ã®ãªãªãžã³ããã³ãªãªãžã³ã <code>https://example.com</code> ã®ãã®ãé€ããŠãã¹ãŠã® Geolocation API ãç¡å¹ã«ãããã£ãŠãããšããŸãã以äžã®æ©èœããªã·ãŒãèšå®ãã HTTP ã¬ã¹ãã³ã¹ããããŒãé
ä¿¡ããããšã§å®çŸã§ããŸãã</p> + +<pre class="brush: bash">Feature-Policy: geolocation 'self' https://example.com</pre> + +<h3 id="With_an_<iframe>_element" name="With_an_<iframe>_element"><iframe> èŠçŽ ãš</h3> + +<p>FastCorp Inc. ã¯ãç¹å®ã® <iframe> ãé€ãããã¹ãŠã®å¥ãªãªãžã³ã®åãã¬ãŒã ã® <code>geolocation</code> ãç¡å¹ã«ãããã£ãŠãããšããŸãã以äžã®æ©èœããªã·ãŒãèšå®ãã HTTP ã¬ã¹ãã³ã¹ããããŒãé
ä¿¡ããããšã§å®çŸã§ããŸãã</p> + +<pre class="brush: bash">Feature-Policy: geolocation 'self'</pre> + +<p>ãããã <code><iframe></code> èŠçŽ ã« {{HTMLElement('iframe','allow','#Attributes')}} å±æ§ãå«ããŸãã</p> + +<pre class="brush: html"><iframe src="https://other.com/map" allow="geolocation"></iframe></pre> + +<p>iframe ã®å±æ§ã¯ãéžæçã«ç¹å®ã®ãã¬ãŒã ã®æ©èœãæå¹ã«ãããã®ä»ã¯ããšããããã®ãã¬ãŒã ãåããªãªãžã³ããããææžãå«ãã§ããŠãç¡å¹ã«ããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Feature Policy')}}</td> + <td>{{Spec2('Feature Policy')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Feature-Policy.geolocation")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/index.html b/files/ja/web/http/headers/feature-policy/index.html new file mode 100644 index 0000000000..a687bb5a8f --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/index.html @@ -0,0 +1,161 @@ +--- +title: Feature-Policy +slug: Web/HTTP/Headers/Feature-Policy +tags: + - Authorization + - Experimental + - Feature Policy + - Feature-Policy + - HTTP + - Permissions + - Reference + - Security + - Web + - header +translation_of: Web/HTTP/Headers/Feature-Policy +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary">HTTP ã® <strong><code>Feature-Policy</code></strong> ããããŒã¯ãèªèº«ã®ãã¬ãŒã ããã³ææžå
ã® {{HTMLElement("iframe")}} èŠçŽ ã§ããã©ãŠã¶ãŒã®æ©èœã䜿çšããããšãèš±å¯ãŸãã¯æåŠããä»çµã¿ãæäŸããŸãã</span></p> + +<div class="note"> +<p>ãã®ããããŒã¯ãŸã å®éšçãªç¶æ
ã§ãããéæå€æŽãããå¯èœæ§ããããŸãããŠã§ããµã€ãã«å®è£
ããéã«ã¯æ³šæããŠãã ãããçŸåšããã®ããããŒã¯ä»æ§ã§ã¯ <code>Permissions-Policy</code> ã«æ¹åãããŠããããã®èšäºã¯æçµçã«ã¯ãã®å€æŽãåæ ããŠæŽæ°ãããäºå®ã§ãã</p> +</div> + +<p>詳ããã¯ã<a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a>ã®èšäºãåç
§ããŠãã ããã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Feature-Policy: <directive> <allowlist></pre> + +<dl> + <dt><code><directive></code></dt> + <dd><code>allowlist</code> ã«é©çšãããæ©èœããªã·ãŒãã£ã¬ã¯ãã£ãã§ããèš±å¯ãããŠãããã£ã¬ã¯ãã£ãåã®äžèŠ§ã¯ã以äžã®{{anch("Directives", "ãã£ã¬ã¯ãã£ã")}}ãåç
§ããŠãã ããã</dd> + <dt><code><allowlist></code></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}</dd> +</dl> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt>{{httpheader('Feature-Policy/accelerometer','accelerometer')}}</dt> + <dd>çŸåšã®ææžãã端æ«ã®å é床ã«é¢ããæ
å ±ãã {{DOMxRef("Accelerometer")}} ã€ã³ã¿ãŒãã§ã€ã¹ãéããŠåéããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader('Feature-Policy/ambient-light-sensor','ambient-light-sensor')}}</dt> + <dd>çŸåšã®ææžãã端æ«ã®åšå²ã®ç°å¢ã«ãããå
éã«ã€ããŠã®æ
å ±ãã {{DOMxRef("AmbientLightSensor")}} ã€ã³ã¿ãŒãã§ã€ã¹ãéããŠåéããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader('Feature-Policy/autoplay','autoplay')}}</dt> + <dd>çŸåšã®ææžã§ {{domxref("HTMLMediaElement")}} ã€ã³ã¿ãŒãã§ã€ã¹ãã¡ãã£ã¢ã®èªååçããªã¯ãšã¹ãããããšãç¡å¹ã«ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãæå¹ã§ããããŠãŒã¶ãŒã«ããæäœããªãã£ãå Žåã {{domxref("HTMLMediaElement.play()")}} ãè¿ã {{jsxref("Promise")}} ã {{domxref("DOMException")}} ã§æåŠãããŸãã {{HTMLELement("audio")}} ããã³ {{HTMLElement("video")}} èŠçŽ ã® <code>autoplay</code> å±æ§ã¯ç¡èŠãããŸãã</dd> + <dt>{{httpheader('Feature-Policy/battery','battery')}}</dt> + <dd><a href="/docs/Web/API/Battery_Status_API">Battery Status API</a> ã®äœ¿çšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ã«ãªã£ãŠããå Žåã {{DOMxRef("Navigator.getBattery","Navigator.getBattery()")}} ãè¿ã {{JSxRef("Promise")}} 㯠{{Exception("NotAllowedError")}} ã® {{DOMxRef("DOMException")}} ã§æåŠãããŸãã</dd> + <dt>{{httpheader('Feature-Policy/camera', 'camera')}}</dt> + <dd>çŸåšã®ææžãåç»å
¥åæ©åšã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ã§ããã°ã {{domxref("MediaDevices.getUserMedia", "getUserMedia()")}} ãè¿ã {{jsxref("Promise")}} ã {{Exception("NotAllowedError")}} ã® {{DOMxRef("DOMException")}} ã§æåŠãããŸãã</dd> + <dt>{{HTTPHeader('Feature-Policy/display-capture', 'display-capture')}}</dt> + <dd>çŸåšã®ææžã {{domxref("MediaDevices.getDisplayMedia", "getDisplayMedia()")}} ã¡ãœããã䜿çšããŠç»é¢ã®å
容ããã£ããã£ããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ã§ããã°ã衚瀺å
容ããã£ããã£ããèš±å¯ããªãå Žåã <code>getDisplayMedia()</code> ããè¿åŽããããããã¹ã {{Exception("NotAllowedError")}} ã§æåŠãããŸãã</dd> + <dt>{{httpheader('Feature-Policy/document-domain','document-domain')}}</dt> + <dd>çŸåšã®ææžã {{domxref("document.domain")}} ãèšå®ããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ãªå Žåã {{domxref("document.domain")}} ãèšå®ããããšãããšå€±æãã {{Exception("SecurityError")}} ã® {{domxref("DOMException")}} ãçºçããŸãã</dd> + <dt>{{httpheader('Feature-Policy/encrypted-media', 'encrypted-media')}}</dt> + <dd>çŸåšã®ææžã <a href="/ja/docs/Web/API/Encrypted_Media_Extensions_API">Encrypted Media Extensions</a> API (EME) ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ã§ããã°ã {{domxref("Navigator.requestMediaKeySystemAccess()")}} ããè¿åŽããã {{jsxref("Promise")}} ã {{domxref("DOMException")}} ã§æåŠãããŸãã</dd> + <dt>{{httpheader('Feature-Policy/execution-while-not-rendered', 'execution-while-not-rendered')}}</dt> + <dd>衚瀺ãããªããã¬ãŒã å
(äŸãã° iframe ã <code><a href="/ja/docs/Web/HTML/Global_attributes/hidden">hidden</a></code> ãŸã㯠<code>display: none</code> ã®å Žå) ã§ã¿ã¹ã¯ãå®è¡ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader('Feature-Policy/execution-while-out-of-viewport', 'execution-while-out-of-viewport')}}</dt> + <dd>ãã¥ãŒããŒãã®èŠããç¯å²å€ã«ãããã¬ãŒã å
ã®ã¿ã¹ã¯ãå®è¡ãããã©ãããå¶åŸ¡ããŸãã</dd> +</dl> + +<dl> + <dt>{{httpheader('Feature-Policy/fullscreen','fullscreen')}}</dt> + <dd>çŸåšã®ææžã {{domxref('Element.requestFullScreen()')}} ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ã§ããã°ãè¿åŽããã {{jsxref('Promise')}} ã {{jsxref('TypeError')}} ã§æåŠãããŸãã</dd> + <dt>{{httpheader('Feature-Policy/geolocation','geolocation')}}</dt> + <dd>çŸåšã®ææžã {{domxref('Geolocation')}} ã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ã§ããã°ã {{domxref('Geolocation.getCurrentPosition','getCurrentPosition()')}} ããã³ {{domxref('Geolocation.watchPosition','watchPosition()')}} ãåŒã³åºããšãé¢æ°ã®ã³ãŒã«ããã¯ãåŒã³åºããã {{domxref('PositionError')}} ã³ãŒãã <code>PERMISSION_DENIED</code> ã«ãªããŸãã</dd> + <dt>{{httpheader('Feature-Policy/gyroscope','gyroscope')}}</dt> + <dd>çŸåšã®ææžã {{DOMxRef("Gyroscope")}} ã€ã³ã¿ãŒãã§ã€ã¹ãéããŠã端æ«ã®æ¹åã«é¢ããæ
å ±ãåéããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader('Feature-Policy/layout-animations','layout-animations')}}</dt> + <dd>çŸåšã®ææžãã¬ã€ã¢ãŠãã¢ãã¡ãŒã·ã§ã³ã衚瀺ããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> +</dl> + +<dl> + <dt>{{httpheader('Feature-Policy/legacy-image-formats','legacy-image-formats')}}</dt> + <dd>çŸåšã®ææžãå€ã圢åŒã®ç»åã衚瀺ããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> +</dl> + +<dl> + <dt>{{httpheader('Feature-Policy/magnetometer','magnetometer')}}</dt> + <dd>çŸåšã®ææžã {{DOMxRef("Magnetometer")}} ã€ã³ã¿ãŒãã§ã€ã¹ãéããŠã端æ«ã®æ¹åã«é¢ããæ
å ±ãåéããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader('Feature-Policy/microphone','microphone')}}</dt> + <dd>çŸåšã®ææžããªãŒãã£ãªå
¥å端æ«ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ã§ããã°ã {{domxref("MediaDevices.getUserMedia()")}} ã§è¿åŽããã {{jsxref('Promise')}} ã {{Exception("NotAllowedError")}} ã§æåŠãããŸãã</dd> + <dt>{{httpheader('Feature-Policy/midi', 'midi')}}</dt> + <dd>çŸåšã®ææžã <a href="/ja/docs/Web/API/Web_MIDI_API">Web MIDI API</a> ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ã§ããã°ã {{domxref("Navigator.requestMIDIAccess()")}} ããè¿åŽããã {{jsxref("Promise")}} ã {{domxref("DOMException")}} ã§æåŠãããŸãã</dd> + <dt>{{httpheader('Feature-Policy/navigation-override','navigation-override')}}</dt> + <dd>ããŒãžäœæè
ã <a href="https://www.w3.org/TR/css-nav/">空éããã²ãŒã·ã§ã³</a>ã®åäœãå¶åŸ¡ããããå®å
šã«ãã£ã³ã»ã«ãããããããšãã§ããä»çµã¿ã®å©çšå¯èœæ§ãå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader('Feature-Policy/oversized-images','oversized-images')}}</dt> + <dd>çŸåšã®ææžã倧ããªç»åãããŠã³ããŒãããŠè¡šç€ºããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader('Feature-Policy/payment', 'payment')}}</dt> + <dd>çŸåšã®ææžã <a href="/ja/docs/Web/API/Payment_Request_API">Payment Request API</a> ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãæå¹ã§ããã°ã {{domxref("PaymentRequest","PaymentRequest()")}} ã³ã³ã¹ãã©ã¯ã¿ãŒã§ {{Exception("SecurityError")}} ã® {{domxref("DOMException")}} ãçºçããŸãã</dd> + <dt>{{httpheader('Feature-Policy/picture-in-picture', 'picture-in-picture')}}</dt> + <dd>çŸåšã®ææžãã該åœãã API ã䜿çšã㊠Picture-in-Picture ã¢ãŒãã§åç»ãåçããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader("Feature-Policy/publickey-credentials-get", "publickey-credentials-get")}}</dt> + <dd>çŸåšã®ææžã <a href="/ja/docs/Web/API/Web_Authentication_API">Web Authentication API</a> ã䜿çšããŠããã§ã«ä¿åãããŠããå
¬ééµèªèšŒæ
å ±ãåååŸããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸã (äŸ: {{domxref("CredentialsContainer.get","navigator.credentials.get({publicKey: ..., ...})")}})ã</dd> + <dt>{{httpheader('Feature-Policy/sync-xhr', 'sync-xhr')}}</dt> + <dd>çŸåšã®ææžãåæ {{DOMxRef("XMLHttpRequest")}} ãªã¯ãšã¹ããè¡ãããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader('Feature-Policy/usb', 'usb')}}</dt> + <dd>çŸåšã®ææžã <a href="https://wicg.github.io/webusb/">WebUSB API</a> ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader('Feature-Policy/vr', 'vr')}} {{deprecated_inline}}</dt> + <dd>çŸåšã®ææžã <a href="/ja/docs/Web/API/WebVR_API">WebVR API</a> ã®äœ¿çšãèš±å¯ãããŠãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ã«ãªã£ãŠããå Žåã {{domxref("Navigator.getVRDisplays","Navigator.getVRDisplays()")}} ãè¿ã {{jsxref("Promise")}} 㯠{{domxref("DOMException")}} ã§æåŠãããŸãã WebVR æšæºã¯ <a href="/ja/docs/Web/API/WebXR_Device_API">WebXR</a> ã«çœ®ãæãããã€ã€ããããšã«çæããŠãã ããã</dd> + <dt>{{httpheader('Feature-Policy/wake-lock', 'wake-lock')}}</dt> + <dd>çŸåšã®ææžã <a href="https://www.w3.org/TR/wake-lock/">Wake Lock API</a> ã䜿çšããŠã端æ«ãçé»åã¢ãŒãã«å
¥ããªãããšã瀺ãããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader('Feature-Policy/screen-wake-lock', 'screen-wake-lock')}}</dt> + <dd>çŸåšã®ææžã <a href="/ja/docs/Web/API/Screen_Wake_Lock_API">Screen Wake Lock API</a> ã䜿çšããŠã端æ«ãç»é¢ããªãã«ãããæããããããŠã¯ãããªãããšã瀺ãããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader("Feature-Policy/web-share", "web-share")}}</dt> + <dd>çŸåšã®ææžã Web Share API ã® {{domxref("Navigator.share","Navigator.share()")}} ã䜿çšããŠãããã¹ãããªã³ã¯ãç»åããã®ä»ã®ã³ã³ãã³ããã¢ãã€ã«ã¢ããªãªã©ã®ãŠãŒã¶ãŒãä»»æã«éžæããä»»æã®å Žæã«å
±æããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> + <dt>{{httpheader("Feature-Policy/xr-spatial-tracking", "xr-spatial-tracking")}}</dt> + <dd>çŸåšã®ææžã <a href="/ja/docs/Web/API/WebXR_Device_API">WebXR Device API</a> ã䜿çšã㊠WebXR ã»ãã·ã§ã³ãšå¯Ÿè©±ããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãã</dd> +</dl> + +<h2 id="Example" name="Example">äŸ</h2> + +<p>SecureCorp Inc. ããã¢ããªã±ãŒã·ã§ã³ã§ãã€ã¯ãš Geolocation API ãç¡å¹ã«ãããã£ãŠãããšããŸãã以äžã®æ©èœããªã·ãŒãèšå®ãã HTTP ã¬ã¹ãã³ã¹ããããŒãé
ä¿¡ããããšã§å®çŸã§ããŸãã</p> + +<pre class="notranslate">Feature-Policy: microphone 'none'; geolocation 'none'</pre> + +<p>ãªãªãžã³ã®ãªã¹ãã« <code>'none'</code> ããŒã¯ãŒããæå®ãããšãæå®ãããæ©èœããªãªãžã³ã«é¢ä¿ãªãããã¹ãŠã®é²èŠ§ã³ã³ããã¹ã (iframe ãå«ã) ã§ç¡å¹ã«ãªããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + </tr> + </thead> + <tbody> + <tr> + <td><a href="https://w3c.github.io/webappsec-permissions-policy/#permissions-policy-http-header-field">Permissions Policy</a></td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>{{Compat("http.headers.Feature-Policy")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> + <li>{{DOMxRef("Document.featurePolicy")}} ããã³ {{DOMxRef("FeaturePolicy")}}</li> + <li><a class="external external-icon" href="https://chrome.google.com/webstore/detail/feature-policy-tester-dev/pchamnkhkeokbpahnocjaeednpbpacop" rel="noopener">Feature-Policy Tester (Chrome Developer Tools extension)</a></li> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>{{HTTPHeader("Referrer-Policy")}}</li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/microphone/index.html b/files/ja/web/http/headers/feature-policy/microphone/index.html new file mode 100644 index 0000000000..82a87bfea6 --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/microphone/index.html @@ -0,0 +1,57 @@ +--- +title: 'Feature-Policy:microphone' +slug: Web/HTTP/Headers/Feature-Policy/microphone +tags: + - Feature-Policy + - HTTP + - HTTP ã¬ã¹ãã³ã¹ããã㌠+ - microphone + - ããã㌠+ - æ©èœããªã·ãŒ +translation_of: Web/HTTP/Headers/Feature-Policy/microphone +--- +<div>{{HTTPSidebar}} {{SeeCompatTable}}</div> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒã«ããã <code>microphone</code> ãã£ã¬ã¯ãã£ãã¯ãçŸåšã®ææžããªãŒãã£ãªå
¥å端æ«ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãæå¹ã§ããã°ã {{domxref("MediaDevices.getUserMedia()")}} ã§è¿åŽããã {{jsxref('Promise')}} ã <code>NotAllowedError</code> ã§æåŠãããŸãã</span></p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Feature-Policy: microphone <allowlist>;</pre> + +<dl> + <dt><allowlist></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}æ¢å®å€ã¯ <code>'self'</code> ã§ãã</dd> +</dl> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Feature Policy')}}</td> + <td>{{Spec2('Feature Policy')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Feature-Policy.microphone")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/midi/index.html b/files/ja/web/http/headers/feature-policy/midi/index.html new file mode 100644 index 0000000000..5cee03b47a --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/midi/index.html @@ -0,0 +1,62 @@ +--- +title: 'Feature-Policy: midi' +slug: Web/HTTP/Headers/Feature-Policy/midi +tags: + - Directive + - Feature-Policy + - HTTP + - MIDI + - Reference + - ãã£ã¬ã¯ãã£ã + - æ©èœããªã·ãŒ +translation_of: Web/HTTP/Headers/Feature-Policy/midi +--- +<p>{{HTTPSidebar}}{{SeeCompatTable}}</p> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒã«ããã <code>midi</code> ãã£ã¬ã¯ãã£ãã¯ãçŸåšã®ææžã <a href="/ja/docs/Web/API/Web_MIDI_API">Web MIDI API</a> ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãæå¹ã§ããã°ã {{domxref("Navigator.requestMIDIAccess()")}} ããè¿åŽããã {{jsxref("Promise")}} ã <code>DOMException</code> ã§æåŠãããŸãã</span></p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Feature-Policy: midi <allowlist>;</pre> + +<dl> + <dt><allowlist></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}</dd> +</dl> + +<h2 id="Default_policy" name="Default_policy">æ¢å®ã®ããªã·ãŒ</h2> + +<p>èš±å¯ãªã¹ã㯠<code>'self'</code> ã§ãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Feature Policy')}}</td> + <td>{{Spec2('Feature Policy')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Feature-Policy.midi")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/payment/index.html b/files/ja/web/http/headers/feature-policy/payment/index.html new file mode 100644 index 0000000000..1088399ba3 --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/payment/index.html @@ -0,0 +1,68 @@ +--- +title: 'Feature-Policy: payment' +slug: Web/HTTP/Headers/Feature-Policy/payment +tags: + - Directive + - Feature Policy + - Feature-Policy + - HTTP + - Payment Request API + - Payments API + - Reference + - æ±ºæž API +translation_of: Web/HTTP/Headers/Feature-Policy/payment +--- +<div>{{HTTPSidebar}} {{SeeCompatTable}}</div> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒãã£ãŒã«ãã«ããã <code>payment</code> ãã£ã¬ã¯ãã£ãã¯ãçŸåšã®ææžã <a href="/ja/docs/Web/API/Payment_Request_API">Payment Request API</a> ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãç¡å¹ã§ããã°ã {{DOMxRef("PaymentRequest()")}} ã³ã³ã¹ãã©ã¯ã¿ãŒã§ {{exception("SyntaxError")}} äŸå€ãçºçããŸãã</span></p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Feature-Policy: payment <allowlist>;</pre> + +<dl> + <dt><allowlist></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}</dd> +</dl> + +<h2 id="Default_policy" name="Default_policy">æ¢å®ã®ããªã·ãŒ</h2> + +<p><code>payment</code> æ©èœã®æ¢å®ã®èš±å¯ãªã¹ãã®å€ã¯ <code>'self'</code> ã§ãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Payment')}}</td> + <td>{{Spec2('Payment')}}</td> + <td>See <a href="https://w3c.github.io/payment-request/#feature-policy">Section 16. Feature Policy integration</a>.</td> + </tr> + <tr> + <td>{{SpecName('Feature Policy')}}</td> + <td>{{Spec2('Feature Policy')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Feature-Policy.payment")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒãã£ãŒã«ã</li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> +</ul> diff --git a/files/ja/web/http/headers/feature-policy/vr/index.html b/files/ja/web/http/headers/feature-policy/vr/index.html new file mode 100644 index 0000000000..fbc2792f53 --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/vr/index.html @@ -0,0 +1,71 @@ +--- +title: 'Feature-Policy: vr' +slug: Web/HTTP/Headers/Feature-Policy/vr +tags: + - Directive + - Feature Policy + - Feature-Policy + - HTTP + - Reference + - WebVR +translation_of: Web/HTTP/Headers/Feature-Policy/vr +--- +<div>{{HTTPSidebar}} {{SeeCompatTable}}</div> + +<p class="warning"><a href="/ja/docs/Web/API/WebVR_API">WebVR API</a> 㯠<a href="/ja/docs/Web/API/WebXR_API">WebXR Device API</a> ã§çœ®ãæãããããŠã§ããã©ãããã©ãŒã ããåé€ããã€ã€ãããšããã§ãã代ããã« WebXR Device API ã®ããã®æ©èœèå¥å {{HTTPHeader("Feature-Policy/xr-spatial-tracking","xr-spatial-tracking")}} ã䜿çšããŠãã ããã</p> + +<p><span class="seoSummary">HTTP ã® {{HTTPHeader("Feature-Policy")}} ããããŒã«ããã <code>vr</code> ãã£ã¬ã¯ãã£ãã¯ãçŸåšã®ææžã <a href="/ja/docs/Web/API/WebVR_API">WebVR API</a> ã䜿çšããããšãèš±å¯ãããã©ãããå¶åŸ¡ããŸãããã®ããªã·ãŒãæå¹ã§ããã°ã {{DOMxRef("Navigator.getVRDisplays","Navigator.getVRDisplays()")}} ããè¿åŽããã {{JSxRef("Promise")}} ã {{DOMxRef("DOMException")}} ã§æåŠãããŸãã</span></p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Feature-Policy: vr <allowlist>;</pre> + +<dl> + <dt><allowlist></dt> + <dd>{{page("/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy", "allowlist")}}</dd> + <dd>/dl> + <h2 id="Default_policy" name="Default_policy">æ¢å®ã®ããªã·ãŒ</h2> + + <p>æ¢å®ã®èš±å¯ãªã¹ã㯠<code>'self'</code> ã§ãã</p> + < + + <h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + + <table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td><a href="https://immersive-web.github.io/webxr/#feature-policy">WebXR Device API</a></td> + <td>ç·šéè
èçš¿</td> + <td>ãã®ä»æ§æžã«ããã 'xr' ã®å®çŸ©</td> + </tr> + <tr> + <td>{{SpecName('Feature Policy')}}</td> + <td>{{Spec2('Feature Policy')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> + </table> + + <h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + + <div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + + <p>{{Compat("http.headers.Feature-Policy.vr")}}</p> + + <h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + + <ul> + <li>{{HTTPHeader("Feature-Policy/xr-spatial-tracking","Feature-Policy: xr-spatial-tracking")}}</li> + <li>{{HTTPHeader("Feature-Policy")}} ããããŒ</li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy">æ©èœããªã·ãŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">æ©èœããªã·ãŒã®äœ¿çš</a></li> + </ul> + </dd> +</dl> diff --git a/files/ja/web/http/headers/feature-policy/xr/index.html b/files/ja/web/http/headers/feature-policy/xr/index.html new file mode 100644 index 0000000000..b730a40b37 --- /dev/null +++ b/files/ja/web/http/headers/feature-policy/xr/index.html @@ -0,0 +1,8 @@ +--- +title: 'Feature-Policy: xr' +slug: Web/HTTP/Headers/Feature-Policy/xr +translation_of: Web/HTTP/Headers/Feature-Policy/xr +--- +<p>{{HTTPSidebar}}</p> + +<p>ãã®æ©èœããªã·ãŒãã£ã¬ã¯ãã£ãã¯ãããæç¹ã§ã¯ <code>xr</code> ãšããŠå®çŸ©ãããŠããŸãã (ãã ã Chrome ã§ã¯ {{httpheader("Feature-Policy/vr", "vr")}} ãšããŠå®è£
ãããŠããŸãã)ã代ããã« {{httpheader("Feature-Policy/xr-spatial-tracking", "xr-spatial-tracking")}} ã䜿çšããŠãã ããã</p> diff --git a/files/ja/web/http/headers/forwarded/index.html b/files/ja/web/http/headers/forwarded/index.html new file mode 100644 index 0000000000..adcd79014e --- /dev/null +++ b/files/ja/web/http/headers/forwarded/index.html @@ -0,0 +1,118 @@ +--- +title: Forwarded +slug: Web/HTTP/Headers/Forwarded +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - ããã㌠+ - ãªã¯ãšã¹ãããã㌠+translation_of: Web/HTTP/Headers/Forwarded +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Forwarded</code></strong> ããããŒã¯ããããã·ãèŠæ±ã®ãã¹ã«å«ãŸããŠãããšãã«å€æŽãŸãã¯å€±ãããããããã·ãµãŒããŒã®ã¯ã©ã€ã¢ã³ãåŽã®æ
å ±ãå«ãŸããŸãã</p> + +<p>ãã®ããããŒã®ä»£æ¿ã§ãäºå®äžã®æšæºãšãªã£ãŠãããã®ã¯ {{HTTPHeader("X-Forwarded-For")}}, {{HTTPHeader("X-Forwarded-Host")}}, {{HTTPHeader("X-Forwarded-Proto")}} ããããŒã§ãã</p> + +<p>ãã®ããããŒã¯ããããã°ãçµ±èšããã±ãŒã·ã§ã³äŸåã³ã³ãã³ãã®çæã«äœ¿çšãããã¯ã©ã€ã¢ã³ãã® IP ã¢ãã¬ã¹ãªã©ã®æ©å¯æ
å ±ãå
¬éããŸãããããã£ãŠããã®ããããŒãå±éããéã«ã¯ããŠãŒã¶ãŒã®ãã©ã€ãã·ãŒã念é ã«çœ®ãå¿
èŠããããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Forwarded: by=<identifier>; for=<identifier>; host=<host>; proto=<http|https> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><identifier></dt> + <dd>ãããã·ã®äœ¿çšæã«å€æŽãŸãã¯å€±ãããæ
å ±ãå
¬éããèå¥åãããã¯æ¬¡ã®ããããã§ãã + <ul> + <li>IP ã¢ãã¬ã¹ (v4 å㯠v6ãä»»æã§ããŒãçªå·ä»ãã ipv6 ã¯åŒçšç¬Šãšè§æ¬åŒ§ã§å²ãŸããŸã)</li> + <li>é£èªåãããèå¥å ("_hidden" ã "_secret" ãªã©)</li> + <li>åã¯å
è¡ãããšã³ãã£ãã£ãäžæãªå Žå (åã³äŸç¶ãšããŠèŠæ±ã®è»¢éãè¡ãããããšã瀺ãããå Žå) 㯠"unknown"</li> + </ul> + </dd> + <dt>by=<identifier></dt> + <dd>èŠæ±ããããã·ãµãŒããŒã«å
¥ã£ãŠããã€ã³ã¿ãŒãã§ã€ã¹ã</dd> + <dt>for=<identifier></dt> + <dd>èŠæ±ãçºè¡ããã¯ã©ã€ã¢ã³ããšããã®åŸã®ãããã·ãã§ãŒã³å
ã®ãããã·ã</dd> + <dt>host=<host></dt> + <dd>ãããã·ããåä¿¡ãããšãã® {{HTTPHeader("Host")}} ãªã¯ãšã¹ãããããŒã</dd> + <dt>proto=<http|https></dt> + <dd> + <p>ãã®ãããã³ã«ãèŠæ±ã®äœæã«äœ¿çšãããã (ãµã€ã㯠"http" å㯠"https")ã</p> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Using_the_Forwarded_header" name="Using_the_Forwarded_header"><code>Forwarded</code> ããããŒã®äœ¿çš</h3> + +<pre>Forwarded: for="_mdn" + +# 倧æåå°æåã®åºå¥ãªã +Forwarded: For="[2001:db8:cafe::17]:4711" + +# ã»ãã³ãã³åºåã +Forwarded: for=192.0.2.60; proto=http; by=203.0.113.43 + +# è€æ°ã®å€ãã³ã³ãã§åºåã£ãŠè¿œå å¯èœ +Forwarded: for=192.0.2.43, for=198.51.100.17 +</pre> + +<h3 id="Transitioning_from_X-Forwarded-For_to_Forwarded" name="Transitioning_from_X-Forwarded-For_to_Forwarded"><code>X-Forwarded-For</code> ãã <code>Forwarded</code> ãžã®ç§»è¡</h3> + +<p>ã¢ããªã±ãŒã·ã§ã³ããµãŒããŒããããã·ãæšæºåããã <code>Forwarded</code> ããããŒã«å¯Ÿå¿ããŠããå Žåã¯ã {{HTTPHeader("X-Forwarded-For")}} ã眮ãæããããšãã§ããŸãããªãã IPv6 ã¢ãã¬ã¹ã¯ã <code>Forwarded</code> ã§ã¯åŒçšç¬Šãšè§æ¬åŒ§ã§å²ãå¿
èŠããããŸãã</p> + +<pre>X-Forwarded-For: 123.34.567.89 +Forwarded: for=123.34.567.89 + +X-Forwarded-For: 192.0.2.43, 2001:db8:cafe::17 +Forwarded: for=192.0.2.43, for="[2001:db8:cafe::17]" +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7239", "Forwarded", "4")}}</td> + <td>Forwarded HTTP Extension</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Forwarded")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("X-Forwarded-For")}}</li> + <li>{{HTTPHeader("X-Forwarded-Host")}}</li> + <li>{{HTTPHeader("X-Forwarded-Proto")}}</li> + <li>{{HTTPHeader("Via")}} â æ¥ç¶ããŠããã¯ã©ã€ã¢ã³ãã§ã¯ãªãããããã·èªèº«ã«ã€ããŠã®æ
å ±ãæäŸããŸãã</li> +</ul> diff --git a/files/ja/web/http/headers/from/index.html b/files/ja/web/http/headers/from/index.html new file mode 100644 index 0000000000..9fd9e0196e --- /dev/null +++ b/files/ja/web/http/headers/from/index.html @@ -0,0 +1,74 @@ +--- +title: From +slug: Web/HTTP/Headers/From +tags: + - HTTP + - Reference + - ããã㌠+translation_of: Web/HTTP/Headers/From +--- +<p>{{HTTPSidebar}}</p> + +<p><code><strong>From</strong></code> ãªã¯ãšã¹ãããããŒã«ã¯ããªã¯ãšã¹ãå
ã® user agent ãå¶åŸ¡ãã人ã®ãŠãŒã¶ãŒã® Eã¡ãŒã«ã¢ãã¬ã¹ãå«ãŸããŠããŸãã</p> + +<p>ãããã£ãã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ã (ã¯ããŒã©ãªã©) ã䜿çšããŠããå Žåã¯ã<code>From</code> ããããŒãéä¿¡ããå¿
èŠããããŸãããããããé床ã®äžèŠãªãªã¯ãšã¹ããç¡å¹ãªãªã¯ãšã¹ããéä¿¡ããŠãããªã©ããµãŒããŒã«åé¡ãçºçããå Žåã¯é£çµ¡ã§ããŸãã</p> + +<div class="warning"> +<p>ã¢ã¯ã»ã¹å¶åŸ¡ãŸãã¯èªèšŒã«ã¯ <code>From</code> ããããŒã䜿çšããªãã§ãã ããã</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒã¿ã€ã</th> + <td>{{Glossary("Request header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="æ§æ">æ§æ</h2> + +<pre class="syntaxbox">From: <email> +</pre> + +<h2 id="ãã£ã¬ã¯ãã£ã">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><email></dt> + <dd>ãã·ã³ã«äœ¿çšå¯èœãªé»åã¡ãŒã«ã¢ãã¬ã¹ã</dd> +</dl> + +<h2 id="äŸ">äŸ</h2> + +<pre>From: webmaster@example.org</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "From", "5.5.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºææ§">ãã©ãŠã¶ã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.From")}}</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Host")}}</li> +</ul> diff --git a/files/ja/web/http/headers/host/index.html b/files/ja/web/http/headers/host/index.html new file mode 100644 index 0000000000..e26c8e5c7d --- /dev/null +++ b/files/ja/web/http/headers/host/index.html @@ -0,0 +1,78 @@ +--- +title: Host +slug: Web/HTTP/Headers/Host +tags: + - HTTP + - Reference + - ããã㌠+ - ãªã¯ãšã¹ãããã㌠+translation_of: Web/HTTP/Headers/Host +--- +<div>{{HTTPSidebar}}</div> + +<p><code><strong>Host</strong></code> ãªã¯ãšã¹ãããããŒã¯ããªã¯ãšã¹ããéä¿¡ãããå
ã®ãµãŒããŒã®ãã¹ãåãšããŒãçªå·ãæå®ããŸãã</p> + +<p>ããŒãçªå·ãæå®ãããªãã£ãå Žåã¯ãèŠæ±ããããµãŒãã¹ã®æ¢å®ã®ããŒãïŒäŸãã° HTTPS ã® URL ã§ããã°<code>443</code>ã HTTP ã® URL ã§ããã° <code>80</code>ïŒãšã¿ãªãããŸãã</p> + +<p><code>Host</code> ããããŒé
ç®ã¯ãã¹ãŠã® HTTP/1.1 ãªã¯ãšã¹ãã¡ãã»ãŒãžã§éä¿¡ããå¿
èŠããããŸãã HTTP/1.1 ãªã¯ãšã¹ãã¡ãã»ãŒãžã« <code>Host</code> ããããŒé
ç®ããªãã£ãããäºã€ä»¥äžãã£ããããå Žå㯠{{HTTPStatus("400")}} (Bad Request) ã¹ããŒã¿ã¹ã³ãŒããè¿ãããããšããããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Host: <host>:<port> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><host></dt> + <dd>ïŒä»®æ³ãã¹ãã®ïŒãµãŒããŒã®ãã¡ã€ã³åã</dd> + <dt><port> {{optional_inline}}</dt> + <dd>ãµãŒããŒãåŸ
åãããŠãã TCP ã®ããŒãçªå·ã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Host: developer.cdn.mozilla.net</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7230", "Host", "5.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Host")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("400")}}</li> + <li>{{HTMLElement("base")}}</li> +</ul> diff --git a/files/ja/web/http/headers/if-match/index.html b/files/ja/web/http/headers/if-match/index.html new file mode 100644 index 0000000000..f7bef762af --- /dev/null +++ b/files/ja/web/http/headers/if-match/index.html @@ -0,0 +1,94 @@ +--- +title: If-Match +slug: Web/HTTP/Headers/If-Match +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - ãªã¯ãšã¹ãããã㌠+ - æ¡ä»¶ä»ããªã¯ãšã¹ã +translation_of: Web/HTTP/Headers/If-Match +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>If-Match</code></strong> ãªã¯ãšã¹ãããããŒã¯ããªã¯ãšã¹ããæ¡ä»¶ä»ãã«ããŸãã {{HTTPMethod("GET")}} ããã³ {{HTTPMethod("HEAD")}} ã¡ãœããã®å Žåããªã¹ãããã <code>ETag</code> ã®ãããããšäžèŽããå Žåã«ã®ã¿ããµãŒããŒã¯èŠæ±ããããªãœãŒã¹ãè¿ããŸãã{{HTTPMethod("PUT")}} ãšä»ã®å®å
šã§ã¯ãªãã¡ãœããã§ã¯ããã®å Žåã®ã¿ãªãœãŒã¹ãã¢ããããŒãããŸãã</p> + +<p>æ ŒçŽããã {{HTTPHeader("ETag")}} ãšã®æ¯èŒã§ã¯ã<em>匷ãæ¯èŒã¢ã«ãŽãªãºã </em>ã䜿çšãã€ãŸãäºã€ã®ãã¡ã€ã«ããã€ãåäœã§åäžã§ããå Žåã®ã¿åäžãšã¿ãªããŸããåæããã <code>ETag</code> ã« <code>W/</code> æ¥é èŸãã€ããŠããå Žåã¯åŒ±ããšã³ãã£ãã£ã¿ã°ã§ããããšã瀺ãããã®æ¯èŒã¢ã«ãŽãªãºã ã§ã®æ¯èŒã¯è¡ãããŸããã</p> + +<p>äžè¬çãªäœ¿çšäŸã¯äºã€ãããŸãã</p> + +<ul> + <li>{{HTTPMethod("GET")}} ããã³ {{HTTPMethod("HEAD")}} ã¡ãœããã®å Žåã¯ã {{HTTPHeader("Range")}} ããããŒãšçµã¿åãããŠäœ¿çšããããªã¯ãšã¹ããããæ°ããç¯å²ã以åã®ãã®ãšåããªãœãŒã¹ããã®ãã®ã§ããããšãä¿èšŒããããšãã§ããŸããäžèŽããªãå Žåã {{HTTPStatus("416")}} (Range Not Satisfiable) ã¬ã¹ãã³ã¹ãè¿ãããŸãã</li> + <li>ä»ã®ã¡ãœãããç¹ã« {{HTTPMethod("PUT")}} ã®å Žåã¯ã <code>If-Match</code> ã䜿çšããŠ<a href="https://www.w3.org/1999/04/Editing/#3.1">æŽæ°ããã°ã©ã ã倱ãããåé¡</a>ãé²ãããšãã§ããŸãããŠãŒã¶ãŒãã¢ããããŒãããããªãœãŒã¹ã®å€æŽããå
ã®ãªãœãŒã¹ããã§ãããããåŸã«è¡ãããå¥ã®å€æŽãäžæžãããªããã©ããã確èªã§ããŸãããªã¯ãšã¹ããæºããããšãã§ããªãå Žåã {{HTTPStatus("412")}} (Precondition Failed) ã¬ã¹ãã³ã¹ãè¿ãããŸãã</li> +</ul> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">If-Match: <etag_value> +If-Match: <etag_value>, <etag_value>, ⊠+</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><etag_value></dt> + <dd>ãªã¯ãšã¹ãããããªãœãŒã¹ãäžæã«è¡šããšã³ãã£ãã£ã¿ã°ã§ããäºéåŒçšç¬Šã®éã«çœ®ããã ASCII æåå (<code>"675af34563dc-tr34"</code> ãªã©) ã§ãããããã®ã¿ã°ã¯ã匱ããããšãã€ãŸããæå³çã«ã¯ãªãœãŒã¹ãè¡šçŸããŠãããããã€ãåäœã®äžèŽã瀺ããŠããªãããšã瀺ãããã«ã <code>W/</code> ãšããæ¥é èŸãä»ããããšãã§ããŸãããããã <strong><code>If-Match</code></strong> ããããŒã§ã¯ã匱ããšã³ãã£ãã£ã¿ã°ã¯äžèŽããããšã¯ãããŸããã</dd> + <dt><code>*</code></dt> + <dd>ã¢ã¹ã¿ãªã¹ã¯ã¯ä»»æã®ãªãœãŒã¹ãè¡šãç¹æ®ãªå€ã§ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">If-Match: "bfc13a64729c4290ef5b2c2730249c88ca92d82d" + +If-Match: "67ab43", "54ed21", "7892dd" + +If-Match: * +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7232", "If-Match", "3.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.If-Match")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("ETag")}}</li> + <li>{{HTTPHeader("If-Unmodified-Since")}}</li> + <li>{{HTTPHeader("If-Modified-Since")}}</li> + <li>{{HTTPHeader("If-None-Match")}}</li> + <li>{{HTTPStatus("416")}}<code> Range Not Satisfiable</code></li> + <li>{{HTTPStatus("412")}}<code> Precondition Failed</code></li> +</ul> diff --git a/files/ja/web/http/headers/if-modified-since/index.html b/files/ja/web/http/headers/if-modified-since/index.html new file mode 100644 index 0000000000..4da598b0bf --- /dev/null +++ b/files/ja/web/http/headers/if-modified-since/index.html @@ -0,0 +1,97 @@ +--- +title: If-Modified-Since +slug: Web/HTTP/Headers/If-Modified-Since +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - ãªã¯ãšã¹ãããã㌠+ - æ¡ä»¶ä»ããªã¯ãšã¹ã +translation_of: Web/HTTP/Headers/If-Modified-Since +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>If-Modified-Since</code></strong> ãªã¯ãšã¹ãããããŒã¯ããªã¯ãšã¹ããæ¡ä»¶ä»ã«ããŸãããµãŒããŒã¯æåŸã«ãªãœãŒã¹ãå€æŽãããæå»ãããªã¯ãšã¹ãã«ããäžããããæå»ããåŸã®å Žåã«ã®ã¿ããªã¯ãšã¹ãããããªãœãŒã¹ã {{HTTPStatus("200")}} ã¹ããŒã¿ã¹ãšå
±ã«è¿åŽããŸãããããªã¯ãšã¹ãã«ããäžããããæå»ä»¥éã«ãªãœãŒã¹ãå€æŽãããŠããªããã°ãã¬ã¹ãã³ã¹ã¯æ¬æãæããªã {{HTTPStatus("304")}} ã«ãªããŸããååã®ãªã¯ãšã¹ãã® {{HTTPHeader("Last-Modified")}} ã¬ã¹ãã³ã¹ããããŒã¯ãæåŸã«ãªãœãŒã¹ãå€æŽãããæå»ãå«ã¿ãŸãã {{HTTPHeader("If-Unmodified-Since")}} ãšã¯ç°ãªãã <code>If-Modified-Since</code> 㯠{{HTTPMethod("GET")}} ããã㯠{{HTTPMethod("HEAD")}} ã§ã®ã¿äœ¿çšã§ããŸãã</p> + +<p>æ¬ããããŒã¯ {{HTTPHeader("If-None-Match")}} ãšã®çµã¿åããã§äœ¿çšãããå ŽåããµãŒããŒã <code>If-None-Match</code> ã«å¯Ÿå¿ããŠããªãå Žåãé€ãç¡èŠãããŸãã</p> + +<p>æãäžè¬çãªäœ¿çšæ¹æ³ã¯ {{HTTPHeader("ETag")}} ã«é¢é£ä»ããããŠããªãããã£ãã·ã¥ããããªãœãŒã¹ãæŽæ°ããããã«çšããããšã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">If-Modified-Since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><day-name></dt> + <dd>"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ã®äžããäžã€ (倧æåã»å°æåã®åºå¥ãã)</dd> + <dt><day></dt> + <dd>2æ¡ã®æ¥ä»ãè¡šãæ°å, äŸ "04" ã "23".</dd> + <dt><month></dt> + <dd>"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ã®äžããäžã€ (倧æåã»å°æåã®åºå¥ãã)</dd> + <dt><year></dt> + <dd>4æ¡ã®å¹Žãè¡šãæ°å, äŸ "1990" ã "2016"</dd> + <dt><hour></dt> + <dd>2æ¡ã®æéãè¡šãæ°å, äŸ "09" ã "23"</dd> + <dt><minute></dt> + <dd>2æ¡ã®åãè¡šãæ°å, äŸ "04" ã "59"</dd> + <dt><second></dt> + <dd>2æ¡ã®ç§ãè¡šãæ°å, äŸ "04" ã "59"</dd> + <dt><code>GMT</code></dt> + <dd> + <p>ã°ãªãããžæšæºæã HTTP ã«ãããæå»ã¯åžžã«ã°ãªãããžæšæºæã§è¡šãããããŒã«ã«æå»ã«ãªãããšã¯ãããŸããã</p> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>If-Modified-Since: Wed, 21 Oct 2015 07:28:00 GMT +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7232", "If-Modified-Since", "3.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.If-Modified-Since")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("ETag")}}</li> + <li>{{HTTPHeader("If-Unmodified-since")}}</li> + <li>{{HTTPHeader("If-Match")}}</li> + <li>{{HTTPHeader("If-None-Match")}}</li> + <li>{{HTTPStatus("304")}}<code> Not Modified</code></li> +</ul> diff --git a/files/ja/web/http/headers/if-none-match/index.html b/files/ja/web/http/headers/if-none-match/index.html new file mode 100644 index 0000000000..26161ce00d --- /dev/null +++ b/files/ja/web/http/headers/if-none-match/index.html @@ -0,0 +1,98 @@ +--- +title: If-None-Match +slug: Web/HTTP/Headers/If-None-Match +tags: + - Conditional Requests + - HTTP + - HTTP Header + - Reference + - Request header +translation_of: Web/HTTP/Headers/If-None-Match +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>If-None-Match</code></strong> ãªã¯ãšã¹ãããããŒã¯ããªã¯ãšã¹ããæ¡ä»¶ä»ãã«ããŸãã {{HTTPMethod("GET")}} ããã³ {{HTTPMethod("HEAD")}} ã¡ãœããã®å Žåãæå®ããããã®ã®äžã«èŠæ±ããããªãœãŒã¹ã® {{HTTPHeader("ETag")}} ã«äžèŽãããã®ããªãå Žåã®ã¿ããµãŒããŒã¯ãªãœãŒã¹ã {{HTTPStatus("200")}} ã¹ããŒã¿ã¹ã§è¿ããŸãããã®ä»ã®ã¡ãœããã®å Žåãæçµçã«ååšãããªãœãŒã¹ã® {{HTTPHeader("ETag")}} ãåæããããããã®å€ãšãäžèŽããªãå Žåã«ã®ã¿åŠçããŸãã</p> + +<p>{{HTTPMethod("GET")}} ããã³ {{HTTPMethod("HEAD")}} ã¡ãœããã®å Žåãæ¡ä»¶ãæºããããªãã£ããããµãŒããŒã¯ HTTP ã¹ããŒã¿ã¹ã³ãŒã 304 (Not Modified) ãè¿ããªããã°ãªããŸããããµãŒããŒåŽã®å€æŽãé©çšããã¡ãœããã®å Žåãã¹ããŒã¿ã¹ã³ãŒã 412 (Precondition Failed) ã䜿çšãããŸãããªãã 304 ã¬ã¹ãã³ã¹ãçæãããµãŒããŒã¯ã Cache-Control, Content-Location, Date, ETag, Expires, Vary ã®åããããŒãã£ãŒã«ãã«ã€ããŠãåããªã¯ãšã¹ãã«å¯Ÿã㊠200 (OK) ã¬ã¹ãã³ã¹ã§éä¿¡ããããã®ãçæããªããã°ãªããŸããã</p> + +<p>æ ŒçŽãããŠãã {{HTTPHeader("ETag")}} ãšã®æ¯èŒã§ã¯ã<em>匱ãæ¯èŒã¢ã«ãŽãªãºã </em>ã䜿çšãã€ãŸãäºã€ã®ãã¡ã€ã«ã®å
容ãåçã§ããã°çãããšã¿ãªããŸãããã€ãåäœã§çããå¿
èŠã¯ãããŸãããããšãã°ãããã¿ãŒã®äœææ¥ãç°ãªãäºã€ã®ããŒãžã¯ãåäžãšèŠãªãããŸãã</p> + +<p>{{HTTPHeader("If-Modified-Since")}} ãšäžç·ã«äœ¿çšããå Žåã <strong><code>If-None-Match</code></strong> ãåªå
ãããŸã (ãµãŒããŒã察å¿ããŠããå Žå)ã</p> + +<p>äžè¬çãªäœ¿çšäŸã¯äºã€ãããŸãã</p> + +<ul> + <li>{{HTTPMethod("GET")}} ããã³ {{HTTPMethod("HEAD")}} ã¡ãœããã®å Žåã¯ãé¢é£ä»ãããã {{HTTPHeader("ETag")}} ãæã€ãã£ãã·ã¥ããããšã³ãã£ãã£ãæŽæ°ããããã</li> + <li>ä»ã®ã¡ãœãããç¹ã« {{HTTPMethod("PUT")}} ã®å Žåã <code>If-None-Match</code> 㯠<code>*</code> å€ãšå
±ã«äœ¿çšãããååšãããã©ããåãã£ãŠããªããã¡ã€ã«ãä¿åããéã«ã以åä»ã®ã¢ããããŒããè¡ãããŠãããã以å PUT ãããããŒã¿ã倱ããªãããšãä¿èšŒããããã«äœ¿çšããããšãã§ããŸãããã®åé¡ã¯ã <a href="https://www.w3.org/1999/04/Editing/#3.1">lost update problem</a> ã®äžçš®ã§ãã</li> +</ul> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">If-None-Match: "<etag_value>" +If-None-Match: "<etag_value>", "<etag_value>", ⊠+If-None-Match: *</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><etag_value></dt> + <dd>ãªã¯ãšã¹ãããããªãœãŒã¹ãäžæã«è¡šããšã³ãã£ãã£ã¿ã°ã§ããäºéåŒçšç¬Šã®éã«çœ®ããã ASCII æåå (<code>"675af34563dc-tr34"</code> ãªã©) ã§ããã <code>W/</code> ã®æ¥é èŸãä»ãããšã匱ãæ¯èŒã¢ã«ãŽãªãºã ã䜿çšããã¹ãã§ããããšã瀺ãããšãã§ããŸã (ãã®ã¢ã«ãŽãªãºã ã ãã䜿çšããå Žå㯠<code>If-None-Match</code> ã§ã¯æå³ããããŸãã)ã</dd> + <dt><code>*</code></dt> + <dd>ã¢ã¹ã¿ãªã¹ã¯ã¯ä»»æã®ãªãœãŒã¹ãè¡šãç¹æ®ãªå€ã§ããéåžž {{HTTPMethod("PUT")}} ã䜿çšãããªãœãŒã¹ã®ã¢ããããŒãã®å Žåããã®èå¥åãæã€å¥ãªãªãœãŒã¹ããã§ã«ã¢ããããŒããããŠããããšãããå Žåã«ã®ã¿æçšã§ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">If-None-Match: "bfc13a64729c4290ef5b2c2730249c88ca92d82d" + +If-None-Match: W/"67ab43", "54ed21", "7892dd" + +If-None-Match: * +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7232", "If-None-Match", "3.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.If-None-Match")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("ETag")}}</li> + <li>{{HTTPHeader("If-Unmodified-Since")}}</li> + <li>{{HTTPHeader("If-Modified-Since")}}</li> + <li>{{HTTPHeader("If-Match")}}</li> + <li>{{HTTPStatus("304")}}<code> Not Modified</code></li> + <li>{{HTTPStatus("412")}}<code> Precondition Failed</code></li> +</ul> diff --git a/files/ja/web/http/headers/if-range/index.html b/files/ja/web/http/headers/if-range/index.html new file mode 100644 index 0000000000..2c2d38adfc --- /dev/null +++ b/files/ja/web/http/headers/if-range/index.html @@ -0,0 +1,104 @@ +--- +title: If-Range +slug: Web/HTTP/Headers/If-Range +tags: + - HTTP + - HTTP ããã㌠+ - ãªã¯ãšã¹ãããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã³ãžãªã¯ãšã¹ã + - æ¡ä»¶ãªã¯ãšã¹ã +translation_of: Web/HTTP/Headers/If-Range +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>If-Range</code></strong> HTTP ãªã¯ãšã¹ããããã¯ã¬ã³ãžãªã¯ãšã¹ããæ¡ä»¶ä»ãã«ããŸãïŒæ¡ä»¶ãæºããããã°ãã¬ã³ãžãªã¯ãšã¹ããçºè¡ããããµãŒãã¯é©åãªããã£ãæ〠{{HTTPStatus("206")}} <code>Partial Content</code> åçãè¿ããŸããæ¡ä»¶ãæºããããŠããªãå Žåã {{HTTPStatus("200")}} ã®ç¶æ
ã§ãªãœãŒã¹å
šäœãè¿éãããŸãã</p> + +<p>ãã®ããã㯠{{HTTPHeader("Last-Modified")}} ããªããŒã¿ããŸã㯠{{HTTPHeader("ETag")}} ã®ããããã§äœ¿çšã§ããŸãããäž¡æ¹ã§ã¯äœ¿çšã§ããŸããã</p> + +<p>æãäžè¬çãªäœ¿çšäºäŸã¯ãæåŸã®ãã©ã°ã¡ã³ããåä¿¡ãããŠããæ ŒçŽããããªãœãŒã¹ãå€æŽãããŠããªãããšãä¿èšŒããããã«ãããŠã³ããŒããåéããããšã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒã¿ã€ã</th> + <td>{{Glossary("Request header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="æ§æ">æ§æ</h2> + +<pre class="syntaxbox notranslate">If-Range: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT +If-Range: <etag></pre> + +<h2 id="ãã£ã¬ã¯ãã£ã">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><etag></dt> + <dd>ãªã¯ãšã¹ãããããªãœãŒã¹ãè¡šããšã³ãã£ãã£ãŒã¿ã°ã§ããããã¯Â <code>"675af34563dc-tr34"</code> ã®ããã«ããã«ã¯ãªãŒãã«å²ãŸããASCIIã®æååã§ã匱ãæ¯èŒã¢ã«ãŽãªãºã ã䜿ãããšã瀺ãããã«Â <code>W/</code> ããã¬ãã£ãã¯ã¹ãšããŠã€ãããšããããŸãã</dd> +</dl> + +<dl> + <dt><day-name></dt> + <dd>One of "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", or "Sun" (case-sensitive).</dd> + <dt><day></dt> + <dd>2 digit day number, e.g. "04" or "23".</dd> + <dt><month></dt> + <dd>One of "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" (case sensitive).</dd> + <dt><year></dt> + <dd>4 digit year number, e.g. "1990" or "2016".</dd> + <dt><hour></dt> + <dd>2 digit hour number, e.g. "09" or "23".</dd> + <dt><minute></dt> + <dd>2 digit minute number, e.g. "04" or "59".</dd> + <dt><second></dt> + <dd>2 digit second number, e.g. "04" or "59".</dd> + <dt><code>GMT</code></dt> + <dd> + <p>Greenwich Mean Time. HTTP dates are always expressed in GMT, never in local time.</p> + </dd> +</dl> + +<h2 id="äŸ">äŸ</h2> + +<pre class="notranslate">If-Range: Wed, 21 Oct 2015 07:28:00 GMT +</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7233", "If-Range", "3.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºææ§">ãã©ãŠã¶ã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.If-Range")}}</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("ETag")}}</li> + <li>{{HTTPHeader("Last-Modified")}}</li> + <li>{{HTTPHeader("If-Modified-Since")}}</li> + <li>{{HTTPHeader("If-Unmodified-Since")}}</li> + <li>{{HTTPHeader("If-Match")}}</li> + <li>{{HTTPHeader("If-None-Match")}}</li> + <li>{{HTTPStatus("206")}}<code> Partial Content</code></li> + <li><a href="/en-US/docs/Web/HTTP/Conditional_requests">HTTP Conditional Requests</a></li> +</ul> diff --git a/files/ja/web/http/headers/if-unmodified-since/index.html b/files/ja/web/http/headers/if-unmodified-since/index.html new file mode 100644 index 0000000000..b774348530 --- /dev/null +++ b/files/ja/web/http/headers/if-unmodified-since/index.html @@ -0,0 +1,101 @@ +--- +title: If-Unmodified-Since +slug: Web/HTTP/Headers/If-Unmodified-Since +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - ãªã¯ãšã¹ãããã㌠+ - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/If-Unmodified-Since +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>If-Unmodified-Since</code></strong> ãªã¯ãšã¹ãããããŒã¯ããªã¯ãšã¹ããæ¡ä»¶ä»ãã«ããŸãããµãŒããŒã¯ãªãœãŒã¹ãæå®ãããæ¥æ以éã«å€æŽãããŠããªãå Žåã®ã¿ãèŠæ±ããããªãœãŒã¹ãè¿ä¿¡ãããã {{HTTPMethod("POST")}} ãªã©ã®{{Glossary("safe", "å®å
š")}}ã§ã¯ãªãã¡ãœãããã®å Žåã¯ãããåãä»ãããããŸãããªãœãŒã¹ãæå®ãããæ¥æ以éã«å€æŽãããŠããå Žåã¯ãã¬ã¹ãã³ã¹ã¯{{HTTPStatus("412")}} (Precondition Failed) ãšã©ãŒã«ãªããŸãã</p> + +<p>äžè¬çãªäœ¿çšäŸã¯2ã€ãããŸãã</p> + +<ul> + <li>{{HTTPMethod("POST")}} ã®ãããª{{Glossary("safe", "å®å
š")}}ã§ã¯ãªãã¡ãœãããšã®çµã¿åããã§ãäžéšã®ãŠã£ãã§è¡ãããŠãããããª{{interwiki("wikipedia", "楜芳ç䞊è¡æ§å¶åŸ¡")}}ãå®è£
ããããã«å©çšããããšãã§ããŸãããã®å Žåãå
ã®ææžãåãåã£ãåŸã§ãä¿åãããŠããææžãå€æŽãããŠãããšãç·šéãæåŠãããŸãã</li> + <li>{{HTTPHeader("If-Range")}} ããããŒä»ãã®ç¯å²ä»ããªã¯ãšã¹ããšã®çµã¿åããã§ãæçããªã¯ãšã¹ãããéã«ææžãå€æŽãããŠããªãããšã確èªããããã«äœ¿çšããããšãã§ããŸãã</li> +</ul> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">If-Unmodified-Since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><day-name></dt> + <dd>"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ã®äžããäžã€ (倧æåã»å°æåã®åºå¥ãã)</dd> + <dt><day></dt> + <dd>2æ¡ã®æ¥ä»ãè¡šãæ°å, äŸ "04" ã "23".</dd> + <dt><month></dt> + <dd>"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ã®äžããäžã€ (倧æåã»å°æåã®åºå¥ãã)</dd> + <dt><year></dt> + <dd>4æ¡ã®å¹Žãè¡šãæ°å, äŸ "1990" ã "2016"</dd> + <dt><hour></dt> + <dd>2æ¡ã®æãè¡šãæ°å, äŸ "09" ã "23"</dd> + <dt><minute></dt> + <dd>2æ¡ã®åãè¡šãæ°å, äŸ "04" ã "59"</dd> + <dt><second></dt> + <dd>2æ¡ã®ç§ãè¡šãæ°å, äŸ "04" ã "59"</dd> + <dt><code>GMT</code></dt> + <dd> + <p>ã°ãªãããžæšæºæã HTTP ã«ãããæå»ã¯åžžã«ã°ãªãããžæšæºæã§è¡šãããããŒã«ã«æå»ã«ãªãããšã¯ãããŸããã</p> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>If-Unmodified-Since: Wed, 21 Oct 2015 07:28:00 GMT +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7232", "If-Unmodified-Since", "3.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.If-Unmodified-Since")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Last-Modified")}}</li> + <li>{{HTTPHeader("If-Modified-Since")}}</li> + <li>{{HTTPHeader("If-Match")}}</li> + <li>{{HTTPHeader("If-None-Match")}}</li> + <li>{{HTTPHeader("If-Range")}}</li> + <li>{{HTTPStatus("412")}}<code> Precondition Failed</code></li> +</ul> diff --git a/files/ja/web/http/headers/index.html b/files/ja/web/http/headers/index.html new file mode 100644 index 0000000000..555e1d5e8b --- /dev/null +++ b/files/ja/web/http/headers/index.html @@ -0,0 +1,461 @@ +--- +title: HTTP ããã㌠+slug: Web/HTTP/Headers +tags: + - HTTP + - HTTP ããã㌠+ - Networking + - Reference + - header + - ãããã¯ãŒã¯ + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><strong>HTTP ããããŒ</strong>ã«ãããã¯ã©ã€ã¢ã³ãããµãŒããŒã HTTP ãªã¯ãšã¹ããã¬ã¹ãã³ã¹ã§è¿œå æ
å ±ãæž¡ãããšãã§ããŸãã HTTP ããããŒã¯ã倧æåå°æåãåºå¥ããªãããããŒåãšããã«ç¶ãã³ãã³ (<code>:</code>)ã å€ã§æ§æãããŸãã</span>å€ã®åã«ãã{{Glossary("Whitespace", "ãã¯ã€ãã¹ããŒã¹")}}ã¯ç¡èŠãããŸãã</p> + +<p>ç¬èªã®ããããŒã¯ã以å㯠<code>X-</code> æ¥é èŸã䜿çšããŠããŸãããããã®æ
£ç¿ã¯ 2012 幎 6 æã«éæšå¥šã«ãªããŸãããããã¯ã <a href="https://tools.ietf.org/html/rfc6648">RFC 6648</a> ã§éæšæºã®ãã£ãŒã«ããæšæºã«ãªã£ããšãã«çºçããäžäŸ¿ãã®ããã§ãããã以å€ã®ããããŒã¯ <a class="external" href="http://www.iana.org/assignments/message-headers/perm-headers.html">IANA ã¬ãžã¹ããª</a> ã«åé²ãããŠããããã®åºã«ãªã£ããã®ã¯ <a class="external" href="http://tools.ietf.org/html/rfc4229">RFC 4229</a> ã§ãããŸã IANA 㯠<a class="external" href="http://www.iana.org/assignments/message-headers/prov-headers.html">æ°ãã«ææ¡ããã HTTP ããããŒã®ã¬ãžã¹ããª</a> ã管çããŠããŸãã</p> + +<p>ããããŒã¯ããã®ã³ã³ããã¹ãã«å¿ããŠåé¡ã§ããŸãã</p> + +<ul> + <li>{{Glossary("General header", "äžè¬ããããŒ")}}: ãªã¯ãšã¹ããšã¬ã¹ãã³ã¹ã®äž¡æ¹ã«é©çšãããŸãããæ¬æã§è»¢éãããããŒã¿ãšã¯é¢ä¿ãªããã®ã§ãã</li> + <li>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}: èªã¿èŸŒããªãœãŒã¹ããªãœãŒã¹ããªã¯ãšã¹ãããŠããã¯ã©ã€ã¢ã³ãã«é¢ãã詳现ãªæ
å ±ãæã¡ãŸãã</li> + <li>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}: ã¬ã¹ãã³ã¹ã«é¢ããè¿œå æ
å ±ãäŸãã°å ŽæãæäŸããŠãããµãŒããŒã«é¢ãããã®ãä¿æããŸãã</li> + <li>{{Glossary("Entity header", "ãšã³ãã£ãã£ããããŒ")}}: ãªãœãŒã¹ã®æ¬äœã«é¢ããæ
å ±ãäŸãã°<a href="/ja/docs/Web/HTTP/Headers/Content-Length">ã³ã³ãã³ãã®é·ã</a>ã <a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME ã¿ã€ã</a>ãªã©ãæã¡ãŸãã</li> +</ul> + +<p>ãŸãããããŒã¯ã{{Glossary("Proxy_server", "ãããã·ãµãŒããŒ")}}ãã©ã®ããã«åŠçãããã«å¿ããŠã°ã«ãŒãåãããŸãã</p> + +<ul> + <li>{{ httpheader("Connection") }}</li> + <li>{{ httpheader("Keep-Alive") }}</li> + <li>{{ httpheader("Proxy-Authenticate") }}</li> + <li>{{ httpheader("Proxy-Authorization") }}</li> + <li>{{ httpheader("TE") }}</li> + <li>{{ httpheader("Trailer") }}</li> + <li>{{ httpheader("Transfer-Encoding") }}</li> + <li>{{ httpheader("Upgrade") }}.</li> +</ul> + +<dl> + <dt id="e2e">ãšã³ãããŒãšã³ãããããŒ</dt> + <dd>ãããã®ããããŒã¯ãã¡ãã»ãŒãžã®æçµçãªå®å
ãããªãã¡ãªã¯ãšã¹ããªãã°ãµãŒããŒãã¬ã¹ãã³ã¹ãªãã°ã¯ã©ã€ã¢ã³ãã«äŒéã<em>ãªããã°ãªããŸãã</em>ãäžéã®ãããã·ã¯ããããŒãå€æŽããã«åäŒéããªããã°ãªããããŸããã£ãã·ã¥ã«ã¯ä¿åããªããã°ãªããŸããã</dd> + <dt id="hbh">ããããã€ãããããããŒ</dt> + <dd>ãããã®ããããŒã¯åäžã®ãã©ã³ã¹ããŒãå±€ã®æ¥ç¶ã«ã®ã¿æå³ãæã¡ããããã·ãå転éãããããã£ãã·ã¥ãè¡ã£ããããŠã¯<em>ãããŸãã</em>ããªãã {{httpheader("Connection")}} äžè¬ããããŒãçšããŠèšå®ããå Žåãããã®ã¯ããããã€ãããããããŒã®ã¿ã§ãã</dd> +</dl> + +<h2 id="Authentication" name="Authentication">èªèšŒ</h2> + +<dl> + <dt>{{HTTPHeader("WWW-Authenticate")}}</dt> + <dd>ãªãœãŒã¹ãžã¢ã¯ã»ã¹ã«äœ¿çšãã¹ãèªèšŒæ¹æ³ãå®çŸ©ããŸãã</dd> + <dt>{{HTTPHeader("Authorization")}}</dt> + <dd>ãµãŒããŒã§ãŠãŒã¶ãŒãšãŒãžã§ã³ããèªèšŒããããã®è³æ Œæ
å ±ãæã¡ãŸãã</dd> + <dt>{{HTTPHeader("Proxy-Authenticate")}}</dt> + <dd>ãããã·ãµãŒããŒã®èåŸã«ãããªãœãŒã¹ãžã¢ã¯ã»ã¹ã§ããããã«ããããã«äœ¿çšãã¹ãèªèšŒæ¹æ³ãå®çŸ©ããŸãã</dd> + <dt>{{HTTPHeader("Proxy-Authorization")}}</dt> + <dd>ãããã·ãµãŒããŒã§ãŠãŒã¶ãŒãšãŒãžã§ã³ããèªèšŒããããã®è³æ Œæ
å ±ãæã¡ãŸãã</dd> +</dl> + +<h2 id="Caching" name="Caching">ãã£ãã·ã¥</h2> + +<dl> + <dt>{{HTTPHeader("Age")}}</dt> + <dd>ãªããžã§ã¯ãããããã·ã®ãã£ãã·ã¥ã«ååšããæéãç§æ°ã§è¡šããŸãã</dd> + <dt>{{HTTPHeader("Cache-Control")}}</dt> + <dd>ãªã¯ãšã¹ãããã³ã¬ã¹ãã³ã¹ã§ããã£ãã·ã¥æ©èœã«é¢ãããã£ã¬ã¯ãã£ãã§ãã</dd> + <dt>{{HTTPHeader("Clear-Site-Data")}}</dt> + <dd>ãªã¯ãšã¹ãããŠãããŠã§ããµã€ãã«é¢é£ä»ãããããã©ãŠãºçšã®ããŒã¿ (ã¯ãããŒãã¹ãã¬ãŒãžããã£ãã·ã¥ç) ãæ¶å»ããŸãã</dd> + <dt>{{HTTPHeader("Expires")}}</dt> + <dd>ã¬ã¹ãã³ã¹ãé³è
åãããšèããããæ¥æãè¡šããŸãã</dd> + <dt>{{HTTPHeader("Pragma")}}</dt> + <dd>ãªã¯ãšã¹ãããã¬ã¹ãã³ã¹ãžã®æµãã®äžã§ããŸããŸãªåœ±é¿ããããå®è£
äŸåã®ããããŒã§ãã <code>Cache-Control</code> ããããŒãæªå®è£
ã§ãã HTTP/1.0 ãã£ãã·ã¥ãšã®åŸæ¹äºææ§ã®ããã«äœ¿çšããŸãã</dd> + <dt>{{HTTPHeader("Warning")}}</dt> + <dd>èµ·ããããåé¡ã«é¢ããäžè¬èŠåæ
å ±ã§ãã</dd> +</dl> + +<h2 id="Client_hints" name="Client_hints">ã¯ã©ã€ã¢ã³ããã³ã</h2> + +<p>HTTP {{Glossary("Client_hints", "ã¯ã©ã€ã¢ã³ããã³ã")}}ã¯çå®äžã§ããå®éã®ææžã¯ <a href="https://httpwg.org/http-extensions/client-hints.html">HTTP äœæ¥ã°ã«ãŒãã®ãŠã§ããµã€ã</a>ã«ãããŸãã</p> + +<dl> + <dt>{{HTTPHeader("Accept-CH")}} {{experimental_inline}}</dt> + <dd>ãµãŒããŒã¯ã¯ã©ã€ã¢ã³ããã³ãã«å¯Ÿå¿ããŠããããšãã <code>Accept-CH</code> ããããŒãã£ãŒã«ããŸãã¯åçã® <code>http-equiv</code> å±æ§ãä»ãã HTML ã® <code><meta></code> èŠçŽ ã䜿çšããŠåºå ±ããããšãã§ããŸã (<a href="https://httpwg.org/http-extensions/client-hints.html#HTML5"><cite>[HTML5]</cite></a>)ã</dd> + <dt>{{HTTPHeader("Accept-CH-Lifetime")}} {{experimental_inline}}</dt> + <dd>ãµãŒããŒã¯ãæå®ãããæéãµãŒããŒããµããŒããã察å¿ããäžé£ã®ã¯ã©ã€ã¢ã³ããã³ããèšæ¶ããããã¯ã©ã€ã¢ã³ãã«äŸé Œãããã®ãµãŒããŒã®ãªãªãžã³ã«å¯Ÿãããã®åŸã®ãªã¯ãšã¹ãã§ã¯ã©ã€ã¢ã³ããã³ããé
ä¿¡ã§ããããã«ããããšãã§ããŸã (<a href="https://httpwg.org/http-extensions/client-hints.html#RFC6454"><cite>[RFC6454]</cite></a>)ã</dd> + <dt>{{HTTPHeader("Early-Data")}} {{experimental_inline}}</dt> + <dd>ãªã¯ãšã¹ããæ©æããŒã¿ãäŒããŠããããšã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Content-DPR")}} {{experimental_inline}}</dt> + <dd>æ°å€ã§ãéžæãããç»åã¬ã¹ãã³ã¹ã® CSS ãã¯ã»ã«ã«å¯Ÿããç©çãã¯ã»ã«ã®æ¯ã瀺ããŸãã</dd> + <dt>{{HTTPHeader("DPR")}} {{experimental_inline}}</dt> + <dd>æ°å€ã§ãçŸåšã®ã¯ã©ã€ã¢ã³ãã®ç«¯æ«ãã¯ã»ã«æ¯ (DPR)ãããªãã¡ç«¯æ«ã®ã¬ã€ã¢ãŠããã¥ãŒããŒã (<a href="https://httpwg.org/http-extensions/client-hints.html#CSS2"><cite>[CSS2]</cite></a> ã®ã»ã¯ã·ã§ã³9.1.1) ã«ãããã CSS ãã¯ã»ã«ã«å¯Ÿããç©çãã¯ã»ã«ã®æ¯ (<a href="https://httpwg.org/http-extensions/client-hints.html#CSSVAL"><cite>[CSSVAL]</cite></a> ã®ã»ã¯ã·ã§ã³5.2) ã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Device-Memory")}} {{experimental_inline}}</dt> + <dd>æè¡çã«ã¯ Device Memory API ã®äžéšã§ããã®ããããŒã¯ã¯ã©ã€ã¢ã³ããæã€ãããã® RAM ã®éãè¡šããŸãã</dd> + <dt>{{HTTPHeader("Save-Data")}} {{experimental_inline}}</dt> + <dd>è«çåã§ããŠãŒã¶ãŒãšãŒãžã§ã³ãã®ããŒã¿å©çšã®åæžã«ã€ããŠã®èšå®ã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Viewport-Width")}} {{experimental_inline}}</dt> + <dd> + <div id="rfc.section.3.3.p.1"> + <p><code>Viewport-Width</code> ãªã¯ãšã¹ãããããŒãã£ãŒã«ãã¯æ°å€ã§ãã¬ã€ã¢ãŠããã¥ãŒããŒãã®å¹
ã CSS ãã¯ã»ã«æ°ã§ç€ºããŸããæå®ããããã¯ã»ã«æ°ã¯ããã以äžã®æå°ã®æŽæ°ã«äžžããããŸã (ã€ãŸãåãäžã)ã</p> + </div> + + <div id="rfc.section.3.3.p.2"> + <p><code>Viewport-Width</code> ãã¡ãã»ãŒãžå
ã«äºå以äžçŸããå ŽåãæåŸã®å€ããã以åã®ãã¹ãŠã®å€ãäžæžãããŸãã</p> + </div> + </dd> + <dt>{{HTTPHeader("Width")}} {{experimental_inline}}</dt> + <dd> + <div id="rfc.section.3.2.p.1"> + <p><code>Width</code> ãªã¯ãšã¹ãããããŒãã£ãŒã«ãã¯æ°å€ã§ãèŠæ±ãããªãœãŒã¹ã®å¹
(ã€ãŸãç»åã®åºæã®å¯žæ³) ãç©çãã¯ã»ã«æ°ã§ç€ºããŸããæå®ããããã¯ã»ã«æ°ã¯ããã以äžã®æå°ã®æŽæ°ã«äžžããããŸã (ã€ãŸãåãäžã)ã</p> + </div> + + <div id="rfc.section.3.2.p.2"> + <p>èŠæ±ãããªãœãŒã¹ã®å¹
ããªã¯ãšã¹ãã®æç¹ã§äžæã§ããå ŽåãããªãœãŒã¹ã衚瀺å¹
ãæããªãå Žåã¯ã <code>Width</code> ããããŒãã£ãŒã«ãã¯çç¥ã§ããŸãã <code>Width</code> ãã¡ãã»ãŒãžå
ã«äºå以äžçŸããå ŽåãæåŸã®å€ããã以åã®ãã¹ãŠã®å€ãäžæžãããŸãã</p> + </div> + </dd> +</dl> + +<h2 id="Conditionals" name="Conditionals">æ¡ä»¶ä»ã</h2> + +<dl> + <dt>{{HTTPHeader("Last-Modified")}}</dt> + <dd>ãªãœãŒã¹ãæåŸã«å€æŽãããæ¥æã§ãããåããªãœãŒã¹ã®è€æ°ã®ããŒãžã§ã³ãæ¯èŒããããã«äœ¿çšãããŸãã {{HTTPHeader("ETag")}} ããæ£ç¢ºãã¯äœãã®ã§ãããç°å¢ã«ãã£ãŠã¯èšç®ã容æã§ãã{{HTTPHeader("If-Modified-Since")}} ã {{HTTPHeader("If-Unmodified-Since")}} ã䜿çšããæ¡ä»¶ä»ããªã¯ãšã¹ãã§ã¯ããªã¯ãšã¹ãã®åäœãå€æŽããããã«ãã®å€ã䜿çšããŸãã</dd> + <dt>{{HTTPHeader("ETag")}}</dt> + <dd>äžæãªæååã§ããããªãœãŒã¹ã®ããŒãžã§ã³ãèå¥ããŸãã {{HTTPHeader("If-Match")}} ã {{HTTPHeader("If-None-Match")}} ã䜿çšããæ¡ä»¶ä»ããªã¯ãšã¹ãã§ã¯ããªã¯ãšã¹ãã®åäœãå€æŽããããã«ãã®å€ã䜿çšããŸãã</dd> + <dt>{{HTTPHeader("If-Match")}}</dt> + <dd>ãªã¯ãšã¹ããæ¡ä»¶ä»ãã«ããŠãä¿åããããªãœãŒã¹ãæå®ãã ETag ã®ããããã«äžèŽããå Žåã«éãã¡ãœãããé©çšããŸãã</dd> + <dt>{{HTTPHeader("If-None-Match")}}</dt> + <dd>ãªã¯ãšã¹ããæ¡ä»¶ä»ãã«ããŠãä¿åããããªãœãŒã¹ãæå®ãã ETag ã®ããããã«äžèŽ<em>ããªã</em>å Žåã«éãã¡ãœãããé©çšããŸããããã¯ãã£ãã·ã¥ãæŽæ°ãã (å®å
šãªãªã¯ãšã¹ãåã)ããããã¯ãã§ã«ãªãœãŒã¹ãååšããå Žåã«æ°ãããªãœãŒã¹ã®ã¢ããããŒããæ¢ããããã«äœ¿çšããŸãã</dd> + <dt>{{HTTPHeader("If-Modified-Since")}}</dt> + <dd>ãªã¯ãšã¹ããæ¡ä»¶ä»ãã«ããŠããšã³ãã£ãã£ãæå®ããæ¥æããåŸã«å€æŽãããŠããå Žåã«éã転éãããããªã¯ãšã¹ãããŸãããã£ãã·ã¥ãæéåãã§ããå Žåã«éãããŒã¿ã転éããããã«äœ¿çšããŸãã</dd> + <dt>{{HTTPHeader("If-Unmodified-Since")}}</dt> + <dd>ãªã¯ãšã¹ããæ¡ä»¶ä»ãã«ããŠããšã³ãã£ãã£ãæå®ããæ¥æããåŸã«å€æŽãããŠããªãå Žåã«éã転éãããããªã¯ãšã¹ãããŸããããã¯ãç¹å®ã®ç¯å²ã®æ°ããæçãšå€ãæçã®äžè²«æ§ãä¿èšŒããããããã¯æ¢åã®ææžãå€æŽãããšãã«æ¥œèŠ³çãªäžŠè¡æ§å¶åŸ¡ã·ã¹ãã ãå®è£
ããããã«äœ¿çšããŸãã</dd> + <dt>{{HTTPHeader("Vary")}}</dt> + <dd>æ°ãããã®ãå
ã®ãµãŒããŒã«ãªã¯ãšã¹ãããã®ã§ã¯ãªãããã£ãã·ã¥ãããã¬ã¹ãã³ã¹ã䜿çšã§ãããã決å®ããããã«ããªã¯ãšã¹ãããããŒãäžèŽãããæ¹æ³ãå®ããŸãã/dd></dd> +</dl> + +<h2 id="Connection_management" name="Connection_management">æ¥ç¶å¶åŸ¡</h2> + +<dl> + <dt>{{HTTPHeader("Connection")}}</dt> + <dd>çŸåšã®è»¢éãå®äºããåŸãããããã¯ãŒã¯ã³ãã¯ã·ã§ã³ãç¶æããããå¶åŸ¡ããŸãã</dd> + <dt>{{HTTPHeader("Keep-Alive")}}</dt> + <dd>æç¶çãªã³ãã¯ã·ã§ã³ãã©ãã ãã®æéç¶æããããå¶åŸ¡ããŸãã</dd> +</dl> + +<h2 id="Content_negotiation" name="Content_negotiation"><a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a></h2> + +<dl> + <dt>{{HTTPHeader("Accept")}}</dt> + <dd>éãè¿ãããšãã§ããããŒã¿ã®{{Glossary("MIME_type", "çš®é¡")}}ããµãŒããŒã«éç¥ããŸãã</dd> + <dt>{{HTTPHeader("Accept-Charset")}}</dt> + <dd>ã©ã®{{Glossary("character encodings", "æåéå")}}ãã¯ã©ã€ã¢ã³ããç解ã§ãããã§ãã</dd> + <dt>{{HTTPHeader("Accept-Encoding")}}</dt> + <dd>éãè¿ããªãœãŒã¹ã§äœ¿çšã§ãããšã³ã³ãŒãã¢ã«ãŽãªãºã (äžè¬çã«ã¯<a href="/ja/docs/Web/HTTP/Compression">å§çž®ã¢ã«ãŽãªãºã </a>) ããµãŒããŒã«éç¥ããŸãã</dd> + <dt>{{HTTPHeader("Accept-Language")}}</dt> + <dd>éãè¿ããªãœãŒã¹ã§æåŸ
ããèªç¶èšèªããµãŒããŒã«éç¥ããŸããããã¯ãã³ãã§ãããå¿
ããããŠãŒã¶ãŒã®å®å
šãªå¶åŸ¡äžã«ãããã®ã§ã¯ãããŸããããµãŒããŒã¯ãŠãŒã¶ãŒã®éžæ (ããããããŠã³ãªã¹ãã§éžã¶èšèªãªã©) ãæ瀺çã«äžæžãããªãããã«ãåžžã«æ³šæãæãã¹ãã§ãã</dd> +</dl> + +<h2 id="Controls" name="Controls">å¶åŸ¡</h2> + +<dl> + <dt>{{HTTPHeader("Expect")}}</dt> + <dd>ãªã¯ãšã¹ããé©åã«æ±ãããã«ãµãŒããŒãå®è¡ããªããã°ãªããªããšæåŸ
ãããŠããããšã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Max-Forwards")}}</dt> +</dl> + +<h2 id="Cookies" name="Cookies">ã¯ãããŒ</h2> + +<dl> + <dt>{{HTTPHeader("Cookie")}}</dt> + <dd>éå»ã« {{HTTPHeader("Set-Cookie")}} ããããŒã§ãµãŒããŒããéä¿¡ãããŠä¿åããŠãã <a href="/ja/docs/Web/HTTP/Cookies">HTTP ã¯ãããŒ</a>ãæã¡ãŸãã</dd> + <dt>{{HTTPHeader("Set-Cookie")}}</dt> + <dd>ãµãŒããŒãããŠãŒã¶ãŒãšãŒãžã§ã³ãã«ã¯ãããŒãéä¿¡ããŸãã</dd> + <dt>{{HTTPHeader("Cookie2")}} {{obsolete_inline}}</dt> + <dd>éå»ã« {{HTTPHeader("Set-Cookie2")}} ããããŒã§ãµãŒããŒããéä¿¡ããã HTTP ã¯ãããŒãäŒããããã«äœ¿ãããŠããŸããããä»æ§æžããå»æ¢ãããŸããã代ããã« {{HTTPHeader("Cookie")}} ã䜿çšããŠãã ããã</dd> + <dt>{{HTTPHeader("Set-Cookie2")}} {{obsolete_inline}}</dt> + <dd>ãµãŒããŒãããŠãŒã¶ãŒãšãŒãžã§ã³ãã« Cookie ãéä¿¡ããããã«äœ¿çšãããŠããŸããããä»æ§æžããå»æ¢ãããŸããã代ããã« {{HTTPHeader("Set-Cookie")}} ã䜿çšããŠãã ããã</dd> +</dl> + +<h2 id="CORS" name="CORS">ãªãªãžã³éãªãœãŒã¹å
±æ (CORS)</h2> + +<p><em>CORS ã«ã€ããŠã®è©³çŽ°ã¯ã<a href="CORS">ãã¡ã</a>ãåç
§ããŠãã ããã</em></p> + +<dl> + <dt>{{HTTPHeader("Access-Control-Allow-Origin")}}</dt> + <dd>ã¬ã¹ãã³ã¹ãå
±æå¯èœãã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Access-Control-Allow-Credentials")}}</dt> + <dd>credentials ãã©ã°ãçã§ãããšãã«ããªã¯ãšã¹ããžã®ã¬ã¹ãã³ã¹ãé瀺ããŠãããã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Access-Control-Allow-Headers")}}</dt> + <dd>{{Glossary("Preflight_request", "ããªãã©ã€ããªã¯ãšã¹ã")}}ãžã®ã¬ã¹ãã³ã¹ã§äœ¿çšããå®éã®ãªã¯ãšã¹ããè¡ããšãã«äœ¿çšã§ãã HTTP ããããŒãæå®ããŸãã</dd> + <dt>{{HTTPHeader("Access-Control-Allow-Methods")}}</dt> + <dd>ããªãã©ã€ããªã¯ãšã¹ããžã®ã¬ã¹ãã³ã¹ã§ããªãœãŒã¹ãžã¢ã¯ã»ã¹ãããšãã«äœ¿çšã§ããã¡ãœãããæå®ããŸãã</dd> + <dt>{{HTTPHeader("Access-Control-Expose-Headers")}}</dt> + <dd>ããããŒåãçŸ
åããŠãã¬ã¹ãã³ã¹ã®äžéšãšããŠé瀺ã§ããããããŒã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Access-Control-Max-Age")}}</dt> + <dd>ããªãã©ã€ããªã¯ãšã¹ãã®çµæããã£ãã·ã¥ããŠããæéã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Access-Control-Request-Headers")}}</dt> + <dd>å®éã®ãªã¯ãšã¹ããè¡ãéã«äœ¿çšãã HTTP ããããŒããµãŒããŒããããããã«ãããããããªãã©ã€ããªã¯ãšã¹ããçºä¿¡ããéã«äœ¿çšããŸãã</dd> + <dt>{{HTTPHeader("Access-Control-Request-Method")}}</dt> + <dd>å®éã®ãªã¯ãšã¹ããè¡ãéã«äœ¿çšãã <a href="/ja/docs/Web/HTTP/Methods">HTTP ã¡ãœãã</a> ããµãŒããŒããããããã«ãããããããªãã©ã€ããªã¯ãšã¹ããçºä¿¡ããéã«äœ¿çšããŸãã</dd> + <dt>{{HTTPHeader("Origin")}}</dt> + <dd>ã©ãããèªã¿èŸŒã¿ãçºçãããã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Timing-Allow-Origin")}}</dt> + <dd><a href="/ja/docs/Web/API/Resource_Timing_API">Resource Timing API</a> ã®æ©èœãéããŠåãåã£ãå±æ§ã®å€ãèŠãããšãã§ãããªãªãžã³ãæå®ããŸããããã§ãªããã°ãªãªãžã³éã®å¶çŽã«ãã£ãŠãŒããšããŠå ±åãããŸãã</dd> +</dl> + +<h2 id="Do_Not_Track" name="Do_Not_Track">Do Not Track</h2> + +<dl> + <dt>{{HTTPHeader("DNT")}}</dt> + <dd>ãŠãŒã¶ãŒã®ãã©ããã³ã°èšå®ã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Tk")}}</dt> + <dd>察å¿ããã¬ã¹ãã³ã¹ã®ãã©ããã³ã°ç¶æ
ã瀺ããŸãã</dd> +</dl> + +<h2 id="Downloads" name="Downloads">ããŠã³ããŒã</h2> + +<dl> + <dt>{{HTTPHeader("Content-Disposition")}}</dt> + <dd>転éãããªãœãŒã¹ãã€ã³ã©ã€ã³ã§è¡šç€ºãã¹ãã (ããããŒãååšããªãå Žåã®æ¢å®ã®åäœ)ããŸãã¯ããŠã³ããŒããšããŠæ±ãããååãä»ããŠä¿åããŠã£ã³ããŠã衚瀺ãã¹ããã瀺ããŸãã</dd> +</dl> + +<h2 id="Message_body_information" name="Message_body_information">ã¡ãã»ãŒãžæ¬æã®æ
å ±</h2> + +<dl> + <dt>{{HTTPHeader("Content-Length")}}</dt> + <dd>ãªãœãŒã¹ã®å€§ãããããã€ãåäœã®10é²æ°ã§ç€ºããŸãã</dd> + <dt>{{HTTPHeader("Content-Type")}}</dt> + <dd>ãªãœãŒã¹ã®ã¡ãã£ã¢ã¿ã€ãã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Content-Encoding")}}</dt> + <dd>å§çž®ã¢ã«ãŽãªãºã ãæå®ããããã«äœ¿çšããŸãã</dd> + <dt>{{HTTPHeader("Content-Language")}}</dt> + <dd>èªè
åãã«èšèªã瀺ãããããŒã§ããããŠãŒã¶ãŒãèªèº«ã®å¥œãèšèªã«å¿ããŠåºå¥ããããšãã§ããŸãã</dd> + <dt>{{HTTPHeader("Content-Location")}}</dt> + <dd>è¿ãããŒã¿ã®ä»£æ¿ããŒã¿ã®å Žæã瀺ããŸãã</dd> +</dl> + +<h2 id="Proxies" name="Proxies">ãããã·</h2> + +<dl> + <dt>{{HTTPHeader("Forwarded")}}</dt> + <dd>ãªã¯ãšã¹ãã®ãã¹ã«ãããã·ãé¢äžãããšãã«å€æŽãŸãã¯éºå€±ããããããã·ãµãŒããŒã®ã¯ã©ã€ã¢ã³ãåŽã®æ
å ±ãæã¡ãŸãã</dd> + <dt>{{HTTPHeader("X-Forwarded-For")}} {{non-standard_inline}}</dt> + <dd>HTTP ãããã·ãããŒããã©ã³ãµãŒãçµç±ããŠãŠã§ããµãŒããŒã«æ¥ç¶ããã¯ã©ã€ã¢ã³ãã®ãæ¥ç¶å
IP ã¢ãã¬ã¹ãèå¥ããŸãã</dd> + <dt>{{HTTPHeader("X-Forwarded-Host")}} {{non-standard_inline}}</dt> + <dd>ãããã·ãããŒããã©ã³ãµãŒã«æ¥ç¶ããã¯ã©ã€ã¢ã³ãããªã¯ãšã¹ãããããªãªãžãã«ã®ãã¹ãã瀺ããŸãã</dd> + <dt>{{HTTPHeader("X-Forwarded-Proto")}} {{non-standard_inline}}</dt> + <dd>ã¯ã©ã€ã¢ã³ãããããã·ãããŒããã©ã³ãµãŒã«æ¥ç¶ããããã«äœ¿çšãããããã³ã« (HTTP ãŸã㯠HTTPS) ãèå¥ããŸãã</dd> + <dt>{{HTTPHeader("Via")}}</dt> + <dd>ãã©ã¯ãŒããããã·ãšãªããŒã¹ãããã·ã®äž¡æ¹ãè¿œå ããããããŒã§ããããªã¯ãšã¹ãããããŒãšã¬ã¹ãã³ã¹ããããŒã®ã©ã¡ãã§ãèŠãããŸãã</dd> +</dl> + +<h2 id="Redirects" name="Redirects">ãªãã€ã¬ã¯ã</h2> + +<dl> + <dt>{{HTTPHeader("Location")}}</dt> + <dd>ããŒãžã®ãªãã€ã¬ã¯ãå
ã® URL ã瀺ããŸãã</dd> +</dl> + +<h2 id="Request_context" name="Request_context">ãªã¯ãšã¹ãã³ã³ããã¹ã</h2> + +<dl> + <dt>{{HTTPHeader("From")}}</dt> + <dd>ãªã¯ãšã¹ããè¡ããŠãŒã¶ãŒãšãŒãžã§ã³ããæäœããŠãã人éã®ãã€ã³ã¿ãŒãããé»åã¡ãŒã«ã¢ãã¬ã¹ãæã¡ãŸãã</dd> + <dt>{{HTTPHeader("Host")}}</dt> + <dd>ãµãŒããŒã®ãã¡ã€ã³å (ããŒãã£ã«ãã¹ãåã) ããã³ãµãŒããŒãåŸ
ã¡åããŠãã TCP ããŒãçªå· (çç¥å¯èœ) ãæå®ããŸãã</dd> + <dt>{{HTTPHeader("Referer")}}</dt> + <dd>çŸåšãªã¯ãšã¹ãããŠããããŒãžãžãªã³ã¯ããŠãããåã®ãŠã§ãããŒãžã®ã¢ãã¬ã¹ã§ãã</dd> + <dt>{{HTTPHeader("Referrer-Policy")}}</dt> + <dd>{{HTTPHeader("Referer")}} ããããŒã§éä¿¡ããã©ã®ãªãã¡ã©ãŒæ
å ±ããªã¯ãšã¹ãã«å«ããããå¶åŸ¡ããŸãã</dd> + <dt>{{HTTPHeader("User-Agent")}}</dt> + <dd>ãªã¯ãšã¹ããè¡ããŠãŒã¶ãŒãšãŒãžã§ã³ããœãããŠã§ã¢ã®ã¢ããªã±ãŒã·ã§ã³ã¿ã€ãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ããã³ããŒãããŒãžã§ã³ãããããã¯ãŒã¯ãããã³ã«ã®ãã¢ãèå¥ã§ããããã«ããæååãæã¡ãŸãã <a href="/ja/docs/Web/HTTP/Headers/User-Agent/Firefox">Firefox ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååãªãã¡ã¬ã³ã¹</a>ãã芧ãã ããã</dd> +</dl> + +<h2 id="Response_context" name="Response_context">ã¬ã¹ãã³ã¹ã³ã³ããã¹ã</h2> + +<dl> + <dt>{{HTTPHeader("Allow")}}</dt> + <dd>ãªãœãŒã¹ããµããŒããã HTTP ãªã¯ãšã¹ãã¡ãœããã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Server")}}</dt> + <dd>ãªã¯ãšã¹ããæ±ããµãŒããŒã䜿çšãããœãããŠã§ã¢ã®æ
å ±ãæã¡ãŸãã</dd> +</dl> + +<h2 id="Range_requests" name="Range_requests">ç¯å²ä»ããªã¯ãšã¹ã</h2> + +<dl> + <dt>{{HTTPHeader("Accept-Ranges")}}</dt> + <dd>ãµãŒããŒãç¯å²ä»ããªã¯ãšã¹ãã«å¯Ÿå¿ãããã©ããã察å¿ããŠããã°å¯Ÿå¿ããå Žåã¯ãç¯å²ãè¡šãããšãã§ããåäœã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Range")}}</dt> + <dd>ãµãŒããŒãè¿ãã¹ãã§ããææžã®ç¯å²ã瀺ããŸãã</dd> + <dt>{{HTTPHeader("If-Range")}}</dt> + <dd>æå®ãã ETag ãŸãã¯æ¥æããªã¢ãŒãã®ãªãœãŒã¹ã«ãããããå Žåã«éå®ãããæ¡ä»¶ä»ã range request ãçæããŸããç°ãªãããŒãžã§ã³ã®ãªãœãŒã¹ãã 2 ã€ã®ç¯å²ãããŠã³ããŒãããããšãé²ããŸãã</dd> + <dt>{{HTTPHeader("Content-Range")}}</dt> + <dd>éšåçãªã¡ãã»ãŒãžããã¡ãã»ãŒãžæ¬æå
šäœã®ã©ãã«äœçœ®ãããã瀺ããŸãã</dd> +</dl> + +<h2 id="Security" name="Security">ã»ãã¥ãªãã£</h2> + +<dl> + <dt>{{HTTPHeader("Cross-Origin-Embedder-Policy")}} ({{Glossary("COEP")}})</dt> + <dd>ãµãŒããŒãæå®ãããææžã®åã蟌ã¿æ¹éã宣èšããããã«äœ¿ããŸãã</dd> +</dl> + +<dl> + <dt>{{HTTPHeader("Cross-Origin-Opener-Policy")}} ({{Glossary("COOP")}})</dt> + <dd>ä»ã®ãã¡ã€ã³ããŠã£ã³ããŠãéãããå¶åŸ¡ãããããããšãé²ããŸãã</dd> +</dl> + +<dl> + <dt>{{HTTPHeader("Cross-Origin-Resource-Policy")}} ({{Glossary("CORP")}})</dt> + <dd>ãã®ããããŒãé©çšããããªãœãŒã¹ã®ã¬ã¹ãã³ã¹ãä»ã®ãã¡ã€ã³ããèªã¿åãããã®ãé²ããŸãã</dd> + <dt>{{HTTPHeader("Content-Security-Policy")}} ({{Glossary("CSP")}})</dt> + <dd>ãŠãŒã¶ãŒãšãŒãžã§ã³ããããŒãžã§èªã¿èŸŒãããšãèš±å¯ãããªãœãŒã¹ãå¶åŸ¡ããŸãã</dd> + <dt>{{HTTPHeader("Content-Security-Policy-Report-Only")}}</dt> + <dd>ãŠã§ãã®éçºè
ãããªã·ãŒã®å¹æãé©çšããã«ç£èŠããããšã§ãå®éšãè¡ãããšãã§ããŸãããããã®éåã¬ããŒãã¯ã HTTP <code>POST</code> ãªã¯ãšã¹ãã«ãã£ãŠæå®ãã URI ãžéä¿¡ããã {{Glossary("JSON")}} ææžã§æ§æãããŸãã</dd> + <dt>{{HTTPHeader("Expect-CT")}}</dt> + <dd>ãµã€ãã蚌ææžã®éææ§èŠä»¶ã®å ±åãå®æœãéžæã§ããããã«ããŸããããã«ããããã®ãµã€ãã§äžæ£ãªèšŒææžã®äœ¿çšã«æ°ã¥ããªãããšãé²ããŸãããµã€ãã Expect-CT ããããŒãæå¹ã«ããå Žåããã®ãµã€ãã®èšŒææžãå
¬éCTãã°ã«è¡šç€ºãããããšã Chrome ã確èªããããã«ãªã¯ãšã¹ãããŠããŸãã</dd> + <dt>{{HTTPHeader("Feature-Policy")}}</dt> + <dd>èªèº«ã®ãã¬ãŒã ãŸãã¯ãã®äžã® iframe ã§ããã©ãŠã¶ãŒã®æ©èœã䜿çšããããšãèš±å¯ãŸãã¯æåŠããä»çµã¿ãæäŸããŸãã</dd> + <dt>{{HTTPHeader("Strict-Transport-Security")}} ({{Glossary("HSTS")}})</dt> + <dd>HTTP ã®ä»£ããã« HTTPS ã«ããéä¿¡ã匷å¶ããŸãã</dd> + <dt>{{HTTPHeader("Upgrade-Insecure-Requests")}}</dt> + <dd>æå·åãèªèšŒãããã¬ã¹ãã³ã¹ã«ã€ããŠãã¯ã©ã€ã¢ã³ãã®èšå®ãè¡šãä¿¡å·ããµãŒããŒã«éä¿¡ããŠã{{CSP("upgrade-insecure-requests")}} ãã£ã¬ã¯ãã£ããæ£ããæ±ãããšãã§ããŸãã</dd> + <dt>{{HTTPHeader("X-Content-Type-Options")}}</dt> + <dd>ãã©ãŠã¶ãŒã§ MIME ã¹ãããã£ã³ã°ãç¡å¹åããŠã{{HTTPHeader("Content-Type")}} ã§æå®ããã¿ã€ãã匷å¶çã«äœ¿çšãããŸãã</dd> + <dt>{{HTTPHeader("X-Download-Options")}}</dt> + <dd>HTTP ã® <code><a href="https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/jj542450(v=vs.85)?#the-noopen-directive">X-Download-Options</a></code> ããããŒã¯ããã©ãŠã¶ãŒ (Internet Explorer) ãã¢ããªã±ãŒã·ã§ã³ããã®ããŠã³ããŒãã§ãã¡ã€ã«ããéããã®éžæè¢ã衚瀺ããªãããã«ããã¢ããªã±ãŒã·ã§ã³ã®ã³ã³ããã¹ãã§å®è¡ããã¢ã¯ã»ã¹æš©ãåŸãããšããªãããã«ããŠããã¡ã€ã«ãšããããšã§ãã£ãã·ã³ã°è©æ¬ºãé²æ¢ããŸãã (ã¡ã¢: <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/18488178/">MS Edge bug</a> ã«é¢é£)</dd> + <dt>{{HTTPHeader("X-Frame-Options")}} (XFO)</dt> + <dd>ãã©ãŠã¶ãŒãããŒãžã {{HTMLElement("frame")}}, {{HTMLElement("iframe")}}, {{HTMLElement("embed")}}, {{HTMLElement("object")}} ã®å
éšã«è¡šç€ºããããšãèš±å¯ãããã瀺ããŸãã</dd> + <dt>{{HTTPHeader("X-Permitted-Cross-Domain-Policies")}}</dt> + <dd>ã¯ãã¹ãã¡ã€ã³ããªã·ãŒãã¡ã€ã« (<code>crossdomain.xml</code>) ãèš±å¯ãããã©ãããæå®ããŸãããã®ãã¡ã€ã«ã¯ã Adobe ã® Flash PlayerãAdobe AcrobatãMicrosoft SilverlightãApache Flex ãªã©ã®ã¯ã©ã€ã¢ã³ãã«ã<a href="/ja/docs/Web/Security/Same-origin_policy">åäžãã¡ã€ã³ããªã·ãŒ</a>ã«ãã£ãŠå¶éãããŠãããã¡ã€ã³éã®ããŒã¿ãåŠçããèš±å¯ãäžããããªã·ãŒãå®çŸ©ããããšãã§ããŸãã詳现ã«ã€ããŠã¯ã <a href="https://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html">Cross-domain Policy File Specification</a> ãåç
§ããŠãã ããã</dd> + <dt>{{HTTPHeader("X-Powered-By")}}</dt> + <dd>ãã¹ãã£ã³ã°ç°å¢ããã®ä»ã®ãã¬ãŒã ã¯ãŒã¯ã«ãã£ãŠèšå®ãããå¯èœæ§ããããã¢ããªã±ãŒã·ã§ã³ã蚪åè
ã«æçã§ã¯ãªãæ
å ±ãå«ã¿ãŸããæœåšçãªè匱æ§ãçºçŸããããšãé²ãããã«ããã®ããããŒã¯èšå®ããªãã§ãã ããã</dd> + <dt>{{HTTPHeader("X-XSS-Protection")}}</dt> + <dd>ã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã°ã®ãã£ã«ã¿ãªã³ã°ãæå¹åããŸãã</dd> +</dl> + +<h3 id="HTTP_Public_Key_Pinning_GlossaryHPKP">HTTP Public Key Pinning ({{Glossary("HPKP")}})</h3> + +<p>HTTP Public Key Pinning ã¯éæšå¥šãšãªããåé€ãã㊠Certificate Transparency ãš {{HTTPHeader("Expect-CT")}} ã«çœ®ãæããããŸããã</p> + +<dl> + <dt>{{HTTPHeader("Public-Key-Pins")}}</dt> + <dd>åœé ãã蚌ææžã«ãã {{Glossary("MITM")}} æ»æã®å±éºæ§ã軜æžãããããç¹å®ã®æå·å
¬ééµãšãŠã§ããµãŒããŒãé¢é£ä»ããŸãã</dd> + <dt>{{HTTPHeader("Public-Key-Pins-Report-Only")}}</dt> + <dd>ãã³ãã³ã°ã«éåããå Žåã§ããããããŒã§æå®ãã report-uri ã«ã¬ããŒããéä¿¡ããŠãã¯ã©ã€ã¢ã³ããããµãŒããŒãžã®æ¥ç¶ã¯èš±å¯ããŸãã</dd> +</dl> + +<h3 id="Fetch_metadata_request_headers" name="Fetch_metadata_request_headers">ã¡ã¿ããŒã¿èªã¿åããªã¯ãšã¹ãããããŒ</h3> + +<dl> + <dt>{{HTTPHeader("Sec-Fetch-Site")}}</dt> + <dd>ãªã¯ãšã¹ãéå§å
ã®ãªãªãžã³ãšå®å
ã®ãªãªãžã³ãšã®é¢ä¿ã瀺ããªã¯ãšã¹ãããããŒã§ããããã¯æ§é åããããŒã§ãå€ã¯ããŒã¯ã³ã§ãããåãããå€ã¯ <code>cross-site</code>, <code>same-origin</code>, <code>same-site</code>, <code>none</code> ã§ãã</dd> + <dt>{{HTTPHeader("Sec-Fetch-Mode")}}</dt> + <dd>ãµãŒããŒãžã®ãªã¯ãšã¹ãã¢ãŒãã瀺ããªã¯ãšã¹ãããããŒã§ããããã¯æ§é åããããŒã§ãå€ã¯ããŒã¯ã³ã§ãããåãããå€ã¯ <code>cors</code>, <code>navigate</code>, <code>nested-navigate</code>, <code>no-cors</code>, <code>same-origin</code>, <code>websocket</code> ã§ãã</dd> + <dt>{{HTTPHeader("Sec-Fetch-User")}}</dt> + <dd>ããã²ãŒã·ã§ã³ãªã¯ãšã¹ãããŠãŒã¶ãŒæäœã«ãã£ãŠèµ·åããããã©ããã瀺ããªã¯ãšã¹ãããããŒã§ããããã¯æ§é åããããŒã§ãããè«çå€ã§ãåãããå€ã¯ <code>?0</code> ãªãã°åœã <code>?1</code> ãªãã°çã§ãã</dd> + <dt>{{HTTPHeader("Sec-Fetch-Dest")}}</dt> + <dd>ãªã¯ãšã¹ãã®å®å
ã瀺ããªã¯ãšã¹ãããããŒã§ããããã¯æ§é åããããŒã§ãå€ã¯ããŒã¯ã³ã§ãããåãããå€ã¯ <code>audio</code>, <code>audioworklet</code>, <code>document</code>, <code>embed</code>, <code>empty</code>, <code>font</code>, <code>image</code>, <code>manifest</code>, <code>object</code>, <code>paintworklet</code>, <code>report</code>, <code>script</code>, <code>serviceworker</code>, <code>sharedworker</code>, <code>style</code>, <code>track</code>, <code>video</code>, <code>worker</code>, <code>xslt</code>, <code>nested-document</code> ã§ãã</dd> +</dl> + +<h2 id="Server-sent_events" name="Server-sent_events">Server-sent event</h2> + +<dl> + <dt>{{HTTPHeader("Last-Event-ID")}}</dt> + <dd>...</dd> + <dt>{{HTTPHeader("NEL")}} {{experimental_inline}}</dt> + <dd>éçºè
ããããã¯ãŒã¯ãšã©ãŒå ±åããªã·ãŒã宣èšã§ããããã«ããä»çµã¿ãå®çŸ©ããŸãã</dd> + <dt>{{HTTPHeader("Ping-From")}}</dt> + <dd>...</dd> + <dt>{{HTTPHeader("Ping-To")}}</dt> + <dd>...</dd> + <dt>{{HTTPHeader("Report-To")}}</dt> + <dd>èŠåããšã©ãŒãéä¿¡ãããã®ãã©ãŠã¶ãŒã«å¯ŸãããµãŒããŒã®ãšã³ããã€ã³ããæå®ããããã«äœ¿çšããŸãã</dd> +</dl> + +<h2 id="Transfer_coding" name="Transfer_coding">転éãšã³ã³ãŒãã£ã³ã°</h2> + +<dl> + <dt>{{HTTPHeader("Transfer-Encoding")}}</dt> + <dd>ãšã³ãã£ãã£ããŠãŒã¶ãŒãžåé¡ãªã転éã§ãããšã³ã³ãŒã圢åŒãæå®ããŸãã</dd> + <dt>{{HTTPHeader("TE")}}</dt> + <dd>ãŠãŒã¶ãŒãšãŒãžã§ã³ããé²ãã§åãå
¥ãã転éãšã³ã³ãŒãã£ã³ã°ãæå®ããŸãã</dd> + <dt>{{HTTPHeader("Trailer")}}</dt> + <dd>éä¿¡è
ã chunk ã¡ãã»ãŒãžã®çµç«¯ã«è¿œå ãã£ãŒã«ããå«ããããšãã§ããŸãã</dd> +</dl> + +<h2 id="WebSockets" name="WebSockets">WebSocket</h2> + +<dl> + <dt>{{HTTPHeader("Sec-WebSocket-Key")}}</dt> + <dd>...</dd> + <dt>{{HTTPHeader("Sec-WebSocket-Extensions")}}</dt> + <dd>...</dd> + <dt>{{HTTPHeader("Sec-WebSocket-Accept")}}</dt> + <dd>...</dd> + <dt>{{HTTPHeader("Sec-WebSocket-Protocol")}}</dt> + <dd>...</dd> + <dt>{{HTTPHeader("Sec-WebSocket-Version")}}</dt> + <dd>...</dd> +</dl> + +<h2 id="Other" name="Other">ãã®ä»</h2> + +<dl> + <dt>{{HTTPHeader("Accept-Push-Policy")}} {{experimental_inline}}</dt> + <dd>ã¯ã©ã€ã¢ã³ãã¯ãªã¯ãšã¹ãã«å¯ŸããŠæ±ããããã·ã¥ããªã·ãŒãããªã¯ãšã¹ãå
㧠<code><a href="https://tools.ietf.org/html/draft-ruellan-http-accept-push-policy-00#section-3.1">Accept-Push-Policy</a></code> ããããŒãã£ãŒã«ããéä¿¡ããããšã§è¡šçŸããããšãã§ããŸãã</dd> + <dt>{{HTTPHeader("Accept-Signature")}} {{experimental_inline}}</dt> + <dd>ã¯ã©ã€ã¢ã³ã㯠<code><a href="https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#rfc.section.3.7">Accept-Signature</a></code> ããããŒãã£ãŒã«ããéä¿¡ããŠãå©çšå¯èœãªçœ²åãå©çšããæå³ã瀺ãããã察å¿ããŠãã眲åã®çš®é¡ã瀺ãããããããšãã§ããŸãã</dd> + <dt>{{HTTPHeader("Alt-Svc")}}</dt> + <dd>ãã®ãµãŒãã¹ã«ãã©ãçãä»ã®æ¹æ³ã®ãªã¹ãã«äœ¿çšããŸãã</dd> + <dt>{{HTTPHeader("Date")}}</dt> + <dd>ã¡ãã»ãŒãžãçæããæ¥æã§ãã</dd> + <dt>{{HTTPHeader("Large-Allocation")}}</dt> + <dd>èªã¿èŸŒã¿äžã®ããŒãžã¯å€§éã®å²ãåœãŠãå¿
èŠã§ããããšããã©ãŠã¶ãŒã«äŒããŸãã</dd> + <dt>{{HTTPHeader("Link")}}</dt> + <dd><code><a href="https://tools.ietf.org/html/rfc5988#section-5">Link</a></code> ãšã³ãã£ãã£ããããŒãã£ãŒã«ãã¯ã HTTP ããããŒå
ã®1ã€ä»¥äžã®ãªã³ã¯ãèšè¿°ããæ¹æ³ãæäŸããŸããæå³çã«ã¯ HTML ã® {{HTMLElement("link")}} èŠçŽ ãšç䟡ã§ãã</dd> + <dt>{{HTTPHeader("Push-Policy")}} {{experimental_inline}}</dt> + <dd><code><a href="https://tools.ietf.org/html/draft-ruellan-http-accept-push-policy-00#section-3.2">Push-Policy</a></code> ã¯ãªã¯ãšã¹ããåŠçãããšãã®ããã·ã¥éç¥ã«é¢ãããµãŒããŒã®åäœãå®çŸ©ããŸãã</dd> + <dt>{{HTTPHeader("Retry-After")}}</dt> + <dd>åŸç¶ã®ãªã¯ãšã¹ããè¡ãåã«ããŠãŒã¶ãŒãšãŒãžã§ã³ããã©ãã ãã®æéåŸ
ã€ã¹ããã瀺ããŸãã</dd> + <dt>{{HTTPHeader("Signature")}} {{experimental_inline}}</dt> + <dd><code><a href="https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#rfc.section.3.1">Signature</a></code> ããããŒãã£ãŒã«ãã¯ã亀æã®ããã®çœ²åã®ãªã¹ããäŒããããããã¯ãã®çœ²åã®æš©åšã決å®ããŠããããŠæŽæ°ããæ¹æ³ã«ã€ããŠã®æ
å ±ã䌎ããŸãã</dd> + <dt>{{HTTPHeader("Signed-Headers")}} {{experimental_inline}}</dt> + <dd><code><a href="https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#rfc.section.5.1.2">Signed-Headers</a></code> ããããŒãã£ãŒã«ãã¯ãã·ã°ããã£ã«å«ããããã®ã¬ã¹ãã³ã¹ããããŒãã£ãŒã«ãã®é åºä»ããªã¹ããèå¥ããŸãã</dd> + <dt>{{HTTPHeader("Server-Timing")}}</dt> + <dd>æå®ããããªã¯ãšã¹ããšã¬ã¹ãã³ã¹ã®ãµã€ã¯ã«ã«ã€ããŠãïŒã€ä»¥äžã®ã¡ããªã¯ã¹åã¯èª¬æãéä¿¡ããŸãã</dd> + <dt>{{HTTPHeader("Service-Worker-Allowed")}}</dt> + <dd><a href="https://w3c.github.io/ServiceWorker/#service-worker-script-response">ãµãŒãã¹ã¯ãŒã«ãŒã¹ã¯ãªããã®ã¬ã¹ãã³ã¹</a>ã«ãã®ããããå«ããããšã§ã<a href="https://w3c.github.io/ServiceWorker/#path-restriction">ãã¹å¶é</a>ã解é€ããããã«äœ¿çšããŸãã</dd> + <dt>{{HTTPHeader("SourceMap")}}</dt> + <dd>çæãããã³ãŒããš <a href="/ja/docs/Tools/Debugger/How_to/Use_a_source_map">ãœãŒã¹ããã</a> ãé¢é£ä»ããŸãã</dd> + <dt>{{HTTPHeader("Upgrade")}}</dt> + <dd>Upgrade ããããŒãã£ãŒã«ãã«é¢é£ãã RFC ææžã¯ <a href="https://tools.ietf.org/html/rfc7230#section-6.7">RFC 7230, section 6.7</a> ã§ããæšæºä»æ§ã§ã¯ãçŸåšã®ã¯ã©ã€ã¢ã³ãããµãŒããŒããã©ã³ã¹ããŒãå±€ãããã³ã«æ¥ç¶ã§å¥ã®ãããã³ã«ãžæŽæ°ãŸãã¯å€æŽããããã®èŠåãå®ããŠããŸããäŸãã°ããã®ããããŒæšæºã§ã¯ãµãŒããŒã Upgrade ããããŒãã£ãŒã«ããèªããŠå®è£
ãããšæ±ºããåæã§ãã¯ã©ã€ã¢ã³ãã HTTP 1.1 ãã HTTP 2.0 ãžå€æŽããããšãå¯èœã«ããŸããã©ã¡ãã®çžæãã Upgrade ããããŒãã£ãŒã«ãã§æå®ãããèŠä»¶ãåãå
¥ããå¿
èŠã¯ãããŸãããããã¯ã¯ã©ã€ã¢ã³ãã®ããããŒã§ããµãŒããŒã®ããããŒã§ã䜿çšã§ããŸããUpgrade ããããŒãã£ãŒã«ããæå®ããå Žåã¯ãæŽæ°ãªãã·ã§ã³ãæããããŒonnection ããããŒãã£ãŒã«ããéä¿¡è
ãéä¿¡ããªããã°ãªããŸãããConnection ããããŒãã£ãŒã«ãã«ã€ããŠã詳ãã㯠<a href="https://tools.ietf.org/html/rfc7230#section-6.1">åè¿°ã® RFC ã®ã»ã¯ã·ã§ã³ 6.1</a> ãã芧ãã ããã</dd> + <dt>{{HTTPHeader("X-DNS-Prefetch-Control")}}</dt> + <dd>ãŠãŒã¶ãŒããã©ãã§ããããªã³ã¯ããããã¥ã¡ã³ããåç
§ããç»åã CSSã JavaScript ãªã©ã®ãªãœãŒã¹ã®ãã¡ã€ã³å解決ããã©ãŠã¶ãŒãäºåã«è¡ãæ©èœã§ããã DNS ããªãã§ãããå¶åŸ¡ããŸãã</dd> + <dt>{{HTTPHeader("X-Firefox-Spdy")}} {{deprecated_inline}} {{non-standard_inline}}</dt> + <dd>...</dd> + <dt>{{HTTPHeader("X-Pingback")}} {{non-standard_inline}}</dt> + <dd>...</dd> + <dt>{{HTTPHeader("X-Requested-With")}}</dt> + <dd>...</dd> + <dt>{{HTTPHeader("X-Robots-Tag")}}{{non-standard_inline}}</dt> + <dd><code><a href="https://developers.google.com/search/reference/robots_meta_tag#xrobotstag">X-Robots-Tag</a></code> ããããŒã¯ãäžè¬ã®æ€çŽ¢ãšã³ãžã³ã®çµæã§ãŠã§ãããŒãžãã©ã®ããã«çŽ¢åŒä»ãããããã瀺ããŸãããã®ããããŒã¯ <code><meta name="robots" content="..."></code> ãšç䟡ã§ãã</dd> + <dt>{{HTTPHeader("X-UA-Compatible")}} {{non-standard_inline}}</dt> + <dd>䜿çšããææžã¢ãŒãã瀺ãããã« Internet Explorer ã§äœ¿çšãããŠããŸãã</dd> +</dl> + +<h2 id="Contributing" name="Contributing">åå</h2> + +<p><a href="/ja/docs/MDN/Contribute/Howto/Document_an_HTTP_header">æ°ããé
ç®ãæžããã</a>ãæ¢åã®ãã®ãæ¹åãããããããšã«ãååãã ããã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="https://en.wikipedia.org/wiki/List_of_HTTP_header_fields">Wikipedia ã® HTTP ããããŒã®äžèŠ§ã®ããŒãž</a></li> + <li><a href="https://www.iana.org/assignments/message-headers/perm-headers.html">IANA ã¬ãžã¹ããª</a></li> + <li><a href="https://httpwg.org/specs/">HTTP Working Group</a></li> +</ul> diff --git a/files/ja/web/http/headers/index/index.html b/files/ja/web/http/headers/index/index.html new file mode 100644 index 0000000000..de4df1e89a --- /dev/null +++ b/files/ja/web/http/headers/index/index.html @@ -0,0 +1,13 @@ +--- +title: çŽ¢åŒ +slug: Web/HTTP/Headers/Index +tags: + - HTTP + - HTTP ããã㌠+ - ããã㌠+ - çŽ¢åŒ +translation_of: Web/HTTP/Headers/Index +--- +<div>{{HTTPSidebar}}</div> + +<p>{{Index("/ja/docs/Web/HTTP/Headers")}}</p> diff --git a/files/ja/web/http/headers/keep-alive/index.html b/files/ja/web/http/headers/keep-alive/index.html new file mode 100644 index 0000000000..f2535d4ec8 --- /dev/null +++ b/files/ja/web/http/headers/keep-alive/index.html @@ -0,0 +1,99 @@ +--- +title: Keep-Alive +slug: Web/HTTP/Headers/Keep-Alive +tags: + - General Header + - HTTP + - HTTP Header + - Reference +translation_of: Web/HTTP/Headers/Keep-Alive +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Keep-Alive</code></strong> äžè¬ããããŒã¯ãéä¿¡è
ãæ¥ç¶ã®ä»çµã¿ããã¿ã€ã ã¢ãŠãå€ãšæ倧ãªã¯ãšã¹ãæ°ã®èšå®ã«äœ¿çšãããå¯èœæ§ãããããšããã³ããšããããšãã§ããŸãã</p> + +<div class="note"> +<p>ãã®ããããŒãæå³ãæã€ããã«ã¯ã {{HTTPHeader("Connection")}} ããããŒã "keep-alive" ã«èšå®ããå¿
èŠããããŸãã</p> +</div> + +<div class="blockIndicator warning"> +<p>{{HTTPHeader("Connection")}} ã {{HTTPHeader("Keep-Alive")}} ãªã©ã®æ¥ç¶åºæã®ããããŒãã£ãŒã«ã㯠<a href="https://tools.ietf.org/html/rfc7540#section-8.1.2.2">HTTP/2 ã§ã¯çŠæ¢ãããŠããŸã</a>ã Chrome ãš Firefox 㯠HTTP/2 ã¬ã¹ãã³ã¹ã§ããããç¡èŠããŸããã Safari 㯠HTTP/2 ä»æ§ã®èŠä»¶ã«æºæ ããŠãããããããå«ãã¬ã¹ãã³ã¹ã¯èªã¿èŸŒãŸããŸããã</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("General header", "äžè¬ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Keep-Alive: <var>parameters</var></pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code><var>parameters</var></code></dt> + <dd>ã«ã³ãã§åºåããããã©ã¡ãŒã¿ã®ãªã¹ããåãã©ã¡ãŒã¿ã¯èå¥åãšçå· (<code>'='</code>) ã§åºåãããå€ã§æ§æãããŸãã以äžã®èå¥åãå©çšå¯èœã§ãã + <ul> + <li><code>timeout</code>: åŸ
æ©ç¶æ
ã®æ¥ç¶ãéãããŸãŸã«ããŠããå¿
èŠã®ããæå°æé (ç§åäœ) ã瀺ããŸããkeep-alive TCP ã¡ãã»ãŒãžããã©ã³ã¹ããŒãã¬ãã«ã§èšå®ãããŠããªãå ŽåãTCP ã¿ã€ã ã¢ãŠããããé·ãã¿ã€ã ã¢ãŠããç¡èŠãããããšã«æ³šæããŠãã ããã</li> + <li><code>max</code>: æ¥ç¶ãéããåã«ãã®æ¥ç¶ã§éä¿¡ã§ãããªã¯ãšã¹ãã®æ倧æ°ã瀺ããŸãã<code>0</code> 以å€ã®å Žåã次ã®ã¬ã¹ãã³ã¹ã§å¥ã®ãªã¯ãšã¹ããéä¿¡ãããããããã€ãã©ã€ã³ã§ãªãæ¥ç¶ã§ã¯ãã®å€ã¯ç¡èŠãããŸããHTTP ãã€ãã©ã€ã³ã¯ããã€ãã©ã€ã³ãå¶éããããã«äœ¿çšã§ããŸãã</li> + </ul> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p><code>Keep-Alive</code> ããããŒãå«ãã¬ã¹ãã³ã¹ã§ãã</p> + +<pre class="notranslate">HTTP/1.1 200 OK +<strong>Connection: Keep-Alive</strong> +Content-Encoding: gzip +Content-Type: text/html; charset=utf-8 +Date: Thu, 11 Aug 2016 15:23:13 GMT +<strong>Keep-Alive: timeout=5, max=1000</strong> +Last-Modified: Mon, 25 Jul 2016 04:32:39 GMT +Server: Apache + +(æ¬æ)</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td><a href="https://tools.ietf.org/html/draft-thomson-hybi-http-timeout-03#section-2">HTTP Keep-Alive Header</a></td> + <td>Keep-Alive Header (IETF Internet Draft)</td> + </tr> + <tr> + <td><a href="https://tools.ietf.org/html/rfc7230#appendix-A.1.2">RFC 7230, appendix A.1.2: Keep-Alive</a></td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Keep-Alive")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Connection")}}</li> + <li><a href="/ja/docs/Web/HTTP/Connection_management_in_HTTP_1.x">HTTP/1.x ã®ã³ãã¯ã·ã§ã³ç®¡ç</a></li> +</ul> diff --git a/files/ja/web/http/headers/last-modified/index.html b/files/ja/web/http/headers/last-modified/index.html new file mode 100644 index 0000000000..e176de8c10 --- /dev/null +++ b/files/ja/web/http/headers/last-modified/index.html @@ -0,0 +1,94 @@ +--- +title: Last-Modified +slug: Web/HTTP/Headers/Last-Modified +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Last-Modified +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>Last-Modified</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ããªãœãŒã¹ãæåŸã«å€æŽããããšãªãªãžã³ã®ãµãŒããŒãå€æããŠããæ¥æãå«ã¿ãŸããããã¯åä¿¡ãŸãã¯ä¿åããããªãœãŒã¹ããåããã®ã§ããããå€æããæ€èšŒææãšããŠäœ¿çšãããŸãã {{HTTPHeader("ETag")}} ããããŒããã粟床ã¯äœãããã®ä»£æ¿æ段ã«ãªããŸãã {{HTTPHeader("If-Modified-Since")}} ã {{HTTPHeader("If-Unmodified-Since")}} ããããŒãå«ãæ¡ä»¶ä»ããªã¯ãšã¹ãã¯ãã®ãã£ãŒã«ãã䜿çšããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + <tr> + <th scope="row">{{Glossary("CORS-safelisted response header", "CORS ã»ãŒããªã¹ãã¬ã¹ãã³ã¹ããããŒ")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Last-Modified: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><day-name></dt> + <dd>"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ã®äžããäžã€ (倧æåã»å°æåã®åºå¥ãã)</dd> + <dt><day></dt> + <dd>2æ¡ã®æ¥ä»ãè¡šãæ°å, äŸ "04" ã "23".</dd> + <dt><month></dt> + <dd>"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ã®äžããäžã€ (倧æåã»å°æåã®åºå¥ãã)</dd> + <dt><year></dt> + <dd>4æ¡ã®å¹Žãè¡šãæ°å, äŸ "1990" ã "2016"</dd> + <dt><hour></dt> + <dd>2æ¡ã®æãè¡šãæ°å, äŸ "09" ã "23"</dd> + <dt><minute></dt> + <dd>2æ¡ã®åãè¡šãæ°å, äŸ "04" ã "59"</dd> + <dt><second></dt> + <dd>2æ¡ã®ç§ãè¡šãæ°å, äŸ "04" ã "59"</dd> + <dt><code>GMT</code></dt> + <dd> + <p>ã°ãªãããžæšæºæã HTTP ã«ãããæå»ã¯åžžã«ã°ãªãããžæšæºæã§è¡šãããããŒã«ã«æå»ã«ãªãããšã¯ãããŸããã</p> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Last-Modified: Wed, 21 Oct 2015 07:28:00 GMT +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7232", "Last-Modified", "2.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Last-Modified")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("If-Modified-Since")}}</li> + <li>{{HTTPHeader("If-Unmodified-Since")}}</li> + <li>{{HTTPHeader("Etag")}}</li> +</ul> diff --git a/files/ja/web/http/headers/link/index.html b/files/ja/web/http/headers/link/index.html new file mode 100644 index 0000000000..21e98ecfd4 --- /dev/null +++ b/files/ja/web/http/headers/link/index.html @@ -0,0 +1,82 @@ +--- +title: Link +slug: Web/HTTP/Headers/Link +tags: + - Draft + - HTTP + - HTTP Header + - HTTP ããã㌠+ - Link + - NeedsCompatTable + - NeedsContent + - NeedsSyntax + - Reference + - ãšã³ãã£ãã£ããã㌠+translation_of: Web/HTTP/Headers/Link +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>Link</code></strong> ãšã³ãã£ãã£ããããŒãã£ãŒã«ãã¯ã HTTP ããããŒå
ã®1ã€ä»¥äžã®ãªã³ã¯ãã·ãªã¢ã«åããæ段ãæäŸããŸããæå³çã«ã¯ã HTML ã® <link> èŠçŽ ãšåçã§ãã</p> + +<h2 id="Syntax">Syntax</h2> + +<pre class="syntaxbox">Link: < <var>uri-reference</var> >; <var>param1</var>=<var>value1</var>; <var>param2</var>="<var>value2</var>"</pre> + +<dl> + <dt><code><uri-reference></code></dt> + <dd>URI åç
§ã <code><</code> ãš <code>></code> ã§å²ãå¿
èŠããããŸãã</dd> +</dl> + +<h3 id="Parameters">Parameters</h3> + +<p>ãªã³ã¯ããããŒã«ã¯ <code>;</code> ã§åºåããããã©ã¡ãŒã¿ãŒãå«ãŸããŠããã {{HTMLElement("link")}} èŠçŽ ã®å±æ§ã«çžåœããŸãã</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>URI 㯠<code><</code> ãš <code>></code> ã§å²ãå¿
èŠããããŸãã</p> + +<pre class="brush: http; no-line-numbers example-good">Link: <https://example.com>; rel="preconnect"</pre> + +<pre class="brush: http; no-line-numbers example-bad">Link: https://bad.example; rel="preconnect"</pre> + +<h3 id="Specifying_multiple_links" name="Specifying_multiple_links">è€æ°ãªã³ã¯ãæå®</h3> + +<p>ã«ã³ãã§åºåãããè€æ°ã®ãªã³ã¯ãæå®ã§ããŸãã次ã«äŸã瀺ããŸãã</p> + +<pre>Link: <https://one.example.com>; rel="preconnect", <https://two.example.com>; rel="preconnect", <https://three.example.com>; rel="preconnect"</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC(8288, "Link Serialisation in HTTP Headers", 3)}}</td> + <td><span class="spec-RFC">IETF RFC</span></td> + <td></td> + </tr> + <tr> + <td>{{RFC(5988, "The Link Header Field", 5)}}</td> + <td><span class="spec-RFC">IETF RFC</span></td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Link")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus(103, "103 Early Hints")}}</li> +</ul> diff --git a/files/ja/web/http/headers/location/index.html b/files/ja/web/http/headers/location/index.html new file mode 100644 index 0000000000..5996315a4f --- /dev/null +++ b/files/ja/web/http/headers/location/index.html @@ -0,0 +1,83 @@ +--- +title: Location +slug: Web/HTTP/Headers/Location +tags: + - HTTP + - HTTP ã¬ã¹ãã³ã¹ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Location +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Location</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ãªãã€ã¬ã¯ãå
ã® URL ã瀺ããŸãã <code>3xx</code> (ãªãã€ã¬ã¯ã) ãŸã㯠<code>{{HTTPStatus("201")}}</code> (created) ã¹ããŒã¿ã¹ã¬ã¹ãã³ã¹ãè¿ããšãã®ã¿æå³ãæããŸãã</p> + +<p>ãªãã€ã¬ã¯ãã®å Žåã HTTP ã¡ãœããã¯å
ã®ã¡ãœãããšãªãã€ã¬ã¯ãã®çš®é¡ã«ãã£ãŠã <code>Location</code> ã§ç€ºãããããŒãžã«ã¢ã¯ã»ã¹ããæ°ãããªã¯ãšã¹ããçæããããã«äœ¿çšããŸãã</p> + +<ul> + <li>{{HTTPStatus("303")}} (See Also) ã¬ã¹ãã³ã¹ã¯åžžã« {{HTTPMethod("GET")}} ã¡ãœããã䜿çšããããã«èªå°ããã {{HTTPStatus("307")}} (Temporary Redirect) ããã³ {{HTTPStatus("308")}} (Permanent Redirect) ã¯å
ã®ãªã¯ãšã¹ãã«ãããŠäœ¿çšãããã¡ãœãããå€æŽããŸããã</li> + <li>{{HTTPStatus("301")}} (Permanent Redirect) ãš {{HTTPStatus("302")}} (Found) ã¯å€ãã®å Žåã¯ã¡ãœãããå€æŽããŸããããå€ããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯å€æŽããããšããããŸã (ãã®ãããåºæ¬çã«çµæã¯äžæã§ã)ã</li> +</ul> + +<p>ãããã®ã¹ããŒã¿ã¹ã³ãŒããæã€ãã¹ãŠã®ã¬ã¹ãã³ã¹ã¯ã <code>Location</code> ããããŒãéä¿¡ããŸãã</p> + +<p>ãªãœãŒã¹äœæ (created) ã§ã¯ãæ°ããäœæããããªãœãŒã¹ãžã® URL ã瀺ããŸãã</p> + +<p><code>Location</code> ãš {{HTTPHeader("Content-Location")}} ã¯ç°ãªããŸãã <code>Location</code> ããããŒã¯ããªãã€ã¬ã¯ãã®å¯Ÿè±¡ (ãŸãã¯æ°ããäœæããããªãœãŒã¹ã® URL) ã瀺ãã {{HTTPHeader("Content-Location")}} ããããŒã¯<a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a>ãèµ·ãããšããæŽãªãã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ãèµ·ããªãããã«ããªãœãŒã¹ãžã¢ã¯ã»ã¹ã§ããçŽæ¥çãªURLãæããŸãã <code>Location</code> ã¯ã¬ã¹ãã³ã¹ã«é¢é£ä»ãããããŒã§ã {{HTTPHeader("Content-Location")}} ã¯è¿ããããšã³ãã£ãã£ã«é¢é£ä»ããããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Location: <url> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><url></dt> + <dd>(ãªã¯ãšã¹ã URL ããã®) çžå¯Ÿ URLããŸãã¯çµ¶å¯Ÿ URLã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Location: /index.html</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + <tr> + <td>{{RFC("7231", "Location", "7.1.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Location")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Location")}}</li> + <li><code>Location</code> ããããŒãå«ãã¬ã¹ãã³ã¹ã®ã¹ããŒã¿ã¹: {{HTTPStatus("201")}}, {{HTTPStatus("301")}}, {{HTTPStatus("302")}}, {{HTTPStatus("303")}}, {{HTTPStatus("307")}}, {{HTTPStatus("308")}}.</li> +</ul> diff --git a/files/ja/web/http/headers/nel/index.html b/files/ja/web/http/headers/nel/index.html new file mode 100644 index 0000000000..3ff7dac702 --- /dev/null +++ b/files/ja/web/http/headers/nel/index.html @@ -0,0 +1,58 @@ +--- +title: NEL +slug: Web/HTTP/Headers/NEL +tags: + - HTTP + - HTTP Header + - HTTP ããã㌠+ - Network Error Logging + - Reference + - Response Header + - header + - ãããã¯ãŒã¯ãšã©ãŒãã°èšé² + - ããã㌠+ - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/NEL +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>NEL</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ããããã¯ãŒã¯ãªã¯ãšã¹ããã°èšé²ãæ§æããããã«äœ¿çšãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">NEL: { "report_to": "name_of_reporting_group", "max_age": 12345, "include_subdomains": false, "success_fraction": 0.0, "failure_fraction": 1.0 } +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + </tr> + </thead> + <tbody> + <tr> + <td><a href="https://w3c.github.io/network-error-logging/#nel-response-header">Network Error Logging</a></td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Network_Error_Logging">Network Error Logging (NEL) ã®èª¬æ</a></li> +</ul> diff --git a/files/ja/web/http/headers/origin/index.html b/files/ja/web/http/headers/origin/index.html new file mode 100644 index 0000000000..6572bf9e8d --- /dev/null +++ b/files/ja/web/http/headers/origin/index.html @@ -0,0 +1,87 @@ +--- +title: Origin +slug: Web/HTTP/Headers/Origin +tags: + - HTTP + - Reference + - header + - origin + - ãªã¯ãšã¹ãããã㌠+translation_of: Web/HTTP/Headers/Origin +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Origin</code></strong> ãªã¯ãšã¹ãããããŒã¯ãã©ãããã§ããã®åç¹ã§ãããã瀺ããŸãããã¹æ
å ±ã¯å«ãŸããããµãŒããŒåã®ã¿ãå«ãŸããŸããããã¯ã {{Glossary("CORS")}} ãªã¯ãšã¹ããšãåæ§ã« {{HTTPMethod("POST")}} ãªã¯ãšã¹ãã§ãéä¿¡ãããŸãã {{HTTPHeader("Referer")}} ããããŒãšäŒŒãŠããŸããããã¹å
šäœãå
¬éãããããã§ã¯ãªãç¹ãç°ãªããŸãã</p> + +<div class="blockIndicator note"> +<p><strong>ã¡ã¢</strong>: {{httpheader("Origin")}} ããããŒã¯ <a href="/ja/docs/Web/API/WindowOrWorkerGlobalScope/fetch">Fetch ãªã¯ãšã¹ã</a>ã {{HTTPMethod("HEAD")}} ãŸã㯠{{HTTPMethod("GET")}} ã¡ãœããã§è¡ã£ãå Žåã«ã¯èšå®ãããŸãã (ãã®æå㯠Firefox 65 ã§ä¿®æ£ãããŸããã â {{bug(1508661)}} ãåç
§ããŠãã ãã)ã</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Origin: null +Origin: <scheme> "://" <hostname> [ ":" <port> ] +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><scheme></dt> + <dd>䜿çšããããããã³ã«ã éåžžã HTTP ãããã³ã«ãŸãã¯ãã®ã»ãã¥ã¢ããŒãžã§ã³ã§ãã HTTPS ã§ãã</dd> + <dt><hostname></dt> + <dd>ãµãŒããŒã®ãã¡ã€ã³å (ä»®æ³ãã¹ãã£ã³ã°ã®å Žå) ãŸã㯠IP ã¢ãã¬ã¹ã</dd> + <dt><port> {{optional_inline}}</dt> + <dd>ãµãŒããŒãåŸ
ã¡åãããŠãã TCP ããŒãçªå·ãããŒãçªå·ãæå®ãããŠããªãå Žåããªã¯ãšã¹ãããããµãŒãã¹ã®æ¢å®ã®ããŒãçªå· (HTTP URL ã®å Žå㯠"80" ãªã©) ãæé»çã«æå®ãããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre class="notranslate">Origin: https://developer.mozilla.org</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("6454", "Origin", "7")}}</td> + <td>The Web Origin Concept</td> + </tr> + <tr> + <td>{{SpecName('Fetch','#origin-header','Origin header')}}</td> + <td>Supplants the <code>Origin</code> header as defined in RFC6454.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<div>{{Compat("http.headers.Origin")}}</div> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Host")}}</li> + <li>{{HTTPHeader("Referer")}}</li> + <li><a href="/ja/docs/Web/Security/Same-origin_policy">åäžãªãªãžã³ããªã·ãŒ</a></li> +</ul> diff --git a/files/ja/web/http/headers/pragma/index.html b/files/ja/web/http/headers/pragma/index.html new file mode 100644 index 0000000000..d32de36c75 --- /dev/null +++ b/files/ja/web/http/headers/pragma/index.html @@ -0,0 +1,83 @@ +--- +title: Pragma +slug: Web/HTTP/Headers/Pragma +tags: + - Caching + - Deprecated + - HTTP + - ããã㌠+ - ãªã¯ãšã¹ã +translation_of: Web/HTTP/Headers/Pragma +--- +<div>{{HTTPSidebar}}</div> + +<p><code><strong>Pragma</strong></code> 㯠HTTP/1.0 ã®äžè¬ããããŒã§ãå®è£
åºæã®ããããŒã§ããããªã¯ãšã¹ã - ã¬ã¹ãã³ã¹ãã§ãŒã³ã«æ²¿ã£ãŠããŸããŸãªåœ±é¿ãäžããŸãã <code>Cache-Control</code> HTTP/1.1 ããããŒããŸã ååšããªã HTTP/1.0 ãã£ãã·ã¥ãšã®äžäœäºææ§ã®ããã«äœ¿çšãããŸãã</p> + +<div class="note"> +<p><strong>ã¡ã¢</strong>: <code>Pragma</code> 㯠HTTP ã¬ã¹ãã³ã¹ã«ã¯æå®ãããŠããªãããããªã¯ãšã¹ãã® <code>Cache-Control</code> ããããŒãã£ãŒã«ããçç¥ãããŠããå Žå㯠<code>Cache-Control: no-cache</code> ãšåãããã«åäœããŸãããäžè¬ç㪠HTTP/1.1 <code>Cache-Control</code> ããããŒã®ä»£ããã«ä¿¡é Œã§ãããã®ã§ã¯ãããŸããã<code>Pragma</code> 㯠HTTP/1.0 ã¯ã©ã€ã¢ã³ããšã®äžäœäºææ§ã®ããã«ã®ã¿äœ¿çšããŠãã ããã</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("General header", "äžè¬ããããŒ")}}, ãã ãã¬ã¹ãã³ã¹ã®æ¯ãèãã¯æå®ãããŠããªããããå®è£
åºæã§ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + <tr> + <th scope="row">{{Glossary("CORS-safelisted response header", "CORS ã»ãŒããªã¹ãã¬ã¹ãã³ã¹ããããŒ")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Pragma: no-cache +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt>no-cache</dt> + <dd> + <p><code>Cache-Control: no-cache</code> ãšåãã§ãããã£ãã·ã¥ãããã³ããŒã解æŸããåã«ããã£ãã·ã¥ãæ€èšŒã®ããã«ãªãªãžã³ãµãŒããŒã«ãªã¯ãšã¹ããéä¿¡ããããã«ããŸãã</p> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Pragma: no-cache</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7234", "Pragma", "5.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Caching</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Pragma")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Cache-Control")}}</li> + <li>{{HTTPHeader("Expires")}}</li> +</ul> diff --git a/files/ja/web/http/headers/proxy-authenticate/index.html b/files/ja/web/http/headers/proxy-authenticate/index.html new file mode 100644 index 0000000000..5cf3e29cab --- /dev/null +++ b/files/ja/web/http/headers/proxy-authenticate/index.html @@ -0,0 +1,85 @@ +--- +title: Proxy-Authenticate +slug: Web/HTTP/Headers/Proxy-Authenticate +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - ãããã· + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Proxy-Authenticate +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP <strong><code>Proxy-Authenticate</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ã{{Glossary("proxy server", "ãããã·ãµãŒããŒ")}}ã®èåŸã«ãããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ã«äœ¿çšãããèªèšŒã¡ãœãããå®çŸ©ããŸãããããã·ãµãŒããŒãžã®ãªã¯ãšã¹ããèªèšŒãããããã·ãµãŒããŒããªã¯ãšã¹ããããã«éä¿¡ã§ããããã«ããŸãã</p> + +<p><code>Proxy-Authenticate</code> ããããŒã¯ã {{HTTPStatus("407")}} <code>Proxy Authentication Required</code> ãšãšãã«éä¿¡ãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Proxy-Authenticate: <type> realm=<realm> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><type></dt> + <dd><a href="/ja/docs/Web/HTTP/Authentication#Authentication_schemes">èªèšŒã¿ã€ã</a>ã äžè¬çãªã¿ã€ã㯠<a href="/ja/docs/Web/HTTP/Authentication#Basic_authentication_scheme">"Basic"</a> ã§ãã IANA ã¯<a href="http://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">èªèšŒã¹ããŒã ã®ãªã¹ã</a>ã管çããŠããŸãã</dd> + <dt>realm=<realm></dt> + <dd>ä¿è·ãããé åãã€ãŸã realm ã®è©³çŽ°ã realm ãæå®ãããŠããªãå Žåãã¯ã©ã€ã¢ã³ãã¯ãµã€ã代ããã«æŽåœ¢ããããã¹ãåã衚瀺ããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Proxy-Authenticate: Basic + +Proxy-Authenticate: Basic realm="Access to the internal site" +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + <tr> + <td>{{RFC("7235", "Proxy-Authenticate", "4.3")}}</td> + <td>HTTP/1.1: Authentication</td> + </tr> + <tr> + <td>{{RFC("7617")}}</td> + <td>The 'Basic' HTTP Authentication Scheme</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Proxy-Authenticate")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Authentication">HTTP èªèšŒ</a></li> + <li>{{HTTPHeader("Authorization")}}</li> + <li>{{HTTPHeader("Proxy-Authorization")}}</li> + <li>{{HTTPHeader("WWW-Authenticate")}}</li> + <li>{{HTTPStatus("401")}}, {{HTTPStatus("403")}}, {{HTTPStatus("407")}}</li> +</ul> diff --git a/files/ja/web/http/headers/proxy-authorization/index.html b/files/ja/web/http/headers/proxy-authorization/index.html new file mode 100644 index 0000000000..b56a88e7da --- /dev/null +++ b/files/ja/web/http/headers/proxy-authorization/index.html @@ -0,0 +1,77 @@ +--- +title: Proxy-Authorization +slug: Web/HTTP/Headers/Proxy-Authorization +translation_of: Web/HTTP/Headers/Proxy-Authorization +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP <strong><code>Proxy-Authorization</code></strong> ãªã¯ãšã¹ãããããŒã¯ããããã·ãµãŒããŒã«å¯ŸããŠãŠãŒã¶ãŒãšãŒãžã§ã³ããèªèšŒããããã®èªèšŒæ
å ±ãä¿æãããµã€ãã¯ãµãŒããŒã {{HTTPStatus("407")}} <code>Proxy Authentication Required</code> ã¹ããŒã¿ã¹ãš {{HTTPHeader("Proxy-Authenticate")}} ããããŒãè¿ããåŸã«äœ¿ãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header","ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name","çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="æ§æ">æ§æ</h2> + +<pre class="syntaxbox notranslate">Proxy-Authorization: <type> <credentials></pre> + +<h2 id="ãã£ã¬ã¯ãã£ã">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><type></dt> + <dd><a href="/ja/docs/Web/HTTP/Authentication#Authentication_schemes">èªèšŒã®çš®é¡</a>ãäžè¬çã«ã¯Â <a href="/ja/docs/Web/HTTP/Authentication#Basic_authentication_scheme">"Basic"</a> ã§ãã<a href="http://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">èªèšŒæ¹æ³ã® IANA ã¬ãžã¹ããª</a>ãåç
§ããŠãã ããã</dd> + <dt><credentials></dt> + <dd>"Basic" èªèšŒæ¹åŒã䜿çšããŠããå ŽåãèªèšŒæ
å ±ã¯æ¬¡ã®ããã«æ§ç¯ãããŸãã + <ul> + <li>ã³ãã³ã§çµåãããŠãŒã¶ãŒåãšãã¹ã¯ãŒã (<code>aladdin:opensesame</code>)ã</li> + <li>çµæã®æåå㯠<a href="/ja/docs/Web/API/WindowBase64/Base64_encoding_and_decoding">Base64</a> ã§ãšã³ã³ãŒããããŸã (<code>YWxhZGRpbjpvcGVuc2VzYW1l</code>)ã</li> + </ul> + + <div class="note"> + <p><strong>ã¡ã¢</strong>: Base64 ãšã³ã³ãŒãã¯æå·åã§ãããã·ã¥ã§ããããŸããããã®æ¹æ³ã®å®å
šæ§ã¯ã¯ãªã¢ããã¹ãã§èªèšŒæ
å ±ãéãã®ãšåçã§ã (Base64 ã¯å¯éãšã³ã³ãŒãã£ã³ã°ã§ã)ã Basic èªèšŒã¯ HTTPS ãšã®çµã¿åããã§äœ¿çšããããšããå§ãããŸãã</p> + </div> + </dd> +</dl> + +<h2 id="äŸ">äŸ</h2> + +<pre class="notranslate">Proxy-Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l +</pre> + +<h2 id="ä»æ§æž">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + <tr> + <td>{{RFC("7235", "Proxy-Authorization", "4.4")}}</td> + <td>HTTP/1.1: Authentication</td> + </tr> + <tr> + <td>{{RFC("7617")}}</td> + <td>The 'Basic' HTTP Authentication Scheme</td> + </tr> + </tbody> +</table> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Authentication">HTTP èªèšŒ</a></li> + <li>{{HTTPHeader("Proxy-Authenticate")}}</li> + <li>{{HTTPHeader("WWW-Authenticate")}}</li> + <li>{{HTTPHeader("Authorization")}}</li> + <li>{{HTTPStatus("401")}}, {{HTTPStatus("403")}}, {{HTTPStatus("407")}}</li> +</ul> diff --git a/files/ja/web/http/headers/range/index.html b/files/ja/web/http/headers/range/index.html new file mode 100644 index 0000000000..bb750185c2 --- /dev/null +++ b/files/ja/web/http/headers/range/index.html @@ -0,0 +1,97 @@ +--- +title: Range +slug: Web/HTTP/Headers/Range +tags: + - HTTP + - HTTP Header + - Range Requests + - Reference + - Request header + - ãªã¯ãšã¹ãããã㌠+translation_of: Web/HTTP/Headers/Range +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>Range</code></strong> 㯠HTTP ã®ãªã¯ãšã¹ãããããŒã§ããµãŒããŒãè¿ãã¹ãææžã®éšåã瀺ããŸãã1 ã€ã® <code>Range</code> ããããŒã§è€æ°ã®éšåãäžåºŠã«ãªã¯ãšã¹ãããããšãã§ãããµãŒããŒã¯ãããã®ç¯å²ããã«ãããŒãã®ææžã§è¿ãããšãã§ããŸãããµãŒããŒãç¯å²ãéãè¿ãå ŽåããµãŒããŒã¯ã¬ã¹ãã³ã¹ã« {{HTTPStatus("206")}}<code> Partial Content</code> ã䜿çšããŸããç¯å²ãç¡å¹ãªå ŽåããµãŒã㯠{{HTTPStatus("416")}}<code> Range Not Satisfiable</code> ãšã©ãŒãè¿ããŸãããµãŒããŒã¯ <code>Range</code> ãããïŒãç¡èŠããŠãææžå
šäœã {{HTTPStatus("200")}} ã®ã¹ããŒã¿ã¹ã³ãŒãã§è¿ãããšãã§ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Range: <unit>=<range-start>- +Range: <unit>=<range-start>-<range-end> +Range: <unit>=<range-start>-<range-end>, <range-start>-<range-end> +Range: <unit>=<range-start>-<range-end>, <range-start>-<range-end>, <range-start>-<range-end> +Range: <unit>=-<suffix-length></pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><unit></dt> + <dd>ç¯å²ãæå®ããåäœã§ããããã¯ãµã€ã <code>bytes</code> ã§ãã</dd> +</dl> + +<dl> + <dt><range-start></dt> + <dd>æŽæ°å€ã§ããªã¯ãšã¹ãããç¯å²ã®å
é ãæå®ããåäœã§ç€ºããŸãã</dd> + <dt><range-end></dt> + <dd>æŽæ°å€ã§ããªã¯ãšã¹ãããç¯å²ã®æ«å°Ÿãæå®ããåäœã§ç€ºããŸãããã®å€ã¯çç¥å¯èœã§ãçç¥æã¯ææžã®æ«å°Ÿãç¯å²ã®æ«å°ŸãšããŠæ±ãããŸãã</dd> + <dt><suffix-length></dt> + <dd>æŽæ°å€ã§ãè¿ãé·ããäœã§ãã¡ã€ã«ã®æ«å°Ÿããã®åæ°ã瀺ããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>ãã¡ã€ã«ãã3ã€ã®ç¯å²ããªã¯ãšã¹ãããŸãã</p> + +<pre class="notranslate">Range: bytes=200-1000, 2000-6576, 19000- +</pre> + +<p>ãã¡ã€ã«ã®å
é ã®500ãã€ããšæ«å°Ÿã®500ãã€ãããªã¯ãšã¹ãããŸããç¯å²ãéè€ããå Žåã¯ãµãŒããŒããªã¯ãšã¹ããæåŠããããšããããŸãã</p> + +<pre class="notranslate">Range: bytes=0-499, -500 +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7233", "Range", "3.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Range")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("If-Range")}}</li> + <li>{{HTTPHeader("Content-Range")}}</li> + <li>{{HTTPHeader("Content-Type")}}</li> + <li>{{HTTPStatus("206")}}<code> Partial Content</code></li> + <li>{{HTTPStatus("416")}}<code> Range Not Satisfiable</code></li> +</ul> diff --git a/files/ja/web/http/headers/referer/index.html b/files/ja/web/http/headers/referer/index.html new file mode 100644 index 0000000000..2fabff3159 --- /dev/null +++ b/files/ja/web/http/headers/referer/index.html @@ -0,0 +1,88 @@ +--- +title: Referer +slug: Web/HTTP/Headers/Referer +tags: + - HTTP + - HTTP ãªã¯ãšã¹ãããã㌠+ - Reference + - referer + - ããã㌠+ - ãªã¯ãšã¹ãããã㌠+ - ãªãã¡ã©ãŒ +translation_of: Web/HTTP/Headers/Referer +--- +<div>{{HTTPSidebar}}</div> + +<p><code><strong>Referer</strong></code> ãªã¯ãšã¹ãããããŒã«ã¯ãçŸåšãªã¯ãšã¹ããããŠããããŒãžãžã®ãªã³ã¯å
ãæã£ãçŽåã®ãŠã§ãããŒãžã®ã¢ãã¬ã¹ãå«ãŸããŠããŸãã <code>Referer</code> ããããŒã«ããããµãŒããŒã¯äººã
ãã©ããã蚪åãã«æ¥ãããèå¥ããåæããã°ããã£ãã·ã¥ã®æé©åãªã©ã«å©çšããããšãã§ããŸãã</p> + +<div class="warning"> +<p><strong>éèŠ</strong>: ãã®ããããŒã«ã¯ç¡å®³ãªçšéãå€æ°ãããŸããããŠãŒã¶ãŒã®ã»ãã¥ãªãã£ãšãã©ã€ãã·ãŒã«æãŸãããªãçµæãããããå¯èœæ§ããããŸãã 詳现æ
å ±ãšç·©åçã«ã€ããŠã¯ <a href="/ja/docs/Web/Security/Referer_header:_privacy_and_security_concerns">Referer header: privacy and security concerns</a> ãåç
§ããŠãã ããã</p> +</div> + +<p>ãªãã referer ã¯å®éã«ã¯ "referrer" ãšããåèªã®ã¹ãã«ãã¹ã§ãã詳ãã㯠{{interwiki("wikipedia", "HTTPãªãã¡ã©", "Wikipedia ã® HTTP ãªãã¡ã©")}}ãåç
§ããŠãã ããã</p> + +<p>次ã®ãããªå Žåã¯ããã©ãŠã¶ãŒã¯ <code>Referer</code> ããããŒãéä¿¡ããŸããã</p> + +<ul> + <li>åç
§ããŠãããªãœãŒã¹ãããŒã«ã«ã® "file" ãŸã㯠"data" ã® URI ã®å Žå</li> + <li>å®å
šã§ã¯ãªã HTTP ãªã¯ãšã¹ãã䜿çšãããŠããããããåç
§ããŠããããŒãžãå®å
šãªãããã³ã« (HTTPS) ã§åä¿¡ãããå Žå</li> +</ul> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Referer: <url> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><url></dt> + <dd>çŸåšãªã¯ãšã¹ãäžã®ããŒãžã«ã€ãªãããªã³ã¯ãããçŽåã®ããŒãžã®ã絶察ãŸãã¯çžå¯Ÿã¢ãã¬ã¹ã§ãã URL ãã©ã°ã¡ã³ã (ã€ãŸã "#section") ããã³ãŠãŒã¶ãŒæ
å ± ("https://username:password@example.com/foo/bar/" ã® "username:password" ã®éšå) ã¯å«ãŸããŸããã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Referer: https://developer.mozilla.org/en-US/docs/Web/JavaScript</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Referer", "5.5.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Referer")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{interwiki("wikipedia", "HTTP_referer", "HTTP referer on Wikipedia")}}</li> + <li>{{HTTPHeader("Referrer-Policy")}}</li> +</ul> diff --git a/files/ja/web/http/headers/referrer-policy/index.html b/files/ja/web/http/headers/referrer-policy/index.html new file mode 100644 index 0000000000..afd6c76932 --- /dev/null +++ b/files/ja/web/http/headers/referrer-policy/index.html @@ -0,0 +1,258 @@ +--- +title: Referrer-Policy +slug: Web/HTTP/Headers/Referrer-Policy +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - Referrer-Policy + - Response + - referrer + - ãã©ã€ãã·ãŒ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Referrer-Policy +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary">HTTP ã® <strong><code>Referrer-Policy</code></strong> {{glossary("HTTP header", "ããããŒ")}}ã¯ã ({{HTTPHeader("Referer")}} ããããŒã«ãã£ãŠéããã) <a href="/ja/docs/Web/Security/Referer_header:_privacy_and_security_concerns">ãªãã¡ã©ãŒæ
å ±</a>ããªã¯ãšã¹ãã«ã©ãã ãå«ããããå¶åŸ¡ããŸãã</span></p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<div class="blockIndicator note"> +<p>å
ã®ããããŒåã§ãã {{HTTPHeader("Referer")}} 㯠"referrer" ãšããèªã®ã¹ãã«ãã¹ã§ãã <code>Referrer-Policy</code> ããããŒã¯ãã®ã¹ãã«ãã¹ãããŠããŸããã</p> +</div> + +<pre class="syntaxbox notranslate">Referrer-Policy: no-referrer +Referrer-Policy: no-referrer-when-downgrade +Referrer-Policy: origin +Referrer-Policy: origin-when-cross-origin +Referrer-Policy: same-origin +Referrer-Policy: strict-origin +Referrer-Policy: strict-origin-when-cross-origin +Referrer-Policy: unsafe-url +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>no-referrer</code></dt> + <dd>{{HTTPHeader("Referer")}} ããããŒå
šäœãçç¥ãããŸãããªã¯ãšã¹ããšãšãã«ãªãã¡ã©ãŒæ
å ±ãéãããããšã¯ãããŸããã</dd> + <dt><code>no-referrer-when-downgrade</code> (æ¢å®å€)</dt> + <dd>ããã¯ããªã·ãŒãæå®ãããŠããªãå Žåããäžããããå€ãç¡å¹ã§ãã£ãå Žåã®æ¢å®ã®åäœã§ãããããã³ã«ã®ã»ãã¥ãªãã£æ°Žæºãåäžã§ããå Žå (HTTPâHTTP, HTTPSâHTTPS) ãŸãã¯æ¹åãããå Žå (HTTPâHTTPS) ã¯ã URL ã®{{glossary("origin", "ãªãªãžã³")}}ã{{glossary("path", "ãã¹")}}ã{{glossary("querystring", "ã¯ãšãªæåå")}}ããªãã¡ã©ãŒãšããŠéä¿¡ãããŸãããäœäžããå Žå (HTTPSâHTTP) ã¯ããªãã¡ã©ãŒã¯éä¿¡ãããŸããã + <div class="note">ãã©ãŠã¶ãŒã¯ããå³æ Œãªæ¢å®å€ãããªãã¡ <code>strict-origin-when-cross-origin</code> (<a href="https://github.com/whatwg/fetch/pull/952">https://github.com/whatwg/fetch/pull/952</a> ãåç
§) ã«ç§»è¡ããããåãçµãã§ããŸããã Referrerer-Policy ãå€æŽããéã«ã¯ãå¯èœã§ããã°ãã®å€ (ãŸãã¯ããå³æ Œãªå€) ã䜿çšããããšãæ€èšããŠãã ããã</div> + </dd> + <dt><code>origin</code></dt> + <dd>ææžã®{{glossary("origin", "ãªãªãžã³")}}ã®ã¿ããªãã¡ã©ãŒãšããŠéä¿¡ãããŸãã<br> + ããšãã°ã <code>https://example.com/page.html</code> ã«ããææžããã¯ã <code>https://example.com/</code> ãšãããªãã¡ã©ãŒãéä¿¡ãããŸãã</dd> + <dt><code>origin-when-cross-origin</code></dt> + <dd>{{glossary("Same-origin_policy", "åäžãªãªãžã³")}}éã§ãªã¯ãšã¹ããè¡ãå Žåã¯ãªãªãžã³ããã¹ãã¯ãšãªæååãéä¿¡ããŸããããã®ä»ã®å Žåã¯ææžã®ãªãªãžã³ã®ã¿ãéä¿¡ããŸãã</dd> + <dt><code>same-origin</code></dt> + <dd><a href="/ja/docs/Web/Security/Same-origin_policy">åããªãªãžã³</a>ã«ã¯ãªãã¡ã©ãŒãéä¿¡ãããŸããããªãªãžã³éãªã¯ãšã¹ãã§ã¯ãªãã¡ã©ãŒæ
å ±ãéä¿¡ãããŸããã</dd> + <dt><code>strict-origin</code></dt> + <dd>ãããã³ã«ã®ã»ãã¥ãªãã£æ°Žæºãåãã§ããå Žå (HTTPSâHTTPS) ã«ã®ã¿ãææžã®ãªãªãžã³ããªãã¡ã©ãŒãšããŠéä¿¡ããŸãããå®å
šæ§ã®å£ã移åå
(HTTPSâHTTP) ã«ã¯éä¿¡ããŸããã</dd> + <dt><code>strict-origin-when-cross-origin</code></dt> + <dd>åããªãªãžã³éã§ãªã¯ãšã¹ããè¡ãéã¯ãªãªãžã³ããã¹ãã¯ãšãªæååãéä¿¡ãããªãªãžã³éãªã¯ãšã¹ããè¡ãéã«ãããã³ã«ã®ã»ãã¥ãªãã£ã¬ãã«ãåãå Žå (HTTPSâHTTPS) ã¯ãªãªãžã³ãéä¿¡ããå®å
šæ§ã®å£ãéä¿¡å
(HTTPSâHTTP) ã«ã¯ããããŒãéä¿¡ããŸããã</dd> + <dt>unsafe-url</dt> + <dd>ã»ãã¥ãªãã£ã«é¢ä¿ãªããã©ã®ãªã¯ãšã¹ããè¡ã£ãå Žåã§ãããªãªãžã³ããã¹ãã¯ãšãªæååãéä¿¡ããŸãã + <div class="blockIndicator warning"> + <p>ãã®ããªã·ãŒã¯ã HTTPS ãªãœãŒã¹ã® URL ããå®å
šã§ã¯ãªããªãªãžã³ãžãã©ã€ããŒãã§ããå¯èœæ§ãããæ
å ±ãæŒæŽ©ããŸããèšå®ããå Žåã¯åœ±é¿ãããæ€èšããŠãã ããã</p> + </div> + </dd> +</dl> + +<h2 id="Integration_with_HTML" name="Integration_with_HTML">HTML ãšã®çµ±å</h2> + +<p>HTML å
ã§ãªãã¡ã©ãŒããªã·ãŒãèšå®ããããšãã§ããŸããäŸãã°ã {{HTMLElement("meta")}} èŠçŽ 㧠<a href="/ja/docs/Web/HTML/Element/meta#attr-name">name</a> ã« <code>referrer</code> ãèšå®ããããšã§ãææžå
šäœã®ãªãã¡ã©ãŒããªã·ãŒãèšå®ããããšãã§ããŸãã</p> + +<pre class="brush: html notranslate"><meta name="referrer" content="origin"></pre> + +<p>ãŸãã {{HTMLElement("a")}}, {{HTMLElement("area")}}, {{HTMLElement("img")}}, {{HTMLElement("iframe")}}, {{HTMLElement("script")}}, {{HTMLElement("link")}} ã®åèŠçŽ ã® <code>referrerpolicy</code> å±æ§ã«ãã£ãŠãåå¥ã®ãªã¯ãšã¹ãã«èšå®ããããšãã§ããŸãã</p> + +<pre class="brush: html notranslate"><a href="http://example.com" referrerpolicy="origin"></pre> + +<p>ä»ã«ã <code>noreferrer</code> <a href="/ja/docs/Web/HTML/Link_types">link é¢ä¿</a>ã <code>a</code>, <code>area</code>, <code>link</code> ã®åèŠçŽ ã«èšå®ããããšãã§ããŸãã</p> + +<pre class="brush: html notranslate"><a href="http://example.com" rel="noreferrer"></pre> + +<h2 id="Integration_with_CSS" name="Integration_with_CSS">CSS ãšã®çµ±å</h2> + +<p>CSS ã¯ã¹ã¿ã€ã«ã·ãŒãããåç
§ããããªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããšããããŸãããããã®ãªãœãŒã¹ã¯åæ§ã«ãªãã¡ã©ãŒããªã·ãŒã«åŸããŸãã</p> + +<ul> + <li>å€éš CSS ã¹ã¿ã€ã«ã·ãŒãã¯ã CSS ã¹ã¿ã€ã«ã·ãŒãã«æå®ãã HTTP ããããŒãéããŠäžæžããããªãéããæ¢å®ã®ããªã·ãŒ (<code>no-referrer-when-downgrade</code>) ã䜿çšããŸãã</li> + <li>{{HTMLElement("style")}} èŠçŽ ãŸã㯠<a href="/ja/docs/Web/API/HTMLElement/style"><code>style</code> å±æ§</a>ã«ã€ããŠã¯ãææè
ã®ææžã®ãªãã¡ã©ãŒããªã·ãŒã䜿çšãããŸãã</li> +</ul> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ããªã·ãŒ</th> + <th scope="col">ææž</th> + <th scope="col">移åå
</th> + <th scope="col">ãªãã¡ã©ãŒ</th> + </tr> + </thead> + <tbody> + <tr> + <th><code>no-referrer</code></th> + <td>https://example.com/page</td> + <td><em>ã©ããžã§ã</em></td> + <td><em>(ãªãã¡ã©ãŒãªã)</em></td> + </tr> + <tr> + <th rowspan="3"><code>no-referrer-when-downgrade</code></th> + <td rowspan="3">https://example.com/page</td> + <td>https://example.com/otherpage</td> + <td>https://example.com/page</td> + </tr> + <tr> + <td>https://mozilla.org</td> + <td>https://example.com/page</td> + </tr> + <tr> + <td><strong>http</strong>://example.org</td> + <td><em>(ãªãã¡ã©ãŒãªã)</em></td> + </tr> + <tr> + <th><code>origin</code></th> + <td>https://example.com/page</td> + <td><em>ã©ããžã§ã</em></td> + <td>https://example.com/</td> + </tr> + <tr> + <th rowspan="3"><code>origin-when-cross-origin</code></th> + <td rowspan="3">https://example.com/page</td> + <td>https://example.com/otherpage</td> + <td>https://example.com/page</td> + </tr> + <tr> + <td>https://mozilla.org</td> + <td>https://example.com/</td> + </tr> + <tr> + <td><strong>http</strong>://example.com/page</td> + <td>https://example.com/</td> + </tr> + <tr> + <th rowspan="2"><code>same-origin</code></th> + <td rowspan="2">https://example.com/page</td> + <td>https://example.com/otherpage</td> + <td>https://example.com/page</td> + </tr> + <tr> + <td>https://mozilla.org</td> + <td><em>(ãªãã¡ã©ãŒãªã)</em></td> + </tr> + <tr> + <th rowspan="3"><code>strict-origin</code></th> + <td rowspan="2">https://example.com/page</td> + <td>https://mozilla.org</td> + <td>https://example.com/</td> + </tr> + <tr> + <td><strong>http</strong>://example.org</td> + <td><em>(ãªãã¡ã©ãŒãªã)</em></td> + </tr> + <tr> + <td><strong>http</strong>://example.com/page</td> + <td><em>ã©ããžã§ã</em></td> + <td>http://example.com/</td> + </tr> + <tr> + <th rowspan="3"><code>strict-origin-when-cross-origin</code></th> + <td rowspan="3">https://example.com/page</td> + <td>https://example.com/otherpage</td> + <td>https://example.com/page</td> + </tr> + <tr> + <td>https://mozilla.org</td> + <td>https://example.com/</td> + </tr> + <tr> + <td><strong>http</strong>://example.org</td> + <td><em>(ãªãã¡ã©ãŒãªã)</em></td> + </tr> + <tr> + <th><code>unsafe-url</code></th> + <td>https://example.com/page?q=123</td> + <td><em>ã©ããžã§ã</em></td> + <td>https://example.com/page?q=123</td> + </tr> + </tbody> +</table> + +<h3 id="Specifying_a_fallback_policy" name="Specifying_a_fallback_policy">代æ¿ããªã·ãŒã®æå®</h3> + +<p>å¿
èŠãªããªã·ãŒã®ãã©ãŠã¶ãŒã®å¯Ÿå¿ç¶æ³ãååã§ã¯ãªãã代æ¿ããªã·ãŒãèšå®ãããå Žåã¯ãã«ã³ãåºåãã®ãªã¹ãã䜿çšããå¿
èŠãªããªã·ãŒãæåŸã«æå®ããŠãã ããã</p> + +<pre class="notranslate">Referrer-Policy: no-referrer, strict-origin-when-cross-origin</pre> + +<p>äžèšã®ã·ããªãªã§ã¯ã <code>no-referrer</code> ã¯ãã©ãŠã¶ãŒã <code>strict-origin-when-cross-origin</code> ã«å¯Ÿå¿ããŠããªãå Žåã®ã¿äœ¿çšãããŸãã</p> + +<p class="note">è€æ°ã®å€ãèšå®ããæ¹æ³ã¯ã HTTP ã® <code>Referrer-Policy</code> ããããŒã®ã¿ã察å¿ããŠããã <code>referrerpolicy</code> å±æ§ã§ã¯å¯Ÿå¿ããŠããŸããã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + </tr> + </thead> + <tbody> + <tr> + <td><a href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header">Referrer Policy </a></td> + <td>ç·šéè
èçš¿</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Referrer-Policy")}}</p> + +<div class="note"> +<ul> + <li>ããŒãžã§ã³ 53 以éã§ã¯ã Gecko 㯠<code>about:config</code> ã®äžã§ãŠãŒã¶ãŒã <code>Referrer-Policy</code> ã®æ¢å®å€ãèšå®ã§ããèšå®é
ç® (<span class="quote"> <code>network.http.referer.userControlPolicy</code>) ããããŸãã</span></li> + <li>ããŒãžã§ã³ 59 以éã§ã¯ (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=587523">#587523</a> ãåç
§)ããã㯠<code>network.http.referer.defaultPolicy</code> ããã³ <code>network.http.referer.defaultPolicy.pbmode</code> ã§çœ®ãæããããŸããã</li> +</ul> + +<p>æå®å¯èœãªå€ã¯ä»¥äžã®éãã§ãã</p> + +<ul> + <li>0 â <code>no-referrer</code></li> + <li>1 â <code>same-origin</code></li> + <li>2 â <code>strict-origin-when-cross-origin</code></li> + <li>3 â <code>no-referrer-when-downgrade</code> (æ¢å®å€)</li> +</ul> +</div> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{interwiki("wikipedia", "HTTPãªãã¡ã©", "Wikipedia ã® HTTP ãªãã¡ã©")}}</li> + <li><a href="/ja/docs/Web/API/Fetch_API">Fetch</a> ã®äœ¿çšæ: {{domxref("Request.referrerPolicy")}}</li> + <li>å»æ¢ããã <span style="white-space: nowrap;">{{HTTPHeader("Content-Security-Policy")}}</span> {{HTTPHeader("Content-Security-Policy/referrer", "referrer")}} {{Obsolete_Inline}} ãã£ã¬ã¯ãã£ã</li> + <li><a href="/ja/docs/Web/Security/Same-origin_policy">åäžãªãªãžã³ããªã·ãŒ</a></li> + <li> + <p><a href="https://blog.mozilla.org/security/2015/01/21/meta-referrer/">Tighter Control Over Your Referrers â Mozilla Security Blog</a></p> + </li> +</ul> diff --git a/files/ja/web/http/headers/retry-after/index.html b/files/ja/web/http/headers/retry-after/index.html new file mode 100644 index 0000000000..7639272034 --- /dev/null +++ b/files/ja/web/http/headers/retry-after/index.html @@ -0,0 +1,87 @@ +--- +title: Retry-After +slug: Web/HTTP/Headers/Retry-After +tags: + - HTTP + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã¹ãã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Retry-After +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>Retry-After</code></strong> ã¬ã¹ãã³ã¹ HTTP ããããŒã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ãããã©ããŒã¢ãããªã¯ãšã¹ããè¡ãåã«ã©ããããåŸ
ã€ã¹ããã瀺ããŸãããã®ããããŒã䜿çšãããäž»ãªã±ãŒã¹ã¯3ã€ãããŸãã</p> + +<ul> + <li>{{HTTPStatus(503)}} (Service Unavailable) ã¬ã¹ãã³ã¹ã§éä¿¡ãããå Žåãããã¯ãµãŒãã¹ãå©çšã§ããªããšäºæ³ãããæéã瀺ããŸãã</li> + <li>{{HTTPStatus(429)}} (Too Many Requests) ã¬ã¹ãã³ã¹ãšãšãã«éä¿¡ãããå Žåãããã¯æ°ãããªã¯ãšã¹ããè¡ããŸã§ã©ããããåŸ
ã€ãã瀺ããŸãã</li> + <li>{{HTTPStatus(301)}} (Moved Permanently) ã®ãããªãªãã€ã¬ã¯ãã¬ã¹ãã³ã¹ãšãšãã«éä¿¡ãããå Žåããªãã€ã¬ã¯ãããããªã¯ãšã¹ããçºè¡ããåã«ãŠãŒã¶ãšãŒãžã§ã³ããåŸ
æ©ããããã«èŠæ±ãããæå°æéã瀺ããŸãã</li> +</ul> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒã¿ã€ã</th> + <td>{{Glossary("Response header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="æ§æ">æ§æ</h2> + +<pre class="syntaxbox">Retry-After: <http-date> +Retry-After: <delay-seconds> +</pre> + +<h2 id="ãã£ã¬ã¯ãã£ã">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><http-date></dt> + <dd>åè©Šè¡ããæ¥ä»ãHTTP ã®æ¥ä»åœ¢åŒã®è©³çŽ°ã«ã€ããŠã¯ {{HTTPHeader("Date")}} ããããŒãåç
§ããŠãã ããã</dd> + <dt><delay-seconds></dt> + <dd>ã¬ã¹ãã³ã¹ãåä¿¡ããŠããé
延ããç§æ°ã瀺ãè² ã§ãªã10é²æ°ã®æŽæ°ã</dd> +</dl> + +<h2 id="äŸ">äŸ</h2> + +<h3 id="ã¹ã±ãžã¥ãŒã«ãããããŠã³ã¿ã€ã ã®åŠç">ã¹ã±ãžã¥ãŒã«ãããããŠã³ã¿ã€ã ã®åŠç</h3> + +<p>ã¯ã©ã€ã¢ã³ããšãµãŒããŒã®äž¡æ¹ã§ <code>Retry-After</code> ããããŒããµããŒããããŠããã®ã¯ãäŸç¶ãšããŠççŸããŠããŸãããã ããGooglebot ã®ãããªäžéšã®ã¯ããŒã©ãšã¹ãã€ããŒã¯ <code>Retry-After</code> ããããŒãå°éããŸãã{{HTTPStatus(503)}} (Service Unavailable) ã¬ã¹ãã³ã¹ãšå
±ã«éä¿¡ãããšäŸ¿å©ã§ããããã«ãããããŠã³ã¿ã€ã ãçµäºãããšãã«æ€çŽ¢ãšã³ãžã³ããµã€ãã®ã€ã³ããã¯ã¹ãäœæãç¶ããããã«ãªããŸãã</p> + +<pre>Retry-After: Wed, 21 Oct 2015 07:28:00 GMT +Retry-After: 120 +</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "Retry-After", "7.1.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºææ§">ãã©ãŠã¶ã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Retry-After")}}</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li><a href="https://webmasters.googleblog.com/2011/01/how-to-deal-with-planned-site-downtime.html">Google Webmaster blog: How to deal with planned site downtime</a></li> + <li>{{HTTPStatus(503)}} (Service Unavailable)</li> + <li>{{HTTPStatus(301)}} (Moved Permanently)</li> +</ul> diff --git a/files/ja/web/http/headers/server-timing/index.html b/files/ja/web/http/headers/server-timing/index.html new file mode 100644 index 0000000000..eb66d99e3e --- /dev/null +++ b/files/ja/web/http/headers/server-timing/index.html @@ -0,0 +1,89 @@ +--- +title: Server-Timing +slug: Web/HTTP/Headers/Server-Timing +tags: + - HTTP + - Reference + - ããã©ãŒãã³ã¹ + - ããã㌠+translation_of: Web/HTTP/Headers/Server-Timing +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>Server-Timing</code></strong> ããããŒã¯ãæå®ããããªã¯ãšã¹ãïŒã¬ã¹ãã³ã¹ã®ãµã€ã¯ã«ã«ã€ããŠã®1ã€ä»¥äžã®ã¡ããªãã¯ãšèª¬æãéä¿¡ããŸãããŠãŒã¶ãŒã®ãã©ãŠã¶ãŒã®éçºããŒã«å
ãã {{domxref("PerformanceServerTiming")}} ã€ã³ã¿ãŒãã§ã€ã¹å
ã§ãä»»æã®ããã¯ãšã³ããµãŒããŒã®ã¿ã€ãã³ã°ã¡ããªã㯠(ããŒã¿ããŒã¹ã®èªã¿æžãã CPU æéããã¡ã€ã«ã·ã¹ãã ã¢ã¯ã»ã¹ããªã©) ãè¡šé¢åãããããã«äœ¿çšããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>Server-Timing</code> ããããŒã®æ§æã§ã¯ãããŸããŸãªæ¹æ³ã§ã¡ããªãã¯ãéä¿¡ããããšãã§ããŸãããµãŒããŒã¡ããªãã¯åã®ã¿ãã¡ããªãã¯ãšå€ãã¡ããªãã¯ãšå€ãšèª¬æãã¡ããªãã¯ãšèª¬æãªã©ã§ãã</p> + +<p>ä»æ§æžã§ã¯ã HTTP ã®ãªãŒããŒããããæå°åããããã«ãååãšèª¬æã (ç¥èªã䜿çšãããå¯èœãªéãå€ãçç¥ãããããŠ) ã§ããã ãçãããããšãæšå¥šããŠããŸãã</p> + +<pre>// åäžã®å€ã®ãªãã¡ããªã㯠+Server-Timing: missedCache + +// åäžã®ã¡ããªãã¯ãšå€ +Server-Timing: cpu;dur=2.4 + +// åäžã®ã¡ããªãã¯ãšèª¬æãšå€ +Server-Timing: cache;desc="Cache Read";dur=23.2 + +// äºã€ã®ã¡ããªãã¯ãšå€ +Server-Timing: db;dur=53, app;dur=47.2 + +// Server-Timing as trailer +Trailer: Server-Timing +--- response body --- +Server-Timing: total;dur=123.4 +</pre> + +<h2 id="Privacy_and_security" name="Privacy_and_security">ãã©ã€ãã·ãŒãšã»ãã¥ãªãã£</h2> + +<p><code>Server-Timing</code> ããããŒã¯åŸ®åŠãªã¢ããªã±ãŒã·ã§ã³ãã€ã³ãã©ã®æ
å ±ãå
¬éããå¯èœæ§ããããŸããã©ã®ã¡ããªãã¯ãããã€ããµãŒããŒåŽã®èª°ã«è¿ãããããå¶åŸ¡ããããšãæ€èšããŠãã ãããäŸãã°ãã¡ããªãã¯ãèªèšŒããããŠãŒã¶ãŒã®ã¿ã«èŠããäžè¬ã«ã¯èŠããªãããã«ããããšãã§ããŸãã</p> + +<h2 id="PerformanceServerTiming_interface" name="PerformanceServerTiming_interface">PerformanceServerTiming ã€ã³ã¿ãŒãã§ã€ã¹</h2> + +<p><code>Server-Timing</code> ããããŒã®ã¡ããªãã¯ããã©ãŠã¶ãŒã®éçºè
ããŒã«ã«çŸããã®ã«å ããŠã {{domxref("PerformanceServerTiming")}} ã€ã³ã¿ãŒãã§ã€ã¹ã§ããŒã«ã JavaScript ããèªåçã«ã¡ããªãã¯ãåéãåŠçããããšãã§ããŸãããã®ã€ã³ã¿ãŒãã§ã€ã¹ã¯åããªãªãžã³ã«å¶çŽãããŠããŸããã {{HTTPHeader("Timing-Allow-Origin")}} ããããŒã䜿çšããããšã§ããµãŒããŒã¡ããªãã¯ã«ã¢ã¯ã»ã¹ããããšãã§ãããã¡ã€ã³ãæå®ããããšãã§ããŸãããã®ã€ã³ã¿ãŒãã§ã€ã¹ã¯ãã©ãŠã¶ãŒã«ãã£ãŠã¯ãå®å
šãªã³ã³ããã¹ã (HTTPS) ã®ã¿ã§ããå©çšã§ããŸããã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Server Timing','#the-server-timing-header-field', 'Server-Timing Header Field')}}</td> + <td>{{Spec2("Server Timing")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Server-Timing")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{domxref("PerformanceServerTiming")}}</li> +</ul> diff --git a/files/ja/web/http/headers/server/index.html b/files/ja/web/http/headers/server/index.html new file mode 100644 index 0000000000..92a7b3dcfd --- /dev/null +++ b/files/ja/web/http/headers/server/index.html @@ -0,0 +1,78 @@ +--- +title: Server +slug: Web/HTTP/Headers/Server +tags: + - HTTP + - Reference + - header +translation_of: Web/HTTP/Headers/Server +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><code><strong>Server</strong></code> ããããŒã¯ããªã¯ãšã¹ããåŠçãããªãªãžã³ãµãŒããŒãããªãã¡ãã¬ã¹ãã³ã¹ãçæãããµãŒããŒã§äœ¿çšããããœãããŠã§ã¢ã説æããŸãã</span></p> + +<div class="blockIndicator warning"> +<p><code>Server</code> ã®å€ã¯ãæ»æè
ãæ¢ç¥ã®ã»ãã¥ãªãã£ããŒã«ãæªçšããã®ã (å°ã) 容æã«ããæ
å ±ãæŽé²ããå¯èœæ§ãããã®ã§ãé床ã«è©³çŽ°ã«ããããšã¯é¿ããŠãã ããã</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Server: <product> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code><product></code></dt> + <dd> + <p>ãªã¯ãšã¹ããåŠçãããœãããŠã§ã¢ãŸãã¯è£œåã®ååã§ããé垞㯠{{HTTPHeader('User-Agent')}}} ãšäŒŒã圢åŒã§ãã</p> + </dd> +</dl> + +<p>ã©ã®ãããã®è©³çŽ°ãå«ãããã®ãã©ã³ã¹ãåãã®ã¯èå³æ·±ãããšã§ãã OS ã®ããŒãžã§ã³ãå
¬éããããšã¯ãå
ã»ã©ã®é床ã«è©³çŽ°ãªå€ã«ã€ããŠã®èŠåã§è¿°ã¹ãããã«ãããããæªãèãã§ãããããã Apache ã®ããŒãžã§ã³ãå
¬éãããšãããããŒãžã§ã³ãæ〠{{HTTPHeader('Content-Encoding')}} ãš {{HTTPHeader('Range')}} ãçµã¿åããããã°ããã©ãŠã¶ãŒãåé¿ããã®ã«åœ¹ç«ã¡ãŸãã</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Server: Apache/2.4.1 (Unix)</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Server", "7.4.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Server")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Allow")}}</li> +</ul> diff --git a/files/ja/web/http/headers/set-cookie/index.html b/files/ja/web/http/headers/set-cookie/index.html new file mode 100644 index 0000000000..e15c438304 --- /dev/null +++ b/files/ja/web/http/headers/set-cookie/index.html @@ -0,0 +1,201 @@ +--- +title: Set-Cookie +slug: Web/HTTP/Headers/Set-Cookie +tags: + - Cookies + - HTTP + - Reference + - ããã㌠+ - ã¬ã¹ãã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Set-Cookie +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><strong><code>Set-Cookie</code></strong> 㯠HTTP ã®ã¬ã¹ãã³ã¹ããããŒã§ããµãŒããŒãããŠãŒã¶ãŒãšãŒãžã§ã³ããžã¯ãããŒãéä¿¡ããããã«äœ¿çšããããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãããåŸã§ãµãŒããŒã«éãè¿ãããšãã§ããŸãã</span></p> + +<p>詳现ã«ã€ããŠã¯ã<a href="/ja/docs/Web/HTTP/Cookies">HTTP ã¯ãããŒã®ã¬ã€ã</a>ãåç
§ããŠãã ããã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Set-Cookie: <cookie-name>=<cookie-value> +Set-Cookie: <cookie-name>=<cookie-value>; Expires=<date> +Set-Cookie: <cookie-name>=<cookie-value>; Max-Age=<non-zero-digit> +Set-Cookie: <cookie-name>=<cookie-value>; Domain=<domain-value> +Set-Cookie: <cookie-name>=<cookie-value>; Path=<path-value> +Set-Cookie: <cookie-name>=<cookie-value>; Secure +Set-Cookie: <cookie-name>=<cookie-value>; HttpOnly + +Set-Cookie: <cookie-name>=<cookie-value>; SameSite=Strict +Set-Cookie: <cookie-name>=<cookie-value>; SameSite=Lax +Set-Cookie: <cookie-name>=<cookie-value>; SameSite=None + +// 以äžã®äŸã®ããã«ãè€æ°ã®ãã£ã¬ã¯ãã£ããå©çšããããšãã§ããŸãã +Set-Cookie: <cookie-name>=<cookie-value>; Domain=<domain-value>; Secure; HttpOnly +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code><cookie-name>=<cookie-value></code></dt> + <dd>ã¯ãããŒã¯ååãšå€ã®çµã§å§ãŸããŸãã + <ul> + <li><code><cookie-name></code> ã¯ä»»æã® US-ASCII æåã®éåã§ãå¶åŸ¡æåã空çœãã¿ããé€ãããã®ã§ãã <code>( ) < > @ , ; : \ " / [ ] ? = { }</code> ã®ãããªåºåãæåãå«ããããšãã§ããŸããã</li> + <li><code><cookie-value></code> ã¯ä»»æã§äºéåŒçšç¬Šã§å²ãããšãã§ããå¶åŸ¡æåã{{glossary("Whitespace", "ãã¯ã€ãã¹ããŒã¹")}}ãäºéåŒçšç¬Šãã«ã³ããã»ãã³ãã³ãããã¯ã¹ã©ãã·ã¥ãé€ããã¹ãŠã® US-ASCII æåãå©çšã§ããŸãã <strong>ãšã³ã³ãŒãã£ã³ã°</strong>: å€ãã®å®è£
ã§ã¯ã¯ãããŒã®å€ã« URL ãšã³ã³ãŒãã£ã³ã°ãæœããŸããã RFC ã®ä»æ§æžã§ã¯èŠæ±ãããŠããŸããããã㯠<cookie-value> ã«èš±å¯ãããæåã«ã€ããŠã®èŠä»¶ãæºè¶³ãããã®ã«åœ¹ç«ã¡ãŸãã</li> + <li><strong><code>__Secure-</code> ã®æ¥é èŸ</strong>{{non-standard_inline}}: <code>__Secure-</code> (æ¥é èŸã«ããã·ã¥ãå«ã) ã§å§ãŸãã¯ãããŒåã¯ã <code>secure</code> ãã©ã°ãèšå®ããããšãå¿
èŠã§ãå®å
šãªããŒãž (HTTPS) ã§ãªããã°ãªããŸããã</li> + <li><strong><code>__Host-</code> ã®æ¥é èŸ</strong>{{non-standard_inline}}: <code>__Host-</code> ã§å§ãŸãã¯ãããŒåã¯ã <code>secure</code> ãã©ã°ãèšå®ããå®å
šãªããŒãž (HTTPS) ããèªã¿èŸŒãå¿
èŠãããããã¡ã€ã³ãæå®ããããšãã§ãã (åŸã£ãŠãµããã¡ã€ã³ã«ãéãããŸãã)ããã¹ã <code>/</code> ã§çµããå¿
èŠããããŸãã</li> + </ul> + </dd> + <dt><code>Expires=<date></code> {{optional_inline}}</dt> + <dd> + <p>ã¯ãããŒã®æå¹æéã§ã HTTP ã®æ¥æã¿ã€ã ã¹ã¿ã³ãã§ãã詳现ãªæžåŒã¯ {{HTTPHeader("Date")}} ãåç
§ããŠãã ããã</p> + + <p>æå®ãããªãã£ãå Žåã¯ãã¯ãããŒã¯<strong>ã»ãã·ã§ã³ã¯ãããŒ</strong>ã®å¯¿åœã«ãªããŸããã»ãã·ã§ã³ã¯ã¯ã©ã€ã¢ã³ããçµäºãããšãã«çµäºããã®ã§ãã»ãã·ã§ã³ã¯ãããŒã¯ãã®æç¹ã§åé€ãããŸãã</p> + + <div class="blockIndicator warning"> + <p><strong>èŠå:</strong> å€ãã®ãŠã§ããã©ãŠã¶ãŒã¯ã»ãã·ã§ã³åŸ©å
ãšåŒã°ããæ©èœãæã£ãŠãããããã«ãã£ãŠãã¹ãŠã®ã¿ããä¿åãã次åãã©ãŠã¶ãŒãèµ·åãããšãã«åŸ©å
ããããšãã§ããŸãããã©ãŠã¶ãŒãå®éã«ã¯éããŠããªããã®ããã«ãã»ãã·ã§ã³ã¯ãããŒã埩å
ãããŸãã</p> + </div> + + <p>æå¹æéãèšå®ãããŠããå Žåãæéã¯ãµãŒããŒã§ã¯ãªããã¯ãããŒãèšå®ãããŠããã¯ã©ã€ã¢ã³ãããã®çžå¯Ÿæå»ã§èšå®ãããŸãã</p> + </dd> + <dt><code>Max-Age=<number> </code>{{optional_inline}}</dt> + <dd>ã¯ãããŒã®æéãŸã§ã®ç§æ°ã§ãããŒããŸãã¯è² ã®æ°å€ã®å Žåã¯ãã¯ãããŒã¯çŽã¡ã«æéåãã«ãªããŸãã <code>Expires</code> ããã³ <code>Max-Age</code> ã®äž¡æ¹ãèšå®ãããŠãããã <code>Max-Age</code> ãåªå
ãããŸãã</dd> + <dt><code>Domain=<domain-value></code> {{optional_inline}}</dt> + <dd>ã¯ãããŒãéä¿¡ããå
ã®ãã¹ãã§ãã + <ul> + <li>æå®ãããªãã£ãå Žåã¯ãæ¢å®ã§çŸåšã®ææžã® URL ã«ããããã¹ãåã®éšåã«ãªãããµããã¡ã€ã³ãå«ã¿ãŸããã</li> + <li>åæã®ä»æ§æžãšã¯éã«ããã¡ã€ã³åã®åã®ããã (<code>.example.com</code>) ã¯ç¡èŠãããŸãã</li> + <li>è€æ°ã®ãã¹ãããã¡ã€ã³ã®å€ãæå®ããããšã¯<em>ã§ããŸãã</em>ãããã¡ã€ã³<em>ã</em>æå®ãããå Žåããã¹ãŠã®ãµããã¡ã€ã³ãåžžã«å«ãŸããŸãã</li> + </ul> + </dd> + <dt><code>Path=<path-value></code> {{optional_inline}}</dt> + <dd>ãªã¯ãšã¹ãã® URL ã«å«ãŸããã¹ããã¹ã§ããå«ãŸããŠããªããšããã©ãŠã¶ãŒã¯ <code>Cookie</code> ããããŒãéä¿¡ããŸããã</dd> + <dd>ã¹ã©ãã·ã¥ ("/") ã®æåã¯ãã£ã¬ã¯ããªåºåããšããŠè§£éããããµããã£ã¬ã¯ããªãåæ§ã«äžèŽããŸã (äŸãã° <code>Path=/docs</code> ã§ããã°ã <code>/docs</code>, <code>/docs/Web/</code>, <code>/docs/Web/HTTP</code> ã¯ãã¹ãŠäžèŽããŸã)ã</dd> + <dt id="Secure"><code>Secure</code> {{optional_inline}}</dt> + <dd>ã»ãã¥ã¢ã¯ãããŒã¯ããªã¯ãšã¹ãã SSL ãš HTTPS ãããã³ã«ã䜿çšããŠè¡ãããå Žåã«ã®ã¿ãµãŒããŒã«éä¿¡ãããŸãããã ã HTTP ã¯ãããŒã¯ãäŸãã°æ
å ±ãæå·åãããªããªã©ãå®å
šã§ã¯ãªãä»çµã¿ãç¶æ¿ããŠããã®ã§ãæ©å¯ãªæ
å ±ãææãªæ
å ±ã転éãããæ ŒçŽãããããªãããã«ããŠãã ããã + <p class="note"><strong>ã¡ã¢:</strong> å®å
šã§ã¯ãªããµã€ã (<code>http:</code>) ã¯Â <code>Secure</code> ãã£ã¬ã¯ãã£ããä»ããŠã¯ãããŒãèšå®ããããšãã§ããªããªããŸãã (Chrome 52 以éããã³ Firefox 52 以éã®æ°æ©èœ).</p> + </dd> + <dt id="HttpOnly"><code>HttpOnly</code> {{optional_inline}}</dt> + <dd>JavaScript ã {{domxref("Document.cookie")}} ããããã£ãªã©ãä»ããŠãã®ã¯ãããŒã«ã¢ã¯ã»ã¹ããããšãçŠæ¢ããŸããHttpOnly ã§äœæãããã¯ãããŒã¯ãJavaScript ã§éå§ããããªã¯ãšã¹ããäŸãã°ã {{domxref("XMLHttpRequest.send()")}} ã {{domxref("fetch()")}} ãšå
±ã«éä¿¡ãããŸããããã«ãããã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã° ({{Glossary("XSS")}}) ã®æ»æã軜æžããŸãã</dd> + <dt><code>SameSite=<samesite-value></code> {{optional_inline}}</dt> + <dd> + <ul> + <li><code>Strict</code>: ãã©ãŠã¶ã¯ same-site ã®ãªã¯ãšã¹ãïŒã€ãŸããã¯ãããŒãèšå®ããã®ãšåããµã€ãããçºä¿¡ããããªã¯ãšã¹ãïŒã«å¯ŸããŠã®ã¿ã¯ãããŒãéä¿¡ããŸãããªã¯ãšã¹ããçŸåšã®URLãšã¯ç°ãªãURLããçºçããå Žåã<code>SameSite=Strict</code> å±æ§ãæã€ã¯ãããŒã¯éä¿¡ãããŸããã</li> + <li><code>Lax</code>: ç»åããã¬ãŒã ãããŒãããããã®åŒã³åºããªã©ã®ã¯ãã¹ãµã€ããµããªã¯ãšã¹ãã§ã¯ã¯ãããŒãææ¢ãããŸããããŠãŒã¶ãŒããªã³ã¯ãã¯ãªãã¯ãããªã©ããŠå€éšãµã€ãããURLã«ç§»åãããšéä¿¡ãããŸãã</li> + <li><code>None</code>: ãã©ãŠã¶ã¯ã¯ãã¹ãµã€ããš same-site ã®äž¡æ¹ã®ãªã¯ãšã¹ãã§ã¯ãããŒãéä¿¡ããŸãã</li> + </ul> + + <p>ã¯ãããŒããªãªãžã³éãªã¯ãšã¹ãã§éä¿¡ãããªãããšã䞻匵ããããšã§ãã¯ãã¹ãµã€ããªã¯ãšã¹ããã©ãŒãžã§ãªæ»æ ({{Glossary("CSRF")}}) ã«å¯ŸããŠããããé²åŸ¡ããããšãã§ããŸãã</p> + + <p class="note">ãã©ãŠã¶ãŒã¯ <a href="https://www.chromestatus.com/feature/5088147346030592">ã¯ãããŒã« <code>SameSite=Lax</code> ã®æ¢å®å€</a>ãæããããã移è¡ãã€ã€ãããŸãããªãªãžã³ããŸããã§ã¯ãããŒãéä¿¡ããå¿
èŠãããå Žåã <code>None</code> ãã£ã¬ã¯ãã£ããçšã㊠SameSite ã®å¶çŽãå€ããŠãã ããã <code>None</code> ãã£ã¬ã¯ãã£ã㯠<a href="#Secure"><code>Secure</code></a> å±æ§ãå¿
èŠãšããŸãã</p> + </dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Session_cookie" name="Session_cookie">ã»ãã·ã§ã³ã¯ãããŒ</h3> + +<p><strong>ã»ãã·ã§ã³ã¯ãããŒ</strong>ã¯ã¯ã©ã€ã¢ã³ããçµäºãããšãã«åé€ãããŸãã <code>Expires</code> ã <code>Max-Age</code> ãã£ã¬ã¯ãã£ããæå®ããªããšã¯ãããŒã¯ã»ãã·ã§ã³ã¯ãããŒã«ãªããŸãã</p> + +<pre class="notranslate">Set-Cookie: sessionId=38afes7a8</pre> + +<h3 id="Permanent_cookie" name="Permanent_cookie">æ°žç¶çã¯ãããŒ</h3> + +<p><strong>æ°žç¶çã¯ãããŒ</strong>ã¯ãã¯ã©ã€ã¢ã³ããçµäºãããšãã«æéåãã«ãªãããç¹å®ã®æé (<code>Expires</code>) ãŸãã¯ç¹å®ã®æéãéããåŸ (<code>Max-Age</code>) ã«æéåãã«ãªããŸãã</p> + +<pre class="notranslate">Set-Cookie: id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT +</pre> + +<pre class="notranslate">Set-Cookie: id=a3fWa; Max-Age=2592000</pre> + +<h3 id="Invalid_domains" name="Invalid_domains">äžæ£ãªãã¡ã€ã³</h3> + +<p>ãªãªãžã³ã®ãµãŒããŒãå«ãŸãªããã¡ã€ã³ã«æå±ããã¯ãããŒã¯ã<a href="https://tools.ietf.org/html/rfc6265#section-4.1.2.3">ãŠãŒã¶ãŒãšãŒãžã§ã³ããæåŠããŸã</a>ã</p> + +<p>次ã®ã¯ãããŒã¯ <code>originalcompany.com</code> ã§ãã¹ãããããµãŒããŒããèšå®ããããšãããšæåŠãããŸãã</p> + +<pre class="notranslate">Set-Cookie: qwerty=219ffwef9w0f; Domain=somecompany.co.uk</pre> + +<p>æäŸãããã¡ã€ã³ã®ãµããã¡ã€ã³ãžã®ã¯ãããŒã¯æåŠãããŸãã</p> + +<p>以äžã®ã¯ãããŒã¯ã <code>example.com</code> ã«ãã¹ãã£ã³ã°ããããµãŒããŒããã»ãããããå Žåã¯æåŠãããŸãã</p> + +<pre class="notranslate">Set-Cookie: sessionId=e8bb43229de9; Domain=foo.example.com</pre> + +<h3 id="Cookie_prefixes" name="Cookie_prefixes">ã¯ãããŒã®æ¥é èŸ</h3> + +<p><code>__Secure-</code> ãŸã㯠<code>__Host-</code> ã®æ¥é èŸãä»ããã¯ãããŒåã¯ãå®å
šãª (HTTPS ã®) ãªãªãžã³ãã <code>secure</code> ãã£ã¬ã¯ãã£ããèšå®ããå Žåã®ã¿äœ¿çšããããšãã§ããŸãã</p> + +<p>å ããŠã <code>__Host-</code> ã®æ¥é èŸãä»ããã¯ãããŒã¯ã <code>/</code> (ãã¹ãã®ä»»æã®ãã¹ãšããæå³) ãæã€å¿
èŠãããã <code>Domain</code> ãã£ã¬ã¯ãã£ããæã€ããšãã§ããŸããã</p> + +<div class="blockIndicator warning"> +<p>ã¯ãããŒã®æ¥é èŸãå®è£
ããŠããªãã¯ã©ã€ã¢ã³ãã§ã¯ããããã®ä¿èšŒãåããããšãã§ãããã¯ãããŒã¯åžžã«åãå
¥ããããŸãã</p> +</div> + +<pre class="notranslate">// ã©ã¡ããå®å
šãª (HTTPS ã®) ãªãªãžã³ããåãå
¥ããããŸã +Set-Cookie: __Secure-ID=123; Secure; Domain=example.com +Set-Cookie: __Host-ID=123; Secure; Path=/ + +// Secure ãã£ã¬ã¯ãã£ããç¡ããããæåŠãããŸã +Set-Cookie: __Secure-id=1 + +// Path=/ ãã£ã¬ã¯ãã£ããç¡ããããæåŠãããŸã +Set-Cookie: __Host-id=1; Secure + +// Domain ãèšå®ãããããæåŠãããŸã +Set-Cookie: __Host-id=1; Secure; Path=/; Domain=example.com +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("6265", "Set-Cookie", "4.1")}}</td> + <td>HTTP State Management Mechanism</td> + </tr> + <tr> + <td><a href="https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02">draft-ietf-httpbis-rfc6265bis-02</a></td> + <td>Cookie Prefixes, Same-Site Cookies, and Strict Secure Cookies</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Set-Cookie")}}</p> + +<h2 id="Compatibility_notes" name="Compatibility_notes">äºææ§ã®ã¡ã¢</h2> + +<ul> + <li>Chrome 52 ããã³ Firefox 52 以éãã»ãã¥ãªãã£ã§ä¿è·ãããŠããªããµã€ã (<code>http:</code>) ã§ã¯ã "secure" ãã£ã¬ã¯ãã£ãä»ãã§ã¯ãããŒãèšå®ããããšã¯ã§ããªããªããŸããã</li> +</ul> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Cookies">HTTP ã¯ãããŒ</a></li> + <li>{{HTTPHeader("Cookie")}}</li> + <li>{{domxref("Document.cookie")}}</li> +</ul> diff --git a/files/ja/web/http/headers/set-cookie/samesite/index.html b/files/ja/web/http/headers/set-cookie/samesite/index.html new file mode 100644 index 0000000000..1a5dcf3310 --- /dev/null +++ b/files/ja/web/http/headers/set-cookie/samesite/index.html @@ -0,0 +1,119 @@ +--- +title: SameSite cookies +slug: Web/HTTP/Headers/Set-Cookie/SameSite +tags: + - Cookies + - HTTP + - Reference + - samesite +translation_of: Web/HTTP/Headers/Set-Cookie/SameSite +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary">{{HTTPHeader("Set-Cookie")}} HTTP ã¬ã¹ãã³ã¹ããããŒã® <strong><code>SameSite</code></strong> å±æ§ã䜿çšãããšãCookie ããã¡ãŒã¹ãããŒãã£ãŸãã¯åããµã€ãã®ã³ã³ããã¹ãã«å¶éãããã©ããã宣èšã§ããŸãã</span></p> + +<h2 id="å€">å€</h2> + +<p><code>SameSite</code> å±æ§ã¯3ã€ã®å€ããšããŸãã</p> + +<h3 id="Lax"><code>Lax</code></h3> + +<p>Cookie ã¯ãããã¬ãã«ããã²ãŒã·ã§ã³ã§éä¿¡ããããšãèš±å¯ãããŠããããµãŒãããŒãã£ã® Web ãµã€ãã«ãã£ãŠéå§ããã GET ãªã¯ãšã¹ããšãšãã«éä¿¡ãããŸããããã¯ãã¢ãã³ãã©ãŠã¶ã®ããã©ã«ãå€ã§ãã</p> + +<h3 id="Strict"><code>Strict</code></h3> + +<p>Cookie ã¯ãã¡ãŒã¹ãããŒãã£ã®ã³ã³ããã¹ãã§ã®ã¿éä¿¡ããããµãŒãããŒãã£ã® Web ãµã€ãã«ãã£ãŠéå§ããããªã¯ãšã¹ããšäžç·ã«éä¿¡ãããããšã¯ãããŸããã</p> + +<h3 id="None"><code>None</code></h3> + +<p>Cookie ã¯ãã¹ãŠã®ã³ã³ããã¹ãã§éä¿¡ãããŸããã€ãŸããã¯ãã¹ãªãªãžã³ã®éä¿¡ãèš±å¯ãããŸãã</p> + +<p><code>None</code> ã¯ããã©ã«ãå€ã§ããããæè¿ã®ãã©ãŠã¶ããŒãžã§ã³ã§ã¯ã<code>Lax</code> ãããã©ã«ãå€ã«ããŠãã¯ãã¹ãµã€ããªã¯ãšã¹ããã©ãŒãžã§ãª ({{Glossary("CSRF")}}) æ»æã®ã¯ã©ã¹ã«å¯ŸããŠé©åºŠã«å
ç¢ãªé²åŸ¡ãæäŸããŸããã</p> + +<p><code>None</code> ã§ã¯ãææ°ããŒãžã§ã³ã®ãã©ãŠã¶ã§ <a href="#Secure"><code>Secure</code></a> å±æ§ãå¿
èŠã§ãã詳现ã«ã€ããŠã¯ã以äžãåç
§ããŠãã ããã</p> + +<h2 id="äžè¬çãªèŠåã®ä¿®æ£">äžè¬çãªèŠåã®ä¿®æ£</h2> + +<h3 id="SameSiteNone_requires_Secure"><code>SameSite=None</code> requires <code>Secure</code></h3> + +<p>次ã®èŠåãã³ã³ãœãŒã«ã«è¡šç€ºãããå ŽåããããŸãã</p> + +<blockquote> +<p>Some cookies are misusing the âsameSiteâ attribute, so it wonât work as expected.<br> + Cookie â<em>myCookie</em>â rejected because it has the âsameSite=noneâ attribute but is missing the âsecureâ attribute.</p> +</blockquote> + +<p><code>SameSite=None</code> ãèŠæ±ããã <code>Secure</code> ãšããŒã¯ãããŠããªã Cookie ã¯æåŠããããããèŠåã衚瀺ãããŸãã</p> + +<pre class="example-bad notranslate">Set-Cookie: flavor=choco; SameSite=None</pre> + +<p>ãããä¿®æ£ããã«ã¯ã<code>SameSite=None</code> Cookie ã« <code>Secure</code> å±æ§ãè¿œå ããå¿
èŠããããŸãã</p> + +<pre class="example-good notranslate">Set-Cookie: flavor=choco; SameSite=None; <strong>Secure</strong></pre> + +<p><a href="#Secure"><code>Secure</code></a> Cookie ã¯ãHTTPS ãããã³ã«ãä»ããæå·åããããªã¯ãšã¹ãã§ã®ã¿ãµãŒããŒã«éä¿¡ãããŸããå®å
šã§ãªããµã€ã (<code>http:</code>) 㯠<code>Secure</code> ãã£ã¬ã¯ãã£ã㧠Cookie ãèšå®ã§ããªãããšã«æ³šæããŠãã ããã</p> + +<h3 id="Cookies_without_SameSite_default_to_SameSiteLax">Cookies without <code>SameSite</code> default to <code>SameSite=Lax</code></h3> + +<p>ã¢ãã³ãã©ãŠã¶ã®æè¿ã®ããŒãžã§ã³ã§ã¯ãããã©ã«ãã§Â <code>SameSite</code> ãããå®å
šã« Cookie ã«æäŸãããŠããããã次ã®ã¡ãã»ãŒãžãã³ã³ãœãŒã«ã«è¡šç€ºãããå ŽåããããŸãã</p> + +<blockquote> +<p>Some cookies are misusing the âsameSiteâ attribute, so it wonât work as expected.<br> + Cookie â<em>myCookie</em>â has âsameSiteâ policy set to âlaxâ because it is missing a âsameSiteâ attribute, and âsameSite=laxâ is the default value for this attribute.</p> +</blockquote> + +<p>Cookie ã® <code>SameSite</code> ããªã·ãŒãæ瀺çã«æå®ãããŠããªããããèŠåã衚瀺ãããŸãã</p> + +<pre class="example-bad notranslate">Set-Cookie: flavor=choco</pre> + +<p>ã¢ãã³ãã©ãŠã¶ã䜿çšã㊠<code>SameSite=Lax</code> ãèªåçã«é©çšããããšãã§ããŸãããæ瀺çã«æå®ããŠãCookie ã«é©çšããã <code>SameSite</code> ããªã·ãŒã®æå³ãæ確ã«äŒããå¿
èŠããããŸãããã¹ãŠã®ãã©ãŠã¶ã®ããã©ã«ãããŸã <code>Lax</code> ã§ããããã§ã¯ãªããããããã«ãããã©ãŠã¶å
šäœã®ãšã¯ã¹ããªãšã³ã¹ãåäžããŸãã</p> + +<pre class="example-good notranslate">Set-Cookie: flavor=choco; <strong>SameSite=Lax</strong></pre> + +<h2 id="äŸ"><strong>äŸ:</strong></h2> + +<pre class="notranslate">RewriteEngine on +RewriteBase "/" +RewriteCond "%{HTTP_HOST}"  "^example\.org$" [NC] +RewriteRule "^(.*)"         "https://www.example.org/index.html" [R=301,L,QSA] +RewriteRule "^(.*)\.ht$" "index.php?nav=$1 [NC,L,QSA,CO=RewriteRule:01:https://www.example.org:30/:SameSite=None:Secure] +RewriteRule "^(.*)\.htm$" "index.php?nav=$1 [NC,L,QSA,CO=RewriteRule:02:https://www.example.org:30/:SameSite=None:Secure] +RewriteRule "^(.*)\.html$" "index.php?nav=$1 [NC,L,QSA,CO=RewriteRule:03:https://www.example.org:30/:SameSite=None:Secure] +[...] +RewriteRule "^admin/(.*)\.html$" "admin/index.php?nav=$1 [NC,L,QSA,CO=RewriteRule:09:https://www.example.org:30/:SameSite=Strict:Secure] +</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("6265", "Set-Cookie", "4.1")}}</td> + <td>HTTP ç¶æ
管çã¡ã«ããºã </td> + </tr> + <tr> + <td><a href="https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-05">draft-ietf-httpbis-rfc6265bis-05</a></td> + <td>Cookie ãã¬ãã£ãã¯ã¹ãåäžãµã€ã Cookieãããã³å³æ Œãªã»ãã¥ã¢ Cookie</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºææ§">ãã©ãŠã¶ã®äºææ§</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("http.headers.Set-Cookie", 5)}}</p> + +<h2 id="ããããŠåç
§">ããããŠåç
§</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Cookies">HTTP cookies</a></li> + <li>{{HTTPHeader("Cookie")}}</li> + <li>{{domxref("Document.cookie")}}</li> +</ul> diff --git a/files/ja/web/http/headers/set-cookie2/index.html b/files/ja/web/http/headers/set-cookie2/index.html new file mode 100644 index 0000000000..4375cc7850 --- /dev/null +++ b/files/ja/web/http/headers/set-cookie2/index.html @@ -0,0 +1,75 @@ +--- +title: Set-Cookie2 +slug: Web/HTTP/Headers/Set-Cookie2 +tags: + - Cookies + - HTTP + - Obsolete + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Headers/Set-Cookie2 +--- +<p>{{HTTPSidebar}} {{obsolete_header}}</p> + +<p>ãµãŒããŒãããŠãŒã¶ãŒãšãŒãžã§ã³ãã«Cookieãéä¿¡ããããã«äœ¿çšãããå€ã <strong><code>Set-Cookie2</code></strong> HTTP ã¬ã¹ãã³ã¹ããããŒã§ãããä»æ§ã§å»æ¢ãããŸããã代ããã« {{HTTPHeader("Set-Cookie")}} ã䜿çšããŠãã ããã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒã¿ã€ã</th> + <td>{{Glossary("Response header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="æ§æ">æ§æ</h2> + +<pre class="syntaxbox">Set-Cookie2: <cookie-name>=<cookie-value> +Set-Cookie2: <cookie-name>=<cookie-value>; Comment=<value> +Set-Cookie2: <cookie-name>=<cookie-value>; CommentURL=<http-url> +Set-Cookie2: <cookie-name>=<cookie-value>; Discard +Set-Cookie2: <cookie-name>=<cookie-value>; Domain=<domain-value> +Set-Cookie2: <cookie-name>=<cookie-value>; Max-Age=<non-zero-digit> +Set-Cookie2: <cookie-name>=<cookie-value>; Path=<path-value> +Set-Cookie2: <cookie-name>=<cookie-value>; Port=<port-number> +Set-Cookie2: <cookie-name>=<cookie-value>; Secure +Set-Cookie2: <cookie-name>=<cookie-value>; Version=<version-number> + +// Multiple directives are also possible, for example: +Set-Cookie2: <cookie-name>=<cookie-value>; Domain=<domain-value>; Secure + +// Multiple cookies are seperated by a comma +Set-Cookie2: <cookie-name>=<cookie-value>, <cookie-name>=<cookie-value>, ... +</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("2965", "Set-Cookie2")}}</td> + <td>Historic specification of HTTP State Management Mechanism, obsoleted by {{RFC("6265")}}</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºææ§">ãã©ãŠã¶ã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Set-Cookie2")}}</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Set-Cookie")}}</li> + <li>{{domxref("Document.cookie")}}</li> +</ul> diff --git a/files/ja/web/http/headers/sourcemap/index.html b/files/ja/web/http/headers/sourcemap/index.html new file mode 100644 index 0000000000..cab7efca74 --- /dev/null +++ b/files/ja/web/http/headers/sourcemap/index.html @@ -0,0 +1,71 @@ +--- +title: SourceMap +slug: Web/HTTP/Headers/SourceMap +tags: + - HTTP + - HTTP ããã㌠+ - ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/SourceMap +--- +<p>{{HTTPSidebar}}</p> + +<p><strong><code>SourceMap</code></strong> <a href="/ja/docs/Web/HTTP">HTTP</a> ã¬ã¹ãã³ã¹ããããŒã¯ãçæãããã³ãŒãã<a href="/ja/docs/Tools/Debugger/How_to/Use_a_source_map">ãœãŒã¹ããã</a>ã«ãªã³ã¯ãããã©ãŠã¶ãå
ã®ãœãŒã¹ãåæ§æããåæ§æããããªãªãžãã«ããããã¬ã«æ瀺ã§ããããã«ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒã¿ã€ã</th> + <td>{{Glossary("Response header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="æ§æ">æ§æ</h2> + +<pre class="syntaxbox">SourceMap: <url> +X-SourceMap: <url> (deprecated) +</pre> + +<h3 id="ãã£ã¬ã¯ãã£ã">ãã£ã¬ã¯ãã£ã</h3> + +<dl> + <dt><code><url></code></dt> + <dd>(ãªã¯ãšã¹ã URL ã«å¯Ÿãã) çžå¯Ÿãã¹ãŸãã¯ãœãŒã¹ããããã¡ã€ã«ãæã絶察 URL</dd> +</dl> + +<h2 id="äŸ">äŸ</h2> + +<pre>SourceMap: /path/to/file.js.map</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td><a href="https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k">Draft document</a></td> + <td>Source Map Revision 3 Proposal</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºææ§">ãã©ãŠã¶ã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.SourceMap")}}</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/en-US/docs/Tools/Debugger/How_to/Use_a_source_map">Firefox Developer Tools: using a source map</a></li> +</ul> diff --git a/files/ja/web/http/headers/strict-transport-security/index.html b/files/ja/web/http/headers/strict-transport-security/index.html new file mode 100644 index 0000000000..7a69b31fc8 --- /dev/null +++ b/files/ja/web/http/headers/strict-transport-security/index.html @@ -0,0 +1,123 @@ +--- +title: Strict-Transport-Security +slug: Web/HTTP/Headers/Strict-Transport-Security +tags: + - HSTS + - HTTP + - HTTPS + - ã»ãã¥ãªã㣠+ - ããã㌠+ - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Strict-Transport-Security +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>Strict-Transport-Security</code></strong> ã¬ã¹ãã³ã¹ããã㌠(ãã°ãã° {{Glossary("HSTS")}} ãšç¥ãããŸã) ã¯ããŠã§ããµã€ãããã©ãŠã¶ãŒã« HTTP ã®ä»£ããã« HTTPS ãçšããŠéä¿¡ãè¡ãããæ瀺ããããã®ãã®ã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Strict-Transport-Security: max-age=<expire-time> +Strict-Transport-Security: max-age=<expire-time>; includeSubDomains +Strict-Transport-Security: max-age=<expire-time>; preload +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>max-age=<expire-time></code></dt> + <dd>ç§åäœã§ããã®ãµã€ãã« HTTPS ã ãã§æ¥ç¶ããããšããã©ãŠã¶ãŒãèšæ¶ããæéã§ãã</dd> + <dt><code>includeSubDomains</code> {{optional_inline}}</dt> + <dd>çç¥å¯èœã§ããã®åŒæ°ãæå®ããããšããã®èŠåããµã€ãã®ãã¹ãŠã®ãµããã¡ã€ã³ã«ãé©çšãããŸãã</dd> + <dt><code>preload</code> {{optional_inline}}</dt> + <dd>詳ãã㯠{{anch("Preloading Strict Transport Security", "Strict Transport Security ã®ããªããŒã")}} ãåç
§ããŠãã ãããä»æ§æžã§å®çŸ©ãããŠãããã®ã§ã¯ãããŸããã</dd> +</dl> + +<h2 id="Description" name="Description">解説</h2> + +<p>ããã蚪åè
ã http://www.foo.com/ ãŸãã¯åã« foo.com ãšå
¥åãããšãããŠã§ããµã€ããæ¥ç¶ã HTTP ã§åãä»ãã HTTPS ã«ãªãã€ã¬ã¯ãããããã«ãªã£ãŠãããšã蚪åè
ã¯ãªãã€ã¬ã¯ããããåã«ãŸããæå·åãããªãããŒãžã§ã³ã®ãµã€ããšéä¿¡ããå¯èœæ§ããããŸããããã¯äžéè
æ»æã®æ©äŒãäœã£ãŠããŸããŸãããªãã€ã¬ã¯ãã¯èšªåè
ããæ¬æ¥ã®ãµã€ãã®å®å
šãªããŒãžã§ã³ã§ã¯ãªããæªæã®ãããµã€ãã«å°ãããã«å©çšãããå¯èœæ§ãããããã§ãã</p> + +<p>HTTP ã® Strict Transport Security ããããŒã¯ããã©ãŠã¶ãŒã«å¯ŸããŠãµã€ãã HTTP ã䜿çšããŠèªã¿èŸŒãŸãããµã€ããžã®ãã¹ãŠã®ã¢ã¯ã»ã¹ããèªåçã« HTTP ãã HTTPS ãªã¯ãšã¹ãã«å€æããããæ瀺ããããšãã§ããŸãã</p> + +<div class="note"><strong>ã¡ã¢:</strong> ãµã€ãã« HTTP ã䜿çšããŠã¢ã¯ã»ã¹ãããšãããã©ãŠã¶ãŒã¯ <code>Strict-Transport-Security</code> ããããŒãç¡èŠããŸããããã¯æ»æè
ã HTTP æ¥ç¶ã«ä»å
¥ããŠãããããŒãæ¿å
¥ãããåé€ããããããããããªãããã§ãããŠã§ããµã€ãã« HTTPS ã§ã¢ã¯ã»ã¹ããŠã蚌ææžã®ãšã©ãŒããªãå Žåããã©ãŠã¶ãŒã¯ãµã€ãã HTTPS ã§ã¢ã¯ã»ã¹ã§ããããšãç¥ãã <code>Strict-Transport-Security</code> ããããŒãä¿¡çšããŸãã</div> + +<h3 id="An_example_scenario" name="An_example_scenario">äºäŸ</h3> + +<p>ããªããã空枯ã§ç¡æã® Wi-Fi ã¢ã¯ã»ã¹ãã€ã³ãã«ãã°ã€ã³ããŠãŠã§ãã®å©çšãéå§ãããªã³ã©ã€ã³ãã³ãã³ã°ãµãŒãã¹ã§æ®é«ã®ç¢ºèªãååŒãè¡ã£ããšããŸãããããäžéã«ããããªãã䜿çšããã¢ã¯ã»ã¹ãã€ã³ãã¯ããã«ãŒã®ããŒãããœã³ã³ã§ããããã®ããã«ãŒã¯ããªãã® HTTP ãªã¯ãšã¹ããååããŠãæ¬ç©ã®éè¡ã®ãµã€ãã§ã¯ãªãåœã®ãµã€ããžãªãã€ã¬ã¯ããããšããŸãããããªããšãããªãã®å人æ
å ±ã¯ããã«ãŒã«ãããããŠããŸããŸãã</p> + +<p>Strict Transport Security ã¯ãã®åé¡ã解決ããŸãããã£ããéè¡ã®ãŠã§ããµã€ããž HTTPS ã§ã¢ã¯ã»ã¹ããã°ããããŠéè¡ã®ãŠã§ããµã€ãã Strict Transport Security ãå©çšããŠããã°ããã©ãŠã¶ãŒã¯èªåçã« HTTPS ã®ã¿ãçšããããç解ããŠãããã«ãŒã«ãããã®çš®ã®äžéè
æ»æã®å®è¡ãé²ããŸãã</p> + +<h3 id="How_the_browser_handles_it" name="How_the_browser_handles_it">ãã©ãŠã¶ãŒã§ã®æ±ã</h3> + +<p>æåã«ãµã€ãã« HTTPS ã§ã¢ã¯ã»ã¹ã㊠<code>Strict-Transport-Security</code> ããããŒãè¿ããããšããã©ãŠã¶ãŒã¯ãã®æ
å ±ãèšé²ãã以é㯠HTTP ã䜿çšããŠãµã€ããèªã¿èŸŒã¿ãããšãããšãèªåçã« HTTPS ã䜿çšããããã«ãªããŸãã</p> + +<p>Strict-Transport-Security ããããŒã§æå®ãããæå¹æéãçµéãããšã次åã¯èªåçã« HTTPS ã䜿çšããã®ã§ã¯ãªããéåžžéãã« HTTP ã§ãµã€ããèªã¿èŸŒãããšããŸãã</p> + +<p>ãªãã Strict-Transport-Security ããããŒããã©ãŠã¶ãŒãžéããããã³ã«ããã®ãŠã§ããµã€ãã«å¯Ÿããæå¹æéãæŽæ°ãããã®ã§ããµã€ãã¯ãã®æ
å ±ãæŽæ°ããŠæéåããé²ãããšãã§ããŸãã Strict-Transport-Security ãç¡å¹ã«ããå¿
èŠãããå Žåã¯ã HTTPS éä¿¡æã« max-age ã®å€ã 0 ã«èšå®ããããšã§ <code>Strict-Transport-Security</code> ããããŒã倱å¹ãããã©ãŠã¶ãŒããã® HTTP æ¥ç¶ãèš±ãããããã«ãªããŸãã</p> + +<h2 id="Preloading_Strict_Transport_Security" name="Preloading_Strict_Transport_Security">Strict Transport Security ã®ããªããŒã</h2> + +<p>Google 㯠<a href="https://hstspreload.org/">HSTS å
èªã¿ãµãŒãã¹</a> ãè¡ã£ãŠããŸããã¬ã€ãã©ã€ã³ã«åŸã£ãŠãã¡ã€ã³ãç»é²ããã°ããã©ãŠã¶ãŒã¯ãã¡ã€ã³ã«å®å
šã§ã¯ãªãæ¥ç¶ãè¡ããªãããã«ãªããŸãããµãŒãã¹ã¯ Google ã«ãã£ãŠéå¶ãããŠããããã¹ãŠã®ãã©ãŠã¶ãŒãå
èªã¿ãªã¹ãã䜿çšããæå¿ã瀺ããŠããŸã (ãŸãã¯æ¢ã«äœ¿çšãå§ããŠããŸã)ãäœãããã㯠HSTS ä»æ§æžã«ãããã®ã§ã¯ãªããå
¬åŒãªãã®ãšããŠæ±ãã¹ãã§ã¯ãããŸããã</p> + +<ul> + <li>Chrome ãå®è£
ããŠãã HSTS å
èªã¿ãªã¹ãã«é¢ããæ
å ± : <a href="https://www.chromium.org/hsts">https://www.chromium.org/hsts</a></li> + <li>Firefox ãå®è£
ããŠãã HSTS å
èªã¿ãªã¹ãã«é¢ããåç
§ : <a href="https://hg.mozilla.org/mozilla-central/raw-file/tip/security/manager/ssl/nsSTSPreloadList.inc">nsSTSPreloadList.inc</a></li> +</ul> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>æ¢åããã³å°æ¥ã®ãã¹ãŠã®ãµããã¡ã€ã³ã§ã1幎éãæéãšã㊠HTTPS ã䜿çšããèšå®ã§ãããã㯠HTTP ã®ã¿ã§æäŸã§ããããŒãžããµããã¡ã€ã³ãžã®ã¢ã¯ã»ã¹ããããã¯ããŸãã</p> + +<pre class="notranslate">Strict-Transport-Security: max-age=31536000; includeSubDomains</pre> + +<p>以äžã®äŸã§ã¯ã <code>max-age</code> ã¯ååã®1幎éãæéãšãã <code>max-age</code> ã延é·ããŠ2幎éã«èšå®ããŸãããªãã1幎éã¯ãã©ãŠã¶ãŒã® HSTS å
èªã¿ãªã¹ãã«å«ãŸãããã¡ã€ã³ã§æå¹ã§ãããããã2幎é㯠<a href="https://hstspreload.org">https://hstspreload.org</a> ã§èª¬æãããŠãããšããããŠã§ããµã€ãã®æçµç㪠HSTS èšå®ã®ãŽãŒã«ãšããŠæšå¥šãããŠããŸãããŸããæåŸã® <code>preload</code> 㯠Chromium, Edge, Firefox ãªã©ã®äž»èŠãªãã©ãŠã¶ãŒã® HSTS å
èªã¿ãªã¹ãã§å¿
èŠã§ãã</p> + +<pre class="notranslate">Strict-Transport-Security: max-age=63072000; includeSubDomains; preload</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HSTS')}}</td> + <td>{{Spec2('HSTS')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Strict-Transport-Security")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>ããã°èšäº: <a class="external" href="http://blog.sidstamm.com/2010/08/http-strict-transport-security-has.html">HTTP Strict Transport Security has landed!</a></li> + <li>ããã°èšäº: <a class="external" href="http://hacks.mozilla.org/2010/08/firefox-4-http-strict-transport-security-force-https/">HTTP Strict Transport Security (force HTTPS)</a></li> + <li>OWASP ã®èšäº: <a href="https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Strict_Transport_Security_Cheat_Sheet.html">HTTP Strict Transport Security</a></li> + <li>Wikipedia: {{interwiki("wikipedia", "HTTP Strict Transport Security")}}</li> + <li>ãã©ãŠã¶ãŒè©Šéšãµã€ã: <a href="https://projects.dm.id.lv/Public-Key-Pins_test">HSTS and HPKP test</a></li> + <li><a href="/ja/docs/Web/Security/Secure_Contexts/features_restricted_to_secure_contexts">å®å
šãªã³ã³ããã¹ãã«å¶éãããŠããæ©èœ</a></li> +</ul> diff --git a/files/ja/web/http/headers/timing-allow-origin/index.html b/files/ja/web/http/headers/timing-allow-origin/index.html new file mode 100644 index 0000000000..893970a421 --- /dev/null +++ b/files/ja/web/http/headers/timing-allow-origin/index.html @@ -0,0 +1,85 @@ +--- +title: Timing-Allow-Origin +slug: Web/HTTP/Headers/Timing-Allow-Origin +tags: + - CORS + - HTTP + - Reference + - Timing-Allow-Origin + - header +translation_of: Web/HTTP/Headers/Timing-Allow-Origin +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Timing-Allow-Origin</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ã <a href="/ja/docs/Web/API/Resource_Timing_API">Resource Timing API</a> ã®æ©èœãä»ããŠååŸãããå±æ§ã®å€ã®è¡šç€ºãèš±å¯ãããŠãããªãªãžã³ãæå®ããŸããããã§ãªãå Žåãã¯ãã¹ãªãªãžã³ã®å¶éã«ãããŒããšããŠå ±åãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Timing-Allow-Origin: * +Timing-Allow-Origin: <origin>[, <origin>]* +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>*</code></dt> + <dd>ãµãŒããŒã¯ã¯ã€ã«ãã«ãŒããšã㊠"*" ãæå®ããããšãã§ããããã«ãã£ãŠå
šãŠã®ãªãªãžã³ãã¿ã€ãã³ã°ãªãœãŒã¹ãèŠãããšãã§ããŸãã</dd> + <dt><code><origin></code></dt> + <dd>ã¿ã€ãã³ã°ãªãœãŒã¹ã衚瀺ã§ãã URI ãæå®ããŸãã è€æ°ã®ãªãªãžã³ãã«ã³ãåºåãã§æå®ã§ããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>ãªãœãŒã¹ãã¿ã€ãã³ã°ãªãœãŒã¹ã衚瀺ã§ããããã«ããå Žåã</p> + +<pre class="notranslate">Timing-Allow-Origin: *</pre> + +<p><code>https://developer.mozilla.org</code> ãã¿ã€ãã³ã°ãªãœãŒã¹ã衚瀺ã§ããããã«ããã«ã¯ã次ã®ããã«æå®ã§ããŸãã</p> + +<pre class="notranslate">Timing-Allow-Origin: https://developer.mozilla.org</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Resource Timing 3', '#sec-timing-allow-origin', 'Timing-Allow-Origin')}}</td> + <td>{{Spec2("Resource Timing 3")}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Timing-Allow-Origin")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/API/Resource_Timing_API">Resource Timing API</a></li> + <li><a href="/ja/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API">Resource Timing API ã®äœ¿çš</a></li> + <li>{{HTTPHeader("Vary")}}</li> +</ul> diff --git a/files/ja/web/http/headers/tk/index.html b/files/ja/web/http/headers/tk/index.html new file mode 100644 index 0000000000..6335a9169a --- /dev/null +++ b/files/ja/web/http/headers/tk/index.html @@ -0,0 +1,103 @@ +--- +title: Tk +slug: Web/HTTP/Headers/Tk +tags: + - DNT + - HTTP + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã¹ãã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+ - 远跡 +translation_of: Web/HTTP/Headers/Tk +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Tk</code></strong> å¿çããããŒã¯ã該åœããèŠæ±ã«é©çšããã远跡ç¶æ
ã瀺ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "å¿çããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Tk: ! (å·¥äºäž) +Tk: ? (åç) +Tk: G (ã²ãŒããŠã§ã€åã¯è€æ°ã®é¢ä¿è
) +Tk: N (远跡ãªã) +Tk: T (远跡äž) +Tk: C (åææžã¿ã®è¿œè·¡äž) +Tk: P (æœåšçãªåæ) +Tk: D (DNT ãç¡èŠ) +Tk: U (æŽæ°æžã¿) +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt>!</dt> + <dd>å·¥äºäžããªãªãžã³ã®ãµãŒããŒã¯çŸåšã®è¿œè·¡ç¶æ
ã®éä¿¡ã®ãã¹ããè¡ã£ãŠããŸãã</dd> + <dt>?</dt> + <dd>åçããªãªãžã³ã®ãµãŒããŒã¯è¿œè·¡ç¶æ
ãç¹å®ããããã«è¿œå æ
å ±ãå¿
èŠã§ãã</dd> + <dt>G</dt> + <dd>ã²ãŒããŠã§ã€åã¯è€æ°ã®é¢ä¿è
ããµãŒããŒã¯ãè€æ°ã®é¢ä¿è
ãé¢ãã亀æã®ã²ãŒããŠã§ã€ãšããŠæ©èœããŠããŸãã</dd> + <dt>N</dt> + <dd>远跡ãªãã</dd> + <dt>T</dt> + <dd>远跡äžã</dd> + <dt>C</dt> + <dd>åææžã¿ã®è¿œè·¡äžããªãªãžã³ã®ãµãŒããŒã¯ããã®ãŠãŒã¶ãŒããŠãŒã¶ãŒãšãŒãžã§ã³ããæ©åšã远跡ã«é¢ããäºåã®åæãåŸãŠãããšèããŠããŸãã</dd> + <dt>P</dt> + <dd>æœåšçãªåæããªãªãžã³ã®ãµãŒããŒã¯ããã®ãŠãŒã¶ãŒããŠãŒã¶ãŒãšãŒãžã§ã³ããæ©åšã远跡ããããã®äºåã®åæããªã¢ã«ã¿ã€ã ã§åãåã£ããã©ãããç¥ããŸãããããã®ãããªåæã確å®ãããŸã§ <code>DNT:1</code> ããŒã¿ã䜿çšãŸãã¯å
±æããªãããšãçŽæããŸãã ãã®ãããªåæãåé ãããŠããªã <code>DNT:1</code> ããŒã¿ã48æé以å
ã«åé€ãŸãã¯æ°žä¹
ã«å¿ååããããšãçŽæããŸãã</dd> + <dt>D</dt> + <dd>DNT ãç¡èŠããªãªãžã³ã®ãµãŒããŒã¯ãèŠæ±ããŠãããŠãŒã¶ãŒãšãŒãžã§ã³ãããåä¿¡ãã远跡èšå®ãå°éããããšãã§ããªããããŸãã¯ããããããªãã</dd> + <dt>U</dt> + <dd>æŽæ°æžã¿ããã®èŠæ±ã«ããããã®ãŠãŒã¶ãŒããŠãŒã¶ãŒãšãŒãžã§ã³ããæ©åšã«é©çšå¯èœãªè¿œè·¡ç¶æ
ãå€æŽãããå¯èœæ§ããããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>远跡ããªãããã«å®£èšããŠãããªãœãŒã¹ãžã® <code>Tk</code> ããããŒã¯æ¬¡ã®ããã«ãªããŸãã</p> + +<pre>Tk: N</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Tracking','#Tk-header-defn', 'Tk header field')}}</td> + <td>{{Spec2("Tracking")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååãããã®ã§ããã°ã <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Tk")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("DNT")}} ããããŒ</li> + <li>{{domxref("Navigator.doNotTrack")}}</li> +</ul> diff --git a/files/ja/web/http/headers/transfer-encoding/index.html b/files/ja/web/http/headers/transfer-encoding/index.html new file mode 100644 index 0000000000..4dbace4204 --- /dev/null +++ b/files/ja/web/http/headers/transfer-encoding/index.html @@ -0,0 +1,113 @@ +--- +title: Transfer-Encoding +slug: Web/HTTP/Headers/Transfer-Encoding +tags: + - HTTP + - Reference + - ããã㌠+ - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Transfer-Encoding +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Transfer-Encoding</code></strong> ããããŒã¯ã{{Glossary("Payload body","ãã€ããŒãæ¬æ")}}ããŠãŒã¶ãŒã«å®å
šã«è»¢éããããã«äœ¿ããã笊å·åæ¹åŒãæå®ããŸãã</p> + +<div class="note"><a href="https://wikipedia.org/wiki/HTTP/2">HTTP/2</a> 㯠HTTP 1.1 ã®ãã£ã³ã¯åãã転éãšã³ã³ãŒãã®ä»çµã¿ã«å¯Ÿå¿ããŠããããæ°èŠã«ãã£ãšå¹ççãªãããŒã¿ã¹ããªãŒãã³ã°ã®ä»çµã¿ãæäŸããŠããŸãã</div> + +<p><code>Transfer-Encoding</code> ã¯<a href="/ja/docs/Web/HTTP/Headers#hbh">ããããã€ãããããããŒ</a>ã§ããããªãœãŒã¹èªäœã§ã¯ãªããäºã€ã®ããŒãéã®ã¡ãã»ãŒãžã«é©çšãããŸããè€æ°ããŒãã³ãã¯ã·ã§ã³ã®ããããã®åºéã¯ãç°ãªã <code>Transfer-Encoding</code> ã®å€ã䜿çšããããšããããŸããã³ãã¯ã·ã§ã³å
šäœãéããŠããŒã¿ãå§çž®ãããå Žåã¯ã代ããã«ãšã³ããã¥ãšã³ãã® {{HTTPHeader("Content-Encoding")}} ããããŒã䜿çšããŠãã ããã</p> + +<p>æ¬æã®ãªã {{HTTPMethod("HEAD")}} ãªã¯ãšã¹ãã«å¯Ÿããã¬ã¹ãã³ã¹ã§äœ¿ããããšãã¯ã察å¿ãã {{HTTPMethod("GET")}} ã¡ãã»ãŒãžã«é©çšãããã§ãããå€ã瀺ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ã¯ã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Transfer-Encoding: chunked +Transfer-Encoding: compress +Transfer-Encoding: deflate +Transfer-Encoding: gzip +Transfer-Encoding: identity + +<em>// ã³ã³ãã§åºåã£ãŠè€æ°ã®å€ã䞊ã¹ãããšãã§ããŸã</em> +Transfer-Encoding: gzip, chunked</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>chunked</code></dt> + <dd>ããŒã¿ã¯ãã£ã³ã¯ (å¡) ã®é£ç¶ã§éãããŸãããã®å Žå㯠{{HTTPHeader("Content-Length")}} ããããŒãçç¥ãããŸããããããã®ãã£ã³ã¯ã®å
é ã«çŸåšã®ãã£ã³ã¯ã®é·ãã16é²æ°ã®åœ¢åŒã§è¿œå ãããã®åŸã§ '<code>\r\n</code>' ãç¶ãããã£ã³ã¯èªäœãããäžã€ã® '<code>\r\n</code>' ãç¶ããŸããæåŸã®ãã£ã³ã¯ã¯éåžžã®ãã£ã³ã¯ã§ãããé·ãã0ã§ãããšããç¹ãç°ãªããŸãããã®åŸã«ãäžé£ã®ãšã³ãã£ãã£ã®ããããŒãã£ãŒã«ã (ãããã空) ããæããã¬ã€ã©ãŒãç¶ããŸãã</dd> + <dt><code>compress</code></dt> + <dd><a class="external" href="http://en.wikipedia.org/wiki/LZW">Lempel-Ziv-Welch</a> (LZW) ã¢ã«ãŽãªãºã ã䜿çšãã圢åŒã§ãããã®å€ã®ååã¯ãã®ã¢ã«ãŽãªãºã ãå®è£
ããŠãã UNIX ã® <em>compress</em> ããã°ã©ã ããæ¡ãããŸããã<br> + ç¹èš±åé¡ (2003幎ã«æéåã) ã®åœ±é¿ããããå€ãã® UNIX ãã£ã¹ããªãã¥ãŒã·ã§ã³ãã compress ããã°ã©ã ãæ¶æ»
ããããã«ãä»æ¥ã§ã¯ãã®ã³ã³ãã³ã笊å·åæ¹åŒã䜿çšããŠãããã©ãŠã¶ãŒã¯ã»ãšãã©ãããŸããã</dd> + <dt><code>deflate</code></dt> + <dd><a class="external" href="http://en.wikipedia.org/wiki/Zlib">zlib</a> æ§é äœ (<a class="external" href="http://tools.ietf.org/html/rfc1950">RFC 1950</a> ã§å®çŸ©) ãš <a class="external" href="http://en.wikipedia.org/wiki/DEFLATE"><em>deflate</em></a> å§çž®ã¢ã«ãŽãªãºã (<a class="external" href="http://tools.ietf.org/html/rfc1952">RFC 1951</a> ã§å®çŸ©) ã䜿çšããŸãã</dd> + <dt><code>gzip</code></dt> + <dd><a class="external" href="http://en.wikipedia.org/wiki/LZ77_and_LZ78#LZ77">Lempel-Ziv coding</a> (LZ77) ãš32ããã CRC ã䜿çšãã圢åŒã§ããããã¯å
㯠UNIX ã® <em>gzip</em> ããã°ã©ã ã®åœ¢åŒã§ãã HTTP/1.1 æšæºã¯ãäºææ§ã®ããã«ããã®ã³ã³ãã³ã笊å·åæ¹åŒã®å¥åãšããŠ<code>x-gzip</code> ã解éããããšã«ãµãŒããŒã察å¿ããããšãæšå¥šããŠããŸãã</dd> + <dt><code>identity</code></dt> + <dd>æçåå (ã€ãŸããå§çž®ãªããå€æŽãªã) ã§ããããšã瀺ããŸãããã®ããŒã¯ã³ã¯ãç¹ã«æ瀺ãããå Žåã¯ãåžžã«åãä»ãããããšã¿ãªãããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Chunked_encoding" name="Chunked_encoding">ãã£ã³ã¯åã®ç¬Šå·å</h3> + +<p>ãã£ã³ã¯åã®ç¬Šå·åã¯ã倧éã®ããŒã¿ãã¯ã©ã€ã¢ã³ãã«éãããªã¯ãšã¹ããå®äºãããŸã§ã¬ã¹ãã³ã¹ã®åèšã®é·ããåãããªãå Žåã«äŸ¿å©ã§ããäŸãã°ã巚倧㪠HTML ã®è¡šãããŒã¿ããŒã¹ã®ã¯ãšãªã®çµæãšããŠäœæãããã倧ããªç»åã転éãããããå Žåãªã©ã§ãããã£ã³ã¯åãããã¬ã¹ãã³ã¹ã¯ä»¥äžã®ããã«ãªããŸãã</p> + +<pre>HTTP/1.1 200 OK +Content-Type: text/plain +Transfer-Encoding: chunked + +7\r\n +Mozilla\r\n +9\r\n +Developer\r\n +7\r\n +Network\r\n +0\r\n +\r\n</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7230", "Transfer-Encoding", "3.3.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Transfer-Encoding")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Accept-Encoding")}}</li> + <li>{{HTTPHeader("Content-Encoding")}}</li> + <li>{{HTTPHeader("Content-Length")}}</li> + <li>ãã¬ã€ã©ãŒã®äœ¿çšãå¶åŸ¡ããããããŒãã£ãŒã«ã: {{HTTPHeader("TE")}} (ãªã¯ãšã¹ã) ããã³ {{HTTPHeader("Trailer")}} (ã¬ã¹ãã³ã¹)</li> + <li> + <p><a href="https://en.wikipedia.org/wiki/Chunked_transfer_encoding">ãã£ã³ã¯åããã転éãšã³ã³ãŒãã£ã³ã°</a></p> + </li> +</ul> diff --git a/files/ja/web/http/headers/upgrade-insecure-requests/index.html b/files/ja/web/http/headers/upgrade-insecure-requests/index.html new file mode 100644 index 0000000000..944504ad3c --- /dev/null +++ b/files/ja/web/http/headers/upgrade-insecure-requests/index.html @@ -0,0 +1,75 @@ +--- +title: Upgrade-Insecure-Requests +slug: Web/HTTP/Headers/Upgrade-Insecure-Requests +tags: + - HTTP + - HTTPS + - Security + - header +translation_of: Web/HTTP/Headers/Upgrade-Insecure-Requests +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>Upgrade-Insecure-Requests</code></strong> ãªã¯ãšã¹ãããããŒã¯ãæå·åããã³èªèšŒãããã¬ã¹ãã³ã¹ã«å¯Ÿããã¯ã©ã€ã¢ã³ãã®èšå®ãè¡šãä¿¡å·ããµãŒããŒã«éä¿¡ã ã{{CSP("upgrade-insecure-requests")}} <a href="/ja/docs/Web/Security/CSP">CSP</a> ãã£ã¬ã¯ãã£ããæ£åžžã«åŠçã§ããããšã瀺ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">Upgrade-Insecure-Requests: 1</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>ã¯ã©ã€ã¢ã³ãã¯ã次ã®ããã« {{CSP("upgrade-insecure-requests")}} ã®ã¢ããã°ã¬ãŒãã¡ã«ããºã ããµããŒãããŠããããšããµãŒããŒã«éç¥ããŸãã</p> + +<pre class="notranslate">GET / HTTP/1.1 +Host: example.com +Upgrade-Insecure-Requests: 1</pre> + +<p>ããã§ããµãŒããŒã¯å®å
šãªããŒãžã§ã³ã®ãµã€ãã«ãªãã€ã¬ã¯ãã§ããŸãã {{HTTPHeader("Vary")}} ããããŒã䜿çšããããšã§ãã¢ããã°ã¬ãŒãã¡ã«ããºã ããµããŒãããŠããªãã¯ã©ã€ã¢ã³ãã«ãã£ãã·ã¥ãããµã€ããæäŸãããªããªããŸãã</p> + +<pre class="notranslate">Location: https://example.com/ +Vary: Upgrade-Insecure-Requests</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">ã³ã¡ã³ã</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{specName("Upgrade Insecure Requests", "#preference", "upgrade-insecure-requests")}}</td> + <td>{{Spec2('Upgrade Insecure Requests')}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.Upgrade-Insecure-Requests")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li>CSP ã® {{CSP("upgrade-insecure-requests")}} ãã£ã¬ã¯ãã£ã</li> +</ul> diff --git a/files/ja/web/http/headers/user-agent/firefox/index.html b/files/ja/web/http/headers/user-agent/firefox/index.html new file mode 100644 index 0000000000..c6ad156fc5 --- /dev/null +++ b/files/ja/web/http/headers/user-agent/firefox/index.html @@ -0,0 +1,473 @@ +--- +title: Firefox ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååãªãã¡ã¬ã³ã¹ +slug: Web/HTTP/Headers/User-Agent/Firefox +tags: + - Compatibility + - Firefox + - Firefox 4 + - Gecko + - Gecko 2.0 + - Guide + - User-agent + - äºææ§ +translation_of: Web/HTTP/Headers/User-Agent/Firefox +--- +<div>{{HTTPSidebar}}</div> + +<p>ãã®ææžã§ã¯ã Firefox 4 以éããã³ <a href="/ja/docs/Mozilla/Gecko">Gecko</a> 2.0 以éããŒã¹ã®ã¢ããªã±ãŒã·ã§ã³ã§çšãããããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã«ã€ããŠèª¬æããŸãã Gecko 2.0 ã§ã®å€æŽç¹ã«ã€ããŠè©³ãã㯠<a class="external" href="http://hacks.mozilla.org/2010/09/final-user-agent-string-for-firefox-4/">Final User Agent string for Firefox 4</a> (ããã°èšäº) ãã芧ãã ããã<a href="/ja/docs/Web/HTTP/Browser_detection_using_the_user_agent">ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®æ€åº</a>ã«é¢ããææžã <a href="https://hacks.mozilla.org/2013/09/user-agent-detection-history-and-checklist/">Hacks ã®æçš¿</a>ãã芧ãã ããã</p> + +<h2 id="General_form" name="General_form">äžè¬åœ¢</h2> + +<p>Firefox èªèº«ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã¯ã4ã€ã®éšåã«åããããŸãã</p> + +<p><code>Mozilla/5.0 (<var>platform</var>; rv:<var>geckoversion</var>) Gecko/<var>geckotrail</var> Firefox/<var>firefoxversion</var></code></p> + +<ul> + <li><code>Mozilla/5.0</code> ã¯ãã©ãŠã¶ãŒã Mozilla äºæã§ããããšã瀺ãäžè¬çãªããŒã¯ã³ã§ãããä»æ¥ã®ã»ãšãã©ãã¹ãŠã®ãã©ãŠã¶ãŒã§å
±éããŠããŸãã</li> + <li> + <p><code><var>platform</var></code> ã¯ããã©ãŠã¶ãŒãåäœããŠãããã€ãã£ããã©ãããã©ãŒã (äŸ: WindowsãMacãLinuxããŸã㯠Android)ãããã³ã¢ãã€ã«ç«¯æ«ã§ããããè¡šããŸãã Firefox OS 端æ«ã¯åã« "<code>Mobile</code>" ãšãªãããŠã§ãããã©ãããã©ãŒã ã§ãã <code><var>platform</var></code> 㯠"; " (ã»ãã³ãã³) åºåãã®è€æ°ããŒã¯ã³ã§æ§æãããããšãããç¹ã«æ³šæããŠãã ããã詳现ãäŸã«ã€ããŠã¯åŸè¿°ããŸãã</p> + + <div class="blockIndicator note"> + <p>Firefox 69 ã§ä¿®æ£ãããŸãããã以åã®32ãããçã® Firefox ã¯64ãããããã»ããµãŒã§å®è¡ãããŠããå Žåãã·ã¹ãã ã32ããã CPU ã§ãããšå ±åããŠããŸããã</p> + </div> + </li> + <li><code>rv:<var>geckoversion</var></code> ã¯ãGecko ã®ãªãªãŒã¹ããŒãžã§ã³ã瀺ããŸã (äŸ: "<code>17.0</code>")ãæè¿ã®ãã©ãŠã¶ãŒã§ã¯ <code><var>geckoversion</var></code> ãš <code><var>firefoxversion</var></code> ãåãã§ãã</li> + <li><code>Gecko/<var>geckotrail</var></code> ã¯ããã©ãŠã¶ãŒã Gecko ããŒã¹ã§ããããšã瀺ããŸãã</li> + <li>ãã¹ã¯ãããçã§ã¯ã <code><var>geckotrail</var></code> ã¯åºå®æåå "<code>20100101</code>" ã§ãã</li> + <li><code>Firefox/<var>firefoxversion</var></code> ã¯ãã©ãŠã¶ãŒã Firefox ã§ããããšã瀺ããšãšãã«ãããŒãžã§ã³çªå·ãæäŸããŸã (äŸ: "<code>17.0</code>")ã</li> + <li>{{gecko_minversion_inline("10.0")}} ã¢ãã€ã«ç㯠Firefox 10 ããã <code><var>geckotrail</var></code> ãš <code><var>firefoxversion</var></code> ãåãã§ãã</li> +</ul> + +<div class="note"><strong>ã¡ã¢:</strong> Gecko ããŒã¹ã®ãã©ãŠã¶ãŒåãã«æšå¥šããã¹ãããã£ã³ã°æ³ (æ©èœã®æ€åºãè¡ã代ããã«ãã©ãŠã¶ãŒãšã³ãžã³ã®ã¹ãããã£ã³ã°ã<em>è¡ããªããã°ãªããªã</em>å Žå) ã¯ã "<code>Gecko</code>" ããã³ "<code>rv:</code>" ã®æååãååšãããã®æ€åºã§ããããã¯ãä»ãã©ãŠã¶ãŒã®äžéšã« "<code>like Gecko</code>" ãšããããŒã¯ã³ãå«ãŸããããã§ãã</div> + +<p>Gecko ããŒã¹ã®ä»è£œåã§ã¯äžèš 2 ã€ã®åœ¢åŒã®ããããã§ãããåããŒã¯ã³ã®æå³ã¯ä»¥äžã«èšèŒããå
容ãé€ããŠåãã§ã:</p> + +<p><code>Mozilla/5.0 (<var>platform</var>; rv:<var>geckoversion</var>) Gecko/<var>geckotrail</var> <var>appname</var>/<var>appversion</var></code><br> + <code>Mozilla/5.0 (<var>platform</var>; rv:<var>geckoversion</var>) Gecko/<var>geckotrail</var> Firefox/<var>firefoxversion</var> <var>appname</var>/<var>appversion</var></code></p> + +<ul> + <li><code><var>appname</var>/<var>appversion</var></code> ã¯ãã¢ããªã±ãŒã·ã§ã³ã®å称ãšããŒãžã§ã³ã瀺ããŸããäŸãã°ããã¯ã"<code>Camino/2.1.1</code>" ã "<code>SeaMonkey/2.7.1</code>" ãšãªããŸãã</li> + <li> + <p><code>Firefox/<var>firefoxversion</var></code> ã¯ãFirefox ãæ³å®ãã Web ãµã€ããšæ倧éã®äºææ§ãåŸãããã«äžéšã® Gecko ããŒã¹ã®ãã©ãŠã¶ãŒãçµã¿å
¥ããå Žåããããçç¥å¯èœãªäºææ§ããŒã¯ã³ã§ãã <code><var>firefoxversion</var></code> ã¯äžè¬çã«ãå°å
¥ãã Gecko ã®ããŒãžã§ã³ã«çžåœãã Firefox ã®ãªãªãŒã¹ãè¡šããŸããäžéšã® Gecko ããŒã¹ã®ãã©ãŠã¶ãŒã¯ãã®ããŒã¯ã³ã䜿çšããªããããããŸãããåŸã£ãŠãã¹ãããã£ã³ã°ã®é㯠Firefox ã§ã¯ãªã Gecko ãæ¢ããŠãã ãã! ãã®ããŒã¯ã³ã衚瀺ãããã¯ã<em>"general.useragent.compatMode.firefox"</em> ãšããçåœå€ã®èšå®é
ç®ã§å¶åŸ¡ã§ããŸãã</p> + </li> +</ul> + +<h2 id="Mobile_and_Tablet_indicators" name="Mobile_and_Tablet_indicators">ã¢ãã€ã«ããã³ã¿ãã¬ããã®æšç€º</h2> + +<div class="note"> +<p>Firefox 11 以éã®ã¿ã§ãã</p> +</div> + +<p>UA æåå㧠<code><var>platform</var></code> ã®éšåã¯ã Firefox ãæºåž¯é»è©±ãµã€ãºãŸãã¯ã¿ãã¬ããã®æ©åšã§åäœããŠãããã瀺ããŸããæºåž¯é»è©±ãã©ãŒã ãã¡ã¯ã¿ãŒã®æ©åšã§ Firefox ãåäœããŠããå Žåã¯ã <code>Mobile;</code> ãšããããŒã¯ã³ã UA æåå㧠<code><var>platform</var></code> ã®éšåã«çŸããŸããäžæ¹ã¿ãã¬ããæ©åšã§ Firefox ãåäœããŠããå Žåã¯ã <code>Tablet;</code> ãšããããŒã¯ã³ã UA æåå㧠<code><var>platform</var></code> ã®éšåã«çŸããŸããäŸãã°:</p> + +<pre>Mozilla/5.0 (Android 4.4; <strong>Mobile</strong>; rv:41.0) Gecko/41.0 Firefox/41.0 +Mozilla/5.0 (Android 4.4; <strong>Tablet</strong>; rv:41.0) Gecko/41.0 Firefox/41.0</pre> + +<div class="note">ããŒãžã§ã³çªå·ã¯éèŠã§ã¯ãããŸãããããŒãžã§ã³çªå·ãåºã«å€æããªãã§ãã ããã</div> + +<p>ããæ©åšã®ãã©ãŒã ãã¡ã¯ã¿ãŒåãã®ã³ã³ãã³ãã決ããããã«å¥œãŸããæ¹æ³ã¯ãCSS ã¡ãã£ã¢ã¯ãšãªã®äœ¿çšã§ãããããæ©åšã®ãã©ãŒã ãã¡ã¯ã¿ãŒã®å¯Ÿè±¡ã³ã³ãã³ãã決ããããã« UA ã¹ãããã£ã³ã°ãçšããŠããå Žåã¯ãæºåž¯é»è©±ãã©ãŒã ãã¡ã¯ã¿ãŒã§ã¯ <strong>Mobi</strong> (Opera Mobile ã "Mobile" ã§ã¯ãªã "Mobi" ãšè¡šèšãããã) ãæ€çŽ¢ããããã«ããŠã"Android" ãšæ©åšã®ãã©ãŒã ãã¡ã¯ã¿ãŒã«å¯Ÿå¿é¢é£ããããšã¯<strong>èããªã</strong>ããã«ããŠãã ãããããããããšã§ Firefox ãä»ã®æºåž¯é»è©±ãã¿ãã¬ããã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã åãã«å
¬éããå Žåã Android ãã©ããããã PC ã«äœ¿çšãããå Žåã§ãã³ãŒããåäœããŸãããŸããã¿ãã察å¿ç«¯æ«ãæ€åºããã«ã¯ "Mobi" ã "Tablet" ãæ€çŽ¢ããã®ã§ã¯ãªããã¿ããæ©èœãæ€åºããŠãã ãããã¿ãã¬ããã§ã¯ãªãã¿ãã察å¿ç«¯æ«ã®å ŽåããããŸãã</p> + +<div class="note">Firefox OS 端æ«ã§ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã瀺ãéšåããªã圢åŒãšãªããŸã (äŸ: "Mozilla/5.0 (Mobile; rv:15.0) Gecko/15.0 Firefox/15.0")ãWeb ããã©ãããã©ãŒã ã§ãã</div> + +<h2 id="Windows" name="Windows">Windows</h2> + +<p>Windows ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãã«ã¯ä»¥äžã®ããªãšãŒã·ã§ã³ãããããã®äžã§ <em>x.y</em> 㯠Windows NT ã®ããŒãžã§ã³ãè¡šããŸã (äŸãã°ãWindows NT 6.1)ã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Windows ã®ããŒãžã§ã³</th> + <th scope="col">Gecko ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</th> + </tr> + </thead> + <tbody> + <tr> + <td>x86 CPU ã® Windows NT</td> + <td>Mozilla/5.0 (Windows NT <em>x</em>.<em>y</em>; rv:10.0) Gecko/20100101 Firefox/10.0</td> + </tr> + <tr> + <td>x64 CPU ã® Windows NT</td> + <td>Mozilla/5.0 (Windows NT <em>x</em>.<em>y</em>; Win64; x64; rv:10.0) Gecko/20100101 Firefox/10.0</td> + </tr> + </tbody> +</table> + +<h2 id="Macintosh" name="Macintosh">Macintosh</h2> + +<p>ãã㧠<em>x.y</em> 㯠Mac OS X ã®ããŒãžã§ã³ãè¡šããŸã (äŸãã°ãMac OS X 10.6)ã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Mac OS X ã®ããŒãžã§ã³</th> + <th scope="col">Gecko ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</th> + </tr> + </thead> + <tbody> + <tr> + <td>Intel x86 ãŸã㯠x86_64 ç°å¢ã® Mac OS X</td> + <td>Mozilla/5.0 (Macintosh; Intel Mac OS X <em>x.y</em>; rv:10.0) Gecko/20100101 Firefox/10.0</td> + </tr> + <tr> + <td>PowerPC ç°å¢ã® Mac OS X</td> + <td>Mozilla/5.0 (Macintosh; PPC Mac OS X <em>x.y</em>; rv:10.0) Gecko/20100101 Firefox/10.0</td> + </tr> + </tbody> +</table> + +<h2 id="Linux" name="Linux">Linux</h2> + +<p>Linux ã«ã¯å€æ§ãªãã©ãããã©ãŒã ãååšããŸãã Linux ãã£ã¹ããªãã¥ãŒã·ã§ã³ã«ãã£ãŠã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååãå€æŽããæ¡åŒµæ©èœãå«ãã§ããããšããããŸããããã€ãã®äžè¬çãªäŸã¯ä»¥äžã®ãšããã§ãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Linux ã®ããŒãžã§ã³</th> + <th scope="col">Gecko ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</th> + </tr> + </thead> + <tbody> + <tr> + <td>i686 CPU ã® Linux ãã¹ã¯ããã</td> + <td>Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0</td> + </tr> + <tr> + <td>x86_64 CPU ã® Linux ãã¹ã¯ããã</td> + <td>Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0</td> + </tr> + <tr> + <td>Nokia N900 Linux ã¢ãã€ã«ã® Fennec ãã©ãŠã¶ãŒ</td> + <td>Mozilla/5.0 (Maemo; Linux armv7l; rv:10.0) Gecko/20100101 Firefox/10.0 Fennec/10.0</td> + </tr> + </tbody> +</table> + +<h2 id="Android_version_40_and_below" name="Android_version_40_and_below">Android (ããŒãžã§ã³ 40 以äž)</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ãã©ãŒã ãã¡ã¯ã¿ãŒ</th> + <th scope="col">Gecko ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</th> + </tr> + </thead> + <tbody> + <tr> + <td>æºåž¯é»è©±</td> + <td>Mozilla/5.0 (Android; Mobile; rv:40.0) Gecko/40.0 Firefox/40.0</td> + </tr> + <tr> + <td>ã¿ãã¬ãã</td> + <td>Mozilla/5.0 (Android; Tablet; rv:40.0) Gecko/40.0 Firefox/40.0</td> + </tr> + <tr> + </tr> + </tbody> +</table> + +<h2 id="Android_version_41_and_above" name="Android_version_41_and_above">Android (ããŒãžã§ã³ 41 以é)</h2> + +<p>ããŒãžã§ã³ 41 以éã® Android ç Firefox ã§ã¯ <var>platform</var> ããŒã¯ã³ã« Android ããŒãžã§ã³ãå«ãŸããŸããçžäºéçšæ§åäžã®ããã Android 4 以åã®ããŒãžã§ã³ã§ãã©ãŠã¶ãŒãåäœããŠããå Žå㯠4.4 ãšåºåããŸãã Android ããŒãžã§ã³ 4 以éã§ã¯å®éã®ããŒãžã§ã³çªå·ãåºåãããŸãããªããGecko ãšã³ãžã³ã¯ãã¹ãŠã® Android ããŒãžã§ã³ã«å¯ŸããŠåãæ©èœãæäŸããŠããŸãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ãã©ãŒã ãã¡ã¯ã¿ãŒ</th> + <th scope="col">Gecko ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</th> + </tr> + </thead> + <tbody> + <tr> + <td>æºåž¯é»è©±</td> + <td>Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0</td> + </tr> + <tr> + <td>ã¿ãã¬ãã</td> + <td>Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0</td> + </tr> + </tbody> +</table> + +<h2 id="Focus_for_Android" name="Focus_for_Android">Focus for Android</h2> + +<p>ããŒãžã§ã³1ããã Focus 㯠Android WebView ã«ãã£ãŠå®çŸãããŠããã以äžã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååæžåŒã䜿çšããŠããŸãã</p> + +<pre>Mozilla/5.0 (Linux; <Android Version> <Build Tag etc.>) AppleWebKit/<WebKit Rev> (KHTML, like Gecko) Version/4.0 Focus/<focusversion> Chrome/<Chrome Rev> Mobile Safari/<WebKit Rev></pre> + +<p>ã¿ãã¬ããçã® WebView ã¯ã¢ãã€ã«çã®ãã©ãŒã§ããã <code>Mobile</code> ããŒã¯ã³ãå«ã¿ãŸããã</p> + +<p>ããŒãžã§ã³6ããããŠãŒã¶ãŒã GeckoView ããŒã¹ã® Focus for Android ãé ãèšå®ã§éžæã§ããããã«ãªã£ãŠããŸãã Gecko ãšã®äºææ§ã瀺ãããã GeckoView ã® UA æååã䜿çšããŸãã</p> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Focus Version (ã¬ã³ããªã³ã°ãšã³ãžã³)</th> + <th scope="col">ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</th> + </tr> + <tr> + <td>1.0 (WebView Mobile)</td> + <td>Mozilla/5.0 (Linux; Android 7.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/1.0 Chrome/59.0.3029.83 Mobile Safari/537.36</td> + </tr> + <tr> + <td>1.0 (WebView Tablet)</td> + <td>Mozilla/5.0 (Linux; Android 7.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/1.0 Chrome/59.0.3029.83 Safari/537.36</td> + </tr> + <tr> + <td>6.0 (GeckoView)</td> + <td>Mozilla/5.0 (Android 7.0; Mobile; rv:62.0) Gecko/62.0 Firefox/62.0</td> + </tr> + </tbody> +</table> + +<h2 id="Klar_for_Android">Klar for Android</h2> + +<p>ããŒãžã§ã³ 4.1 以éã Klar for Android 㯠<a href="#Focus_for_Android">Focus for Android</a> ãšåã UA æååã䜿çšããŸããããŒãžã§ã³ 4.1 ããåã§ã¯ã <var>Klar/<version></var> <var>product/version</var> ã®ããŒã¯ã³ãéã£ãŠããŸããã.</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Klar ããŒãžã§ã³ (ã¬ã³ããªã³ã°ãšã³ãžã³)</th> + <th scope="col">iOS ç Firefox ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</th> + </tr> + </thead> + <tbody> + <tr> + <td>1.0 (WebView)</td> + <td>Mozilla/5.0 (Linux; Android 7.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Klar/1.0 Chrome/58.0.3029.83 Mobile Safari/537.36</td> + </tr> + <tr> + <td>4.1+ (WebView)</td> + <td>Mozilla/5.0 (Linux; Android 7.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/4.1 Chrome/62.0.3029.83 Mobile Safari/537.36</td> + </tr> + <tr> + <td>6.0+ (GeckoView)</td> + <td>Mozilla/5.0 (Android 7.0; Mobile; rv:62.0) Gecko/62.0 Firefox/62.0</td> + </tr> + </tbody> +</table> + +<h2 id="Focus_for_iOS" name="Focus_for_iOS">Focus for iOS</h2> + +<p>Focus for iOS ã®ããŒãžã§ã³7ã¯ã以äžã®åœ¢åŒã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã䜿çšããŸãã</p> + +<pre>Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/7.0.4 Mobile/16B91 Safari/605.1.15</pre> + +<p>ã¡ã¢: ãã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå㯠iPhone XR ã·ãã¥ã¬ãŒã¿ãŒããååŸãããã®ã§ã端æ«ã«ãã£ãŠç°ãªããããããŸããã</p> + +<h2 id="Firefox_for_Fire_TV" name="Firefox_for_Fire_TV">Firefox for Fire TV</h2> + +<p>Firefox for Fire TV ã®ããŒãžã§ã³3 (ããã³ãã以åããããã) ã¯ã以äžã®æžåŒã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã䜿çšããŸãã</p> + +<pre>Mozilla/5.0 (Linux; <Android version>) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/<firefoxversion> Chrome/<Chrome Rev> Safari/<WebKit Rev></pre> + +<table class="standard-table"> + <tbody> + <tr> + <td><strong>Firefox TV ããŒãžã§ã³</strong></td> + <td><strong>ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</strong></td> + </tr> + <tr> + <td>v3.0</td> + <td>Mozilla/5.0 (Linux; Android 7.1.2) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/3.0 Chrome/59.0.3017.125 Safari/537.36</td> + </tr> + </tbody> +</table> + +<h2 id="Firefox_for_Echo_Show" name="Firefox_for_Echo_Show">Firefox for Echo Show</h2> + +<p>Firefox for Echo Show ã¯ããŒãžã§ã³1.1ããã以äžã®æžåŒã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã䜿çšããŠããŸãã</p> + +<pre>Mozilla/5.0 (Linux; <Android version>) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/<firefoxversion> Chrome/<Chrome Rev> Safari/<WebKit Rev> +</pre> + +<table class="standard-table"> + <tbody> + <tr> + <td><strong>Firefox for Echo Show ããŒãžã§ã³</strong></td> + <td><strong>ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</strong></td> + </tr> + <tr> + <td>v1.1</td> + <td>Mozilla/5.0 (Linux; Android 5.1.1) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/1.1 Chrome/59.0.3017.125 Safari/537.36</td> + </tr> + </tbody> +</table> + +<h2 id="Firefox_OS" name="Firefox_OS">Firefox OS</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ãã©ãŒã ãã¡ã¯ã¿ãŒ</th> + <th scope="col">Gecko ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</th> + </tr> + <tr> + <td>æºåž¯é»è©±</td> + <td>Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0</td> + </tr> + <tr> + <td>ã¿ãã¬ãã</td> + <td>Mozilla/5.0 (Tablet; rv:26.0) Gecko/26.0 Firefox/26.0</td> + </tr> + <tr> + <td>ãã¬ã</td> + <td>Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0</td> + </tr> + <tr> + <td>端æ«ç¹æ</td> + <td>Mozilla/5.0 (Mobile; <em><strong>nnnn;</strong></em> rv:26.0) Gecko/26.0 Firefox/26.0</td> + </tr> + </tbody> +</table> + +<h3 id="Device-specific_user_agent_strings" name="Device-specific_user_agent_strings">端æ«ç¹æã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</h3> + +<p>Mozilla ã¯<strong>匷ãå察</strong>ããŠããŸãããæ®å¿µãªããäžéšã®æ©åšã¡ãŒã«ãŒã¯ç«¯æ«ã® ID ãè¡šãããŒã¯ã³ãããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã«å«ããŠããŸããããã«åœãŠã¯ãŸãå Žå㯠Firefox OS ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååããååºã®è¡šã§ç€ºããããã«ç«¯æ«ç¹æã®æååã«ãªããŸãã <em><strong>nnnn;</strong></em> ãã端æ«ã瀺ãã¡ãŒã«ãŒã®ã³ãŒãã§ã (<a href="https://wiki.mozilla.org/B2G/User_Agent/Device_Model_Inclusion_Requirements">ã¬ã€ãã©ã€ã³</a>ãã芧ãã ãã)ãç§ãã¡ã¯ "<strong>NexusOne;</strong>", "<strong>ZTEOpen;</strong>", "<strong>Open C;</strong>" ãªã©ãèŠã€ããŸãã (空çœãå
¥ããããšãéæšå¥šã§ã)ããŠãŒã¶ãŒãšãŒãžã§ã³ãæ€åºã®ããžãã¯ãæ¯æŽããããã«ãã®æ
å ±ãæäŸããŸããã Mozilla ã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã§ç«¯æ« ID ãæ€åºããããšãæšå¥šããŸããã</p> + +<p>ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã«ç«¯æ« ID ãæã€å Žåãå«ããã¹ãŠã®ã¢ãã€ã«ç«¯æ«ãæ€åºããã§ããããJavaScript ã®æ£èŠè¡šçŸã¯ä»¥äžã®ãšããã§ãã</p> + +<pre>/mobi/i</pre> + +<p><code>i</code> ã¯å€§æåã»å°æåãåºå¥ããªãããšã瀺ãã <code>mobi</code> ããã¹ãŠã®ã¢ãã€ã«ãã©ãŠã¶ãŒã«äžèŽããŸãã</p> + +<h3 id="Firefox_OS_version_number" name="Firefox_OS_version_number">Firefox OS ã®ããŒãžã§ã³çªå·</h3> + +<p>Firefox OS ã®ããŒãžã§ã³çªå·ã¯ UA æååã«å«ãŸããŸãããã UA æååã«ã¯ Gecko ã®ããŒãžã§ã³ããããŒãžã§ã³æ
å ±ãç¹å®ããããšãã§ããŸãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Firefox OS ã®ããŒãžã§ã³çªå·</th> + <th scope="col">Gecko ã®ããŒãžã§ã³çªå·</th> + </tr> + </thead> + <tbody> + <tr> + <td>1.0.1</td> + <td>18.0</td> + </tr> + <tr> + <td>1.1</td> + <td>18.1</td> + </tr> + <tr> + <td>1.2</td> + <td>26.0</td> + </tr> + <tr> + <td>1.3</td> + <td>28.0</td> + </tr> + <tr> + <td>1.4</td> + <td>30.0</td> + </tr> + <tr> + <td>2.0</td> + <td>32.0</td> + </tr> + <tr> + <td>2.1</td> + <td>34.0</td> + </tr> + <tr> + <td>2.2</td> + <td>37</td> + </tr> + <tr> + <td>2.5</td> + <td>44</td> + </tr> + </tbody> +</table> + +<div class="note"> +<p>ãã®å¯Ÿå¿é¢ä¿ã¯ <a href="https://hg.mozilla.org/releases">Mercurial ãªããžããªå</a>ãã容æã«å€æã§ããŸãã<code>mozilla-b2g</code> ã§å§ãŸããªããžããªã Firefox OS ã®ãªãªãŒã¹ãªããžããªã§ãããFirefox OS ãš Gecko ã®äž¡ããŒãžã§ã³ããã®ååã«å«ãŸããŠããŸãã</p> +</div> + +<p>Firefox OS ã®ããŒãžã§ã³çªå·ã¯ 4 ã€ã®æ°åããããŸã: <samp>X.X.X.Y</samp>. å§ãã® 2 ã€ã®æ°å㯠Mozilla ã®è£œåããŒã ã管çããŠãããæ°æ©èœã䌎ãããŒãžã§ã³ãè¡šããŸã (äŸ: v1.1ã1.2 ãªã©)ã3 çªç®ã®çªå·ã¯ã»ãã¥ãªãã£æŽæ°åãã®å®æçãªããŒãžã§ã³ã®èå¥ (æ倧 6 é±éããš) ãšããŠå¢ããŠãããŸãã4 çªç®ã®çªå·ã¯ OEM ã管çããŸãã</p> + +<h2 id="iOS">iOS</h2> + +<p>iOS çã® Firefox ã§ã¯æ¢å®ã® Mobile Safari ã® UA æååã« <strong>FxiOS/<version></strong> ããŒã¯ã³ãè¿œå ãããã®ã«ãªããŸãããã㯠<a href="https://developer.chrome.com/multidevice/user-agent#chrome_for_ios_user_agent">Chrome for iOS ã® UA å®çŸ©ãšåã圢åŒã§ã</a>ã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ãã©ãŒã ãã¡ã¯ã¿ãŒ</th> + <th scope="col">iOS ç Firefox ã®ãŠãŒã¶ãšãŒãžã§ã³ãæåå</th> + </tr> + </thead> + <tbody> + <tr> + <td>iPod</td> + <td>Mozilla/5.0 (iPod touch; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) <strong>FxiOS/1.0</strong> Mobile/12F69 Safari/600.1.4</td> + </tr> + <tr> + <td>iPhone</td> + <td>Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) <strong>FxiOS/1.0</strong> Mobile/12F69 Safari/600.1.4</td> + </tr> + <tr> + <td>iPad</td> + <td>Mozilla/5.0 (iPad; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) <strong>FxiOS/1.0</strong> Mobile/12F69 Safari/600.1.4</td> + </tr> + </tbody> +</table> + +<h2 id="Firefox_Web_Runtime">Firefox Web Runtime</h2> + +<p>Web Runtime ã¯ãã¹ã¯ãããç Firefox ãšåããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã䜿ããŸãã</p> + +<h2 id="Other_Gecko-based_browsers" name="Other_Gecko-based_browsers">ãã®ä»ã® Gecko ããŒã¹ã®ãã©ãŠã¶ãŒ</h2> + +<p>以äžã¯ãããŸããŸãªãã©ãããã©ãŒã ã® Gecko ããŒã¹ã®ãã©ãŠã¶ãŒã«ããã UA æååã®äžäŸã§ãããããã®å€ãã¯ãŸã Gecko 2.0 ããŒã¹ã§å
¬éãããŠããªãããšã«æ³šæããŠãã ãã!</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ãã©ãŠã¶ãŒ</th> + <th scope="col">Gecko ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå</th> + </tr> + </thead> + <tbody> + <tr> + <td>Maemo ç Firefox (Nokia N900)</td> + <td>Mozilla/5.0 (Maemo; Linux armv7l; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 Fennec/10.0.1</td> + </tr> + <tr> + <td>Mac ç Camino</td> + <td>Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Camino/2.2.1</td> + </tr> + <tr> + <td>Windows ç SeaMonkey</td> + <td>Mozilla/5.0 (Windows NT 5.2; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1</td> + </tr> + <tr> + <td>Mac ç SeaMonkey</td> + <td>Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1</td> + </tr> + <tr> + <td>Linux ç SeaMonkey</td> + <td>Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1</td> + </tr> + </tbody> +</table> + +<h2 id="Implementation_notes_for_applications.2C_vendors.2C_and_extensions" name="Implementation_notes_for_applications.2C_vendors.2C_and_extensions"><span><span id="implementation">ã¢ããªã±ãŒã·ã§ã³ããã³ããŒãæ¡åŒµåãã®å®è£
äžã®æ³šæ</span></span></h2> + +<p>Firefox 4 ããã³ Gecko 2.0 以åã§ã¯ãæ¡åŒµæ©èœãèšå®é
ç® <code>general.useragent.extra.<em>identifier</em></code> ãéããŠãŠãŒã¶ãŒãšãŒãžã§ã³ãæååãè¿œå ããããšãã§ããŸãã (<a href="/ja/docs/User_Agent_Strings_Reference" title="User_Agent_Strings_Reference">ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååã®æ§çãªãã¡ã¬ã³ã¹</a> ãã芧ãã ããããããããã㯠{{Bug(581008)}} ã«ããäžå¯èœã«ãªããŸããã</p> + +<p>以åã¯ç¹å®ã®ãã©ã°ã€ã³ã»ã¢ããªã³ã»æ¡åŒµæ©èœããèªèº«ãã€ã³ã¹ããŒã«ãããŠããããšãç¥ãããããã«ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååãè¿œå ããŠããŸãããçŸåšããããåŸãå¿
èŠã§ããå Žåã«æšå¥šãããæ¹æ³ (ãã¹ãŠã®èŠæ±ãé
ããªãããšã«çæããŠãã ãã) ã¯ã<a href="/ja/docs/Setting_HTTP_request_headers" title="Setting_HTTP_request_headers">ã«ã¹ã¿ã HTTP ããããèšå®ããããš</a> ã§ãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="http://lawrencemandel.com/2012/07/27/decision-made-firefox-os-user-agent-string/">Firefox OS User Agent String</a> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=777710" title="https://bugzilla.mozilla.org/show_bug.cgi?id=777710">bug 777710</a> ã«èšåããããã°æçš¿)</li> + <li><a class="external" href="https://hacks.mozilla.org/2010/09/final-user-agent-string-for-firefox-4/">Final User Agent string for Firefox 4</a> (ããã°èšäº)</li> + <li><a href="/ja/docs/Browser_Detection_and_Cross_Browser_Support" title="Browser_Detection_and_Cross_Browser_Support">ã¯ãã¹ãã©ãŠã¶ãŒã§ UA æååã®ã¹ãããã£ã³ã°ããµããŒããã</a> ããã®æšå¥šäºé
</li> + <li><a href="/ja/docs/Web/API/window.navigator.userAgent">window.navigator.userAgent</a></li> + <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1169772">Add Android version to Fennec UA String (bug 1169772)</a></li> +</ul> + +<hr> +<p><a class="link-news" href="news://news.mozilla.org/netscape.public.mozilla.netlib">mozilla.dev.platform</a> ãžã®ã³ã¡ã³ã</p> diff --git a/files/ja/web/http/headers/user-agent/index.html b/files/ja/web/http/headers/user-agent/index.html new file mode 100644 index 0000000000..65579ff9fc --- /dev/null +++ b/files/ja/web/http/headers/user-agent/index.html @@ -0,0 +1,148 @@ +--- +title: User-Agent +slug: Web/HTTP/Headers/User-Agent +tags: + - HTTP + - HTTP Header + - HTTP ããã㌠+ - Reference + - User-agent +translation_of: Web/HTTP/Headers/User-Agent +--- +<div>{{HTTPSidebar}}</div> + +<p><strong>User-Agent</strong> {{Glossary("request header", "ãªã¯ãšã¹ãããããŒ")}}ã¯ããµãŒããŒããããã¯ãŒã¯ãã¢ãã¢ããªã±ãŒã·ã§ã³ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ããã³ããŒãããªã¯ãšã¹ãããŠãã{{Glossary("user agent", "ãŠãŒã¶ãŒãšãŒãžã§ã³ã")}}ã®ããŒãžã§ã³çãèå¥ã§ããããã«ããç¹æ§æååã§ãã</p> + +<div class="blockIndicator warning"> +<p>ãã©ãŠã¶ãŒã«ãã£ãŠç°ãªããŠã§ãããŒãžããµãŒãã¹ãæäŸããããšããéåžžã¯æªãèãã§ããçç±ã«ã€ããŠã¯ã<a href="/ja/docs/Web/HTTP/Browser_detection_using_the_user_agent">ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååãçšãããã©ãŠã¶ãŒã®å€å®</a>ããèªã¿ãã ããã</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">User-Agent: <product> / <product-version> <comment></pre> + +<p>ãŠã§ããã©ãŠã¶ãŒã§ããããæžåŒã¯ä»¥äžã®ãããªãã®ã§ãã</p> + +<pre class="syntaxbox notranslate">User-Agent: Mozilla/5.0 (<system-information>) <platform> (<platform-details>) <extensions></pre> + +<h3 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h3> + +<dl> + <dt><code><product></code></dt> + <dd>補åã®èå¥åã§ããååãŸãã¯éçºã³ãŒãããŒã ã§ãã</dd> + <dt><code><product-version></code></dt> + <dd>補åã®ããŒãžã§ã³çªå·ã§ãã</dd> + <dt><code><comment></code></dt> + <dd>ãŒãå以äžã®ã³ã¡ã³ãã§ããµã補åæ
å ±ãªã©ããã詳现ãªæ
å ±ãå«ã¿ãŸãã</dd> +</dl> + +<h2 id="Firefox_UA_string" name="Firefox_UA_string">Firefox ã® UA æåå</h2> + +<p>Firefox ã Gecko ããŒã¹ã®ãŠãŒã¶ãšãŒãžã§ã³ãæååã®è©³çŽ°ã«ã€ããŠã¯ã <a href="/ja/docs/Web/HTTP/Headers/User-Agent/Firefox">Firefox ã®ãŠãŒã¶ãšãŒãžã§ã³ãæååãªãã¡ã¬ã³ã¹</a>ãåç
§ããŠãã ããã Firefox ã® UA æååã¯4ã€ã®éšåã«å解ãããŸãã</p> + +<pre class="notranslate">Mozilla/5.0 (<strong><em>platform</em></strong>; rv:<strong><em>geckoversion</em></strong>) Gecko/<strong><em>geckotrail</em></strong> Firefox/<strong><em>firefoxversion</em></strong></pre> + +<ol> + <li><code>Mozilla/5.0</code> ã¯ã Mozilla ãšäºææ§ããããã©ãŠã¶ãŒã§ãããšããããšã瀺ãäžè¬çãªããŒã¯ã³ã§ãçŸåšã¯ã»ãŒãã¹ãŠã®ãã©ãŠã¶ãŒã§å
±éã§ãã</li> + <li><strong><em>platform</em></strong> ã¯ããã©ãŠã¶ãŒãåäœããŠãããã©ãããã©ãŒã (Windows, Mac, Linux, Android ãªã©)ãããã³ã¢ãã€ã«ç«¯æ«ãã©ããã瀺ããŸãã {{Glossary("Firefox OS")}} ã®ã¹ããŒããã©ã³ã¯ãŠã§ããã©ãããã©ãŒã ãªã®ã§ã <code>Mobile</code> ã ãã§ãã <strong><em>platform</em></strong> ãè€æ°ã® "<code>; </code>" ãšããåºåãããæã£ãŠããããšã«çæããŠãã ãããåŸè¿°ã®è©³çŽ°ãšäŸã䜵ããŠã芧ãã ããã</li> + <li><strong>rv:<em>geckoversion</em></strong> 㯠Gecko ã®ãªãªãŒã¹ããŒãžã§ã³ã§ã ("<em>17.0</em>" ãªã©)ãæè¿ã®ãã©ãŠã¶ãŒã® <strong><em>geckoversion</em></strong> 㯠<strong><em>firefoxversion</em></strong> ãšåãã§ãã</li> + <li><strong><em>Gecko/geckotrail</em></strong> ã¯ããã©ãŠã¶ãŒã <a href="/ja/docs/Mozilla/Gecko">Gecko</a> ãåºã«ããŠããããšã瀺ããŸãã (ãã¹ã¯ãããã§ã¯ã <em><strong>geckotrail</strong></em> ã¯åžžã« <code>20100101</code> ã®åºå®æååã§ãã)</li> + <li><em><strong>Firefox/firefoxversion</strong></em> ã¯ããã©ãŠã¶ãŒã Firefox ã§ããããšããŸããã®ããŒãžã§ã³ ("<em>17.0</em>" ãªã©) ã瀺ããŠããŸãã</li> +</ol> + +<h3 id="Examples" name="Examples">äŸ</h3> + +<pre class="no-line-numbers notranslate">Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 +Mozilla/5.0 (Macintosh; Intel Mac OS X <em>x.y</em>; rv:42.0) Gecko/20100101 Firefox/42.0 +</pre> + +<h2 id="Chrome_UA_string" name="Chrome_UA_string">Chrome ã® UA æåå</h2> + +<p>Chrome (ãŸã㯠Chromium/Blink ããŒã¹ã®ãšã³ãžã³) ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãæåå㯠Firefox ã®ãã®ãšäŒŒãŠããŸããäºææ§ã®ããã <code>KHTML, like Gecko</code> ã <code>Safari</code> ã®ãããªæååãè¿œå ãããŠããŸãã</p> + +<h3 id="Examples_2" name="Examples_2">äŸ</h3> + +<pre class="no-line-numbers notranslate">Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36</pre> + +<h2 id="Opera_UA_string" name="Opera_UA_string">Opera ã® UA æåå</h2> + +<p>Opera ãã©ãŠã¶ãŒã Blink ãšã³ãžã³ã«åºã¥ããŠããã®ã§ã倧éšåã¯åãã§ããã <code>"OPR/<version>"</code> ãè¿œå ããŸãã</p> + +<h3 id="Examples_3" name="Examples_3">äŸ</h3> + +<pre class="no-line-numbers notranslate">Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 OPR/38.0.2220.41</pre> + +<p>å€ã Presto ããŒã¹ã® Opera ã®ãªãªãŒã¹ã¯ã次ã®ãã®ã䜿çšããŠããŸããã</p> + +<pre class="no-line-numbers notranslate">Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.15 Version/10.00 +Opera/9.60 (Windows NT 6.0; U; en) Presto/2.1.1</pre> + +<h2 id="Safari_UA_string" name="Safari_UA_string">Safari ã® UA æåå</h2> + +<p>ãã®äŸã§ã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ãæååã¯ã¢ãã€ã« Safari ã®ãã®ã§ãããã㯠<code>Mobile</code> ãšããèªãå«ãã§ããŸãã</p> + +<h3 id="Examples_4" name="Examples_4">äŸ</h3> + +<pre class="no-line-numbers notranslate">Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1</pre> + +<h2 id="Internet_Explorer_UA_string" name="Internet_Explorer_UA_string">Internet Explorer ã® UA æåå</h2> + +<h3 id="Examples_5" name="Examples_5">äŸ</h3> + +<pre class="no-line-numbers notranslate">Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)</pre> + +<h2 id="Crawler_and_bot_UA_strings" name="Crawler_and_bot_UA_strings">ã¯ããŒã©ãŒããããã® UA æåå</h2> + +<h3 id="Examples_6" name="Examples_6">äŸ</h3> + +<pre class="no-line-numbers notranslate">Googlebot/2.1 (+http://www.google.com/bot.html)</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC(7231, "User-Agent", "5.5.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + <tr> + <td>{{RFC(2616, "User-Agent", "14.43")}}</td> + <td>Hypertext Transfer Protocol -- HTTP/1.1</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.User-Agent")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="https://hacks.mozilla.org/2013/09/user-agent-detection-history-and-checklist/">User-Agent detection, history and checklist</a></li> + <li><a href="/ja/docs/Web/HTTP/Headers/User-Agent/Firefox">Firefox ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååãªãã¡ã¬ã³ã¹</a></li> + <li> + <p><a href="/ja/docs/Web/HTTP/Browser_detection_using_the_user_agent">ãŠãŒã¶ãŒãšãŒãžã§ã³ãæååãçšãããã©ãŠã¶ãŒã®å€å®</a></p> + </li> +</ul> diff --git a/files/ja/web/http/headers/vary/index.html b/files/ja/web/http/headers/vary/index.html new file mode 100644 index 0000000000..9847ca58c0 --- /dev/null +++ b/files/ja/web/http/headers/vary/index.html @@ -0,0 +1,90 @@ +--- +title: Vary +slug: Web/HTTP/Headers/Vary +tags: + - HTTP + - Reference + - ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã¹ãã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/Vary +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>Vary</code></strong> HTTP ã¬ã¹ãã³ã¹ããããŒã¯ããªãªãžã³ã®ãµãŒããŒããæ°ããèŠæ±ããã®ã§ã¯ãªãããã£ãã·ã¥ãããã¬ã¹ãã³ã¹ã䜿çšã§ãããã©ããã決å®ããããã«å°æ¥ã®ãªã¯ãšã¹ãããããŒãã©ã®ããã«äžèŽããããã決å®ããŸããããã¯ã<a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a>ã¢ã«ãŽãªãºã ã§ãªãœãŒã¹ã®è¡šçŸãéžæãããšãã«ã©ã®ããããŒã䜿çšãããã瀺ãããã«ãµãŒããŒã«ãã£ãŠäœ¿çšãããŸãã</p> + +<p><code>Vary</code> ããããŒã¯ {{HTTPStatus("200")}} <code>OK</code> ã¬ã¹ãã³ã¹ã«èšå®ãããã®ãšåæ§ã«ã {{HTTPStatus("304")}} <code>Not Modified</code> ã«ãèšå®ãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Vary: * +Vary: <header-name>, <header-name>, ... +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt>*</dt> + <dd>URL ã®ããã®åãªã¯ãšã¹ãã¯ãåºæã§ãã£ãã·ã¥äžå¯èœãªãªã¯ãšã¹ããšããŠæ±ããããšä»®å®ãããŸããããã瀺ãã®ã«ã¯ {{HTTPHeader("Cache-Control")}}: <code>no-store</code> ã䜿çšããã»ããè¯ãããã¡ãã¯ããæ確ã«èªãããšãã§ãããªããžã§ã¯ããä¿åãããªãããšã瀺ããŸãã</dd> + <dt><header-name></dt> + <dd>ã³ã³ãåºåãã§ããã£ãã·ã¥ãããã¬ã¹ãã³ã¹ã䜿çšããããã©ããã決å®ããéã«é¢ããããããŒåã®ãªã¹ãã§ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Dynamic_serving" name="Dynamic_serving">åçãªæäŸ</h3> + +<p><code>Vary: User-Agent</code> ããããŒã䜿çšããããšãããã£ãã·ã¥ãµãŒããŒã¯ãã£ãã·ã¥ããããŒãžãæäŸãããã©ããã決å®ããéã«ãŠãŒã¶ãŒãšãŒãžã§ã³ããèæ
®ããã¹ãã§ããäŸãã°ãã¢ãã€ã«ãŠãŒã¶ãŒã«å¯ŸããŠç°ãªãã³ã³ãã³ããæäŸããŠããã®ã§ããã°ã誀ã£ãŠãµã€ãã®ãã¹ã¯ãããçã®ãµã€ããã¢ãã€ã«ãŠãŒã¶ãŒã«å¯ŸããŠæäŸããŠããŸãããšãé²ãã®ã«åœ¹ç«ã¡ãŸãããã㯠Google çã®æ€çŽ¢ãšã³ãžã³ãããŒãžã®ã¢ãã€ã«çãçºèŠããã®ã«åœ¹ç«ã¡ã <a href="https://en.wikipedia.org/wiki/Cloaking">Cloaking</a> ãæ±ããã«åºå¥ããããšãã§ããå¯èœæ§ããããŸãã</p> + +<pre>Vary: User-Agent</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Vary", "7.1.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Vary")}}</p> + +<h2 id="Compatibility_notes" name="Compatibility_notes">äºææ§ã¡ã¢</h2> + +<ul> + <li><a href="https://blogs.msdn.microsoft.com/ieinternals/2009/06/17/vary-with-care/">Vary with care â Vary header problems in IE6-9</a></li> +</ul> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="https://www.smashingmagazine.com/2017/11/understanding-vary-header/">Understanding The Vary Header - Smashing Magazine</a></li> + <li><a href="https://www.fastly.com/blog/best-practices-for-using-the-vary-header">Best Practices for Using the Vary Header â fastly.com</a></li> + <li><a href="https://developer.mozilla.org/docs/Web/HTTP/Content_negotiation">Content negotiation</a></li> +</ul> diff --git a/files/ja/web/http/headers/via/index.html b/files/ja/web/http/headers/via/index.html new file mode 100644 index 0000000000..fb057eb094 --- /dev/null +++ b/files/ja/web/http/headers/via/index.html @@ -0,0 +1,76 @@ +--- +title: Via +slug: Web/HTTP/Headers/Via +translation_of: Web/HTTP/Headers/Via +--- +<div>{{HTTPSidebar}}</div> + +<p>äžè¬ããããŒã®<code><strong>Via</strong></code> ã¯ããã©ã¯ãŒããããã·ãšãªããŒã¹ãããã·ã®äž¡æ¹ã®ãããã·ã«ãã£ãŠè¿œå ããããªã¯ãšã¹ãããããŒãšã¬ã¹ãã³ã¹ããããŒã«è¡šç€ºãããŸãã ã¡ãã»ãŒãžè»¢éã®è¿œè·¡ãèŠæ±ã«ãŒãã®åé¿ãããã³èŠæ±/å¿çãã§ãŒã³ã«æ²¿ã£ãéä¿¡è
ã®ãããã³ã«æ©èœã®èå¥ã«äœ¿çšãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("General header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>yes</td> + </tr> + </tbody> +</table> + +<h2 id="æ§æ">æ§æ</h2> + +<pre class="syntaxbox">Via: [ <protocol-name> "/" ] <protocol-version> <host> [ ":" <port> ] +or +Via: [ <protocol-name> "/" ] <protocol-version> <pseudonym> +</pre> + +<h2 id="ãã£ã¬ã¯ãã£ã">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><protocol-name></dt> + <dd>ãªãã·ã§ã³ã"HTTP"ãªã©ã䜿çšãããããã³ã«åã</dd> + <dt><protocol-version></dt> + <dd>"1.1"ãªã©ã䜿çšãããŠãããããã³ã«ã®ããŒãžã§ã³ã</dd> + <dt><host> and <port></dt> + <dd>ãããªãã¯ãããã·ã®URLãšããŒãã</dd> + <dt><pseudonym></dt> + <dd>å
éšãããã·ã®åå/ãšã€ãªã¢ã¹ã</dd> +</dl> + +<h2 id="äŸ">äŸ</h2> + +<pre>Via: 1.1 vegur +Via: HTTP/1.1 GWA +Via: 1.0 fred, 1.1 p.example.net +</pre> + +<h2 id="ä»æ§æž">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Title</th> + </tr> + <tr> + <td>{{RFC("7230", "Via", "5.7.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºæ">ãã©ãŠã¶ã®äºæ</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("http.headers.Via")}}</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("X-Forwarded-For")}}</li> + <li><a href="https://github.com/heroku/vegur">Heroku's proxy library Vegur</a></li> +</ul> diff --git a/files/ja/web/http/headers/warning/index.html b/files/ja/web/http/headers/warning/index.html new file mode 100644 index 0000000000..f96db11fe6 --- /dev/null +++ b/files/ja/web/http/headers/warning/index.html @@ -0,0 +1,146 @@ +--- +title: Warning +slug: Web/HTTP/Headers/Warning +tags: + - General Header + - HTTP + - Reference + - header +translation_of: Web/HTTP/Headers/Warning +--- +<div>{{HTTPSidebar}}</div> + +<div class="blockIndicator note"> +<p><strong>ã¡ã¢</strong>: <code>Warning</code> ããããŒã¯ãŸããªãéæšå¥šã«ãªãäºå®ã§ãã詳ãã㯠<a href="https://github.com/httpwg/http-core/issues/139">Warning (https://github.com/httpwg/http-core/issues/139)</a> ã <a href="https://github.com/whatwg/fetch/issues/913">Warning: header & stale-while-revalidate (https://github.com/whatwg/fetch/issues/913)</a> ãã芧ãã ããã</p> +</div> + +<p><strong><code>Warning</code></strong> 㯠HTTP ã®äžè¬ããããŒã§ãå¯èœæ§ã®ããåé¡ã«ã€ããŠã¡ãã»ãŒãžã®ã¹ããŒã¿ã¹ã«ããæ
å ±ãå«ã¿ãŸããäžã€ã®ã¬ã¹ãã³ã¹ã«è€æ°ã® <code>Warning</code> ããããŒãå«ãŸããå¯èœæ§ããããŸãã</p> + +<p><code>Warning</code> ããããŒãã£ãŒã«ãã¯äžè¬çã«ããããã¡ãã»ãŒãžã«é©çšã§ããŸãããäžéšã®èŠåã³ãŒãã¯ãã£ãã·ã¥å°çšã§ãããã¬ã¹ãã³ã¹ã¡ãã»ãŒãžã®ã¿ã«é©çšããããšãã§ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("General header", "äžè¬ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">Warning: <warn-code> <warn-agent> <warn-text> [<warn-date>] +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><warn-code></dt> + <dd>3æ¡ã®èŠåçªå·ã§ããæåã®æ¡ã¯ãæ€èšŒåŸã«ã¬ã¹ãã³ã¹ãæ ŒçŽããéã« <code>Warning</code> ãåé€ããå¿
èŠããããã©ããã瀺ããŸãã + <ul> + <li><code>1xx</code> ã®èŠåã³ãŒãã¯ãæ°é®®ããã¬ã¹ãã³ã¹ã®æ€èšŒã¹ããŒã¿ã¹ãè¡šãããã£ãã·ã¥ãããéã«åé€ãããŸãã</li> + <li> + <p><code>2xx</code> ã®èŠåã³ãŒãã¯ãæ€èšŒã«ãã£ãŠä¿®æ£ãããªãè¡šçŸã®ããã€ãã®åŽé¢ã説æããŠãããã¬ã¹ãã³ã¹å
šäœãéä¿¡ãããªãéããæ€èšŒåŸããã£ãã·ã¥ã«ãã£ãŠåé€ãããªãããšãè¡šããŸãã</p> + </li> + </ul> + </dd> + <dt><warn-agent></dt> + <dd> + <p><code>Warning</code> ããããŒãè¿œå ãããµãŒããŒããœãããŠã§ã¢ã®ååãŸãã¯ä»®åã§ã (ãšãŒãžã§ã³ããäžæãªå Žå㯠"-" ã«ãªãããšããããŸã)ã</p> + </dd> + <dt><warn-text></dt> + <dd>ãšã©ãŒã説æããå©èšã®ããã¹ãã§ãã</dd> + <dt><warn-date></dt> + <dd>ä»»æãè€æ°ã® <code>Warning</code> ããããŒãéä¿¡ãããå Žåã¯ã {{HTTPHeader("Date")}} ããããŒãšäžèŽããæ¥ä»ãå
¥ããŠãã ããã</dd> +</dl> + +<h2 id="Warning_codes" name="Warning_codes">èŠåã³ãŒã</h2> + +<p><a href="http://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes registry at iana.org</a> ã§ã¯ãèŠåã³ãŒãã®åå空éãå®çŸ©ããŠããŸãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ã³ãŒã</th> + <th scope="col">ããã¹ã</th> + <th scope="col">説æ</th> + </tr> + </thead> + <tbody> + <tr> + <td>110</td> + <td>Response is Stale</td> + <td>ãã£ãã·ã¥ã«ãã£ãŠæäŸãããã¬ã¹ãã³ã¹ãå€ããªã£ãŠãã (æå¹æéãåããŠãã)ã</td> + </tr> + <tr> + <td>111</td> + <td>Revalidation Failed</td> + <td>ãµãŒããŒãžå°éã§ããªãã£ããããã¬ã¹ãã³ã¹ã®æ€èšŒãããããšããŠå€±æããã</td> + </tr> + <tr> + <td>112</td> + <td>Disconnected Operation</td> + <td>ãã£ãã·ã¥ããããã¯ãŒã¯ã®ä»ã®éšåããåæãããã</td> + </tr> + <tr> + <td>113</td> + <td>Heuristic Expiration</td> + <td>ãã£ãã·ã¥ã24æéããé·ãä¿ææéãéžæããŠããããã€ã¬ã¹ãã³ã¹ã®æéã24æéãããé·ãå Žåã</td> + </tr> + <tr> + <td>199</td> + <td>Miscellaneous Warning</td> + <td>ä»»æã§ç¹å®ãããŠããªãèŠå</td> + </tr> + <tr> + <td>214</td> + <td>Transformation Applied</td> + <td>ã³ã³ãã³ãã®ãšã³ã³ãŒãã£ã³ã°ãã¡ãã£ã¢çš®å¥ãªã©ãè¡šçŸæ¹æ³ã®å€æãè¡ã£ãå Žåã«ãããã·ãè¿œå ããŸãã</td> + </tr> + <tr> + <td>299</td> + <td>Miscellaneous Persistent Warning</td> + <td>199 ãšåæ§ã ããæ°žç¶çãªèŠåãå«ãå Žå</td> + </tr> + </tbody> +</table> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>Warning: 110 anderson/1.3.37 "Response is stale" + +Date: Wed, 21 Oct 2015 07:28:00 GMT +Warning: 112 - "cache down" "Wed, 21 Oct 2015 07:28:00 GMT" +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + <tr> + <td>{{RFC("7234", "Warning", "5.5")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Caching</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.Warning")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Date")}}</li> + <li><a href="/ja/docs/Web/HTTP/Status">HTTP response status codes</a></li> +</ul> diff --git a/files/ja/web/http/headers/www-authenticate/index.html b/files/ja/web/http/headers/www-authenticate/index.html new file mode 100644 index 0000000000..16213e54e1 --- /dev/null +++ b/files/ja/web/http/headers/www-authenticate/index.html @@ -0,0 +1,93 @@ +--- +title: WWW-Authenticate +slug: Web/HTTP/Headers/WWW-Authenticate +tags: + - HTTP + - HTTP ããã㌠+ - ããã㌠+ - ãªãã¡ã¬ã³ã¹ + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/WWW-Authenticate +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>WWW-Authenticate</code></strong> å¿çããããŒã¯ããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹æš©ãåŸãããã«äœ¿ãããèªèšŒæ¹æ³ãå®çŸ©ããŸãã</p> + +<p><code>WWW-Authenticate</code> ããããŒã¯ {{HTTPStatus("401")}} <code>Unauthorized</code> å¿çãšå
±ã«éãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "å¿çããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">WWW-Authenticate: <type> realm=<realm> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><type></dt> + <dd><a href="/ja/docs/Web/HTTP/Authentication#Authentication_schemes">èªèšŒã®çš®é¡</a>ãäžè¬çã«ã¯ <a href="/ja/docs/Web/HTTP/Authentication#Basic_authentication_scheme">"Basic"</a> ã§ãã IANA 㯠<a href="http://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">èªèšŒæ¹åŒã®äžèŠ§</a>ã管çããŠããŸãã</dd> + <dt>realm=<realm></dt> + <dd>ä¿è·é åã®èª¬æã§ãã realm ãæå®ãããŠããªãå Žåã¯ãã¯ã©ã€ã¢ã³ãã¯ããæžåŒåããããã¹ãåã代ããã«è¡šç€ºããŸãã</dd> + <dt>charset=<charset></dt> + <dd>ãŠãŒã¶ãŒåãšãã¹ã¯ãŒããéä¿¡ãããšãã®ãµãŒããŒãæšå¥šãããšã³ã³ãŒãã£ã³ã°æ¹åŒãã¯ã©ã€ã¢ã³ãã«äŒããŸãã倧æåå°æåã®åºå¥ãªãã®æåå "UTF-8" ã ããèš±å¯ãããŠããŸãããã㯠realm æååã®ãšã³ã³ãŒãã£ã³ã°ãšã¯é¢ä¿ããããŸããã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>éåžžã <code>WWW-Authenticate</code> ããããŒãå«ããµãŒããŒã®å¿çã¯ä»¥äžã®ãããªãã®ã§ãã</p> + +<pre>WWW-Authenticate: Basic + +WWW-Authenticate: Basic realm="Access to the staging site", charset="UTF-8" +</pre> + +<p>Apache ã nginx ãµãŒããŒã§ HTTP Basic èªèšŒã䜿çšããŠãµã€ããä¿è·ããæ¹æ³ã®äŸã«ã€ããŠã¯ã <a href="/ja/docs/Web/HTTP/Authentication">HTTP èªèšŒ</a> ãåç
§ããŠãã ããã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7235", "WWW-Authenticate", "4.1")}}</td> + <td>HTTP/1.1: Authentication</td> + </tr> + <tr> + <td>{{RFC("7617")}}</td> + <td>The 'Basic' HTTP Authentication Scheme</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååãããã®ã§ããã°ã <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.WWW-Authenticate")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Authentication">HTTP èªèšŒ</a></li> + <li>{{HTTPHeader("Authorization")}}</li> + <li>{{HTTPHeader("Proxy-Authorization")}}</li> + <li>{{HTTPHeader("Proxy-Authenticate")}}</li> + <li>{{HTTPStatus("401")}}, {{HTTPStatus("403")}}, {{HTTPStatus("407")}}</li> +</ul> diff --git a/files/ja/web/http/headers/x-content-type-options/index.html b/files/ja/web/http/headers/x-content-type-options/index.html new file mode 100644 index 0000000000..d5af6cf22d --- /dev/null +++ b/files/ja/web/http/headers/x-content-type-options/index.html @@ -0,0 +1,101 @@ +--- +title: X-Content-Type-Options +slug: Web/HTTP/Headers/X-Content-Type-Options +tags: + - HTTP + - HTTP ããã㌠+ - Reference + - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/X-Content-Type-Options +--- +<div>{{HTTPSidebar}}</div> + +<p><code><strong>X-Content-Type-Options</strong></code> 㯠HTTP ã®ã¬ã¹ãã³ã¹ããããŒã§ã {{HTTPHeader("Content-Type")}} ããããŒã§ç€ºããã <a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME ã¿ã€ã</a>ãå€æŽããã«åŸãã¹ãã§ããããšã瀺ãããã«ããµãŒããŒã«ãã£ãŠäœ¿çšãããããŒã«ãŒã§ããããã«ããã<a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types#MIME_sniffing">MIME ã¿ã€ãã®ã¹ãããã£ã³ã°</a>ãææ¢ããããšãã§ããŸããããªãã¡ããŠã§ããã¹ã¿ãŒãèªåãäœãããŠããããåãã£ãŠãããšèšãæ段ã§ãã</p> + +<p>ãã®ããããŒã¯ãã³ã³ãã³ãã®ã¹ãããã£ã³ã°ã«ãããå®è¡äžå¯èœãª MIME ã¿ã€ããå®è¡å¯èœãª MIME ã¿ã€ãã«å€æããŠããŸããšããäºæ
ããŠã§ããã¹ã¿ãŒãææ¢ããããã®æ¹æ³ãšããŠããã€ã¯ããœããã IE 8 ã§å°å
¥ãããã®ã§ãããã以æ¥ãä»ã®ãã©ãŠã¶ãŒã¯ MIME ã¹ãããã£ã³ã°ã®ã¢ã«ãŽãªãºã ãããã»ã©ç©æ¥µçã§ã¯ãªããŠãããã®ããããŒãå°å
¥ããŠããŸããã</p> + +<p>Firefox 72 ããã {{HTTPHeader("Content-type")}} ãæäŸãããŠããå Žåã MIME ã¹ãããã£ã³ã°ã®ææ¢ãæäžäœã®ææžã«ãé©çšãããããã«ãªããŸãããããã«ããã HTML ã®ãŠã§ãããŒãžã <code>text/html</code> 以å€ã® MIME ã¿ã€ãã§æäŸãããŠããå Žåã衚瀺ããã代ããã«ããŠã³ããŒããããããšããããŸããäž¡æ¹ã®ããããŒãæ£ããèšå®ããŠãã ããã</p> + +<p>ãµã€ãã®ã»ãã¥ãªãã£ãã¹ã¿ãŒã¯éåžžããã®ããããŒãèšå®ãããŠããããšãæåŸ
ããŠããŸãã</p> + +<p class="blockIndicator note">泚: <code>X-Content-Type-Options</code> ã¯ã <a href="https://fetch.spec.whatwg.org/#should-response-to-request-be-blocked-due-to-nosniff?"><code>nosniff</code> ã«ãããªã¯ãšã¹ãããããã³ã°</a>ã<a href="https://fetch.spec.whatwg.org/#concept-request-destination">ãªã¯ãšã¹ãå
</a>ã "<code>script</code>" ãš "<code>style</code>" ã®å Žåã®ã¿é©çšããŸãããããã <a href="https://chromium.googlesource.com/chromium/src/+/master/services/network/cross_origin_read_blocking_explainer.md#determining-whether-a-response-is-corb_protected">Cross-Origin Read Blocking (CORB)</a> ä¿è·ã HTML, TXT, JSON, XML ã®åãã¡ã€ã« (SVG <code>image/svg+xml</code> ãé€ã) ã«å¯ŸããŠæå¹ã«ããããšãã§ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">X-Content-Type-Options: nosniff +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><code>nosniff</code></dt> + <dd>ãªã¯ãšã¹ãå
ã®ã¿ã€ãã以äžã®å Žåããªã¯ãšã¹ãããããã¯ããŸãã + <ul> + <li>"<code>style</code>" 㧠MIME ã¿ã€ãã <code>text/css</code> ã§ãªãããŸãã¯</li> + <li>"<code>script</code>" 㧠MIME ã¿ã€ãã <a href="https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type">JavaScript ã® MIME ã¿ã€ã</a>ã§ãªã</li> + </ul> + </dd> + <dd>Cross-Origin Read Blocking (CORB) ä¿è·ã次㮠MIME ã¿ã€ãã«å¯ŸããŠæå¹ã«ããŸãã + <ul> + <li><code>text/html</code></li> + <li><code>text/plain</code></li> + <li><code>text/json</code>, <code>application/json</code> ãŸãã¯ãã®ä»ã® JSON æ¡åŒµã䌎ãã¿ã€ã: <code>*/*+json</code></li> + <li><code>text/xml</code>, <code>application/xml</code> ãŸãã¯ãã®ä»ã® XML æ¡åŒµã䌎ãã¿ã€ã: <code>*/*+xml</code> (<code>image/svg+xml</code> ãé€ã)</li> + </ul> + </dd> +</dl> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ç¶æ
</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("Fetch", "#x-content-type-options-header", "X-Content-Type-Options definition")}}</td> + <td>{{Spec2("Fetch")}}</td> + <td>ååå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.X-Content-Type-Options")}}</p> + +<h3 id="Browser_specific_notes" name="Browser_specific_notes">ãã©ãŠã¶ãŒåºæã®æ³šæäºé
</h3> + +<ul> + <li>Firefox 72 ã¯æäžäœææžã§ <code>X-Content-Type-Options: nosniff</code> ãæå¹ã«ããŸãã</li> +</ul> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Type")}}</li> + <li>Microsoft ã«ãã X-Content-Type-Options ã® <a href="https://blogs.msdn.microsoft.com/ie/2008/09/02/ie8-security-part-vi-beta-2-update/">å
ã®å®çŸ©</a></li> + <li>The <a href="https://observatory.mozilla.org/">Mozilla Observatory</a> tool testing the configuration (including this header) of Web sites for safety and security</li> + <li><a href="https://blog.mozilla.org/security/2016/08/26/mitigating-mime-confusion-attacks-in-firefox/">Mitigating MIME Confusion Attacks in Firefox</a></li> + <li><a href="https://fetch.spec.whatwg.org/#corb">Cross-Origin Read Blocking (CORB)</a></li> + <li><a href="https://chromium.googlesource.com/chromium/src/+/master/services/network/cross_origin_read_blocking_explainer.md">Google Docs CORB explainer</a></li> +</ul> diff --git a/files/ja/web/http/headers/x-dns-prefetch-control/index.html b/files/ja/web/http/headers/x-dns-prefetch-control/index.html new file mode 100644 index 0000000000..8653820d29 --- /dev/null +++ b/files/ja/web/http/headers/x-dns-prefetch-control/index.html @@ -0,0 +1,97 @@ +--- +title: X-DNS-Prefetch-Control +slug: Web/HTTP/Headers/X-DNS-Prefetch-Control +tags: + - DNS + - HTTP + - X-DNS-Prefetch-Control + - header +translation_of: Web/HTTP/Headers/X-DNS-Prefetch-Control +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>X-DNS-Prefetch-Control</code></strong> 㯠HTTP ã®ã¬ã¹ãã³ã¹ããããŒã§ã DNS å
èªã¿ãã€ãŸããŠãŒã¶ãŒãé²ãããšãã§ãããªã³ã¯ãšãç»åã CSSã JavaScript ãªã©ã®ææžããåç
§ãããé
ç®ã®äž¡æ¹ã§ããã©ãŠã¶ãŒãäºåã«ãã¡ã€ã³åã®è§£æ±ºãå®è¡ããæ©èœãå¶åŸ¡ããŸãã</p> + +<p>ãã®å
èªã¿ã¯ããã¯ã°ã©ãŠã³ãã§è¡ãããã®ã§ãåç
§ãããŠããé
ç®ãå¿
èŠã«ãªã£ãæã« {{glossary("DNS")}} ã解決ãããŠããå¯èœæ§ãé«ããªããŸããããã«ãã£ãŠããŠãŒã¶ãŒããªã³ã¯ãã¯ãªãã¯ãããšãã«é
延ãççž®ãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">X-DNS-Prefetch-Control: on +X-DNS-Prefetch-Control: off +</pre> + +<h3 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h3> + +<dl> + <dt>on</dt> + <dd>DNS å
èªã¿ãæå¹ã«ããŸãããã®æ©èœã«å¯Ÿå¿ããŠãããã©ãŠã¶ãŒã¯ããã®ããããŒãååšããªãå Žåã¯ãã®åäœãããŸãã</dd> + <dt>off</dt> + <dd>DNS å
èªã¿ãç¡å¹ã«ããŸããããã¯ããŒãžã®ãªã³ã¯ãå¶åŸ¡ããªãå Žåãããã¡ã€ã³ã«æ
å ±æŒæŽ©ãããããªããšåããå Žåã«æçšã§ãã</dd> +</dl> + +<h2 id="Description" name="Description">解説</h2> + +<p>DNS ãªã¯ãšã¹ãã¯åž¯åã§èŠãã°ãšãŠãå°ãããã®ã§ãããé
延ã¯ãç¹ã«ã¢ãã€ã«ãããã¯ãŒã¯ã§ã¯ãšãŠã倧ãããã®ã§ãã DNS ã®å
èªã¿ãææ©çã«è¡ããšããŠãŒã¶ãŒããªã³ã¯ãã¯ãªãã¯ãããšããªã©ç¹å®ã®å Žé¢ã®é
延ãèããççž®ããããšãã§ããŸããå Žåã«ãã£ãŠã¯ãé
延ãç§åäœã§ççž®ããããšãã§ããŸãã</p> + +<p>ãã©ãŠã¶ãŒã«ãã£ãŠã¯ãã®å
èªã¿ã®å®è£
ã§ããã¡ã€ã³åã®è§£æ±ºãå®éã®ããŒãžã®ã³ã³ãã³ãã®èªã¿èŸŒã¿ãš (çŽåŸã§ã¯ãªã) 䞊åã§è¡ãããšãã§ããŸãããããè¡ãããšã§ãé
延ã®å€§ããåå解決ããã»ã¹ãã³ã³ãã³ãã®èªã¿èŸŒã¿ãé
ãããªãããã«ããŸãã</p> + +<p>ããŒãžã®èªã¿èŸŒã¿æé㯠â ç¹ã«ã¢ãã€ã«ãããã¯ãŒã¯ã«ãããŠã¯ â ãã®æ¹æ³ã§èããæ¹åã§ããŸããç»åã®ãã¡ã€ã³åããªã¯ãšã¹ãã«å
ç«ã£ãŠè§£æ±ºã§ããã°ãå€æ°ã®ç»åãèªã¿èŸŒãããŒãžã®èªã¿èŸŒã¿æéã« 5% 以äžã®æ¹åãèŠãããããšããããŸãã</p> + +<h3 id="Configuring_prefetching_in_the_browser" name="Configuring_prefetching_in_the_browser">ãã©ãŠã¶ãŒã®å
èªã¿ã®æ§æ</h3> + +<p>äžè¬ã«ãå
èªã¿ã管çããããšãèããå¿
èŠã¯ãããŸããããããããŠãŒã¶ãŒã¯å
èªã¿ãç¡å¹ã«ããããšæããããããŸããã Firefox ã§ã¯ãèšå®ã® <code>network.dns.disablePrefetch</code> ã <code>true</code> ã«ããããšã§å®çŸã§ããŸãã</p> + +<p>ãŸããæ¢å®ã§ã¯ãåã蟌ã¿ãªã³ã¯ã®ãã¹ãåã®å
èªã¿ã¯ {{glossary("HTTPS")}} ã§èªã¿èŸŒãŸããææžã§ã¯å®è¡ãããŸããã Firefox ã§ã¯ãèšå®ã® <code>network.dns.disablePrefetchFromHTTPS</code> ã <code>false</code> ã«èšå®ããããšã§ãããå€æŽããããšãã§ããŸãã</p> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Turning_on_and_off_prefetching" name="Turning_on_and_off_prefetching">å
èªã¿ã®æå¹åãšç¡å¹å</h3> + +<p>次ã®ããã«ããµãŒããŒåŽãã <code>X-DNS-Prefetch-Control</code> ããããŒãéä¿¡ããããåå¥ã®ææžã§ {{ htmlattrxref("http-equiv", "meta") }} å±æ§ã {{ HTMLElement("meta") }} èŠçŽ ã«èšå®ããŸãã</p> + +<pre class="brush: html notranslate"><meta http-equiv="x-dns-prefetch-control" content="off"> +</pre> + +<p>éã®èšå®ãããã«ã¯ <code>content</code> ã "<code>on</code>" ã«ããŠãã ããã</p> + +<h3 id="Forcing_lookup_of_specific_hostnames" name="Forcing_lookup_of_specific_hostnames">ç¹å®ã®ãã¹ãåã®åç
§ã®åŒ·å¶</h3> + +<p><a href="/ja/docs/Web/HTML/Link_types">ãªã³ã¯çš®å¥</a>ã <code>dns-prefetch</code> ã«ãã {{ HTMLElement("link") }} èŠçŽ ã« {{ htmlattrxref("rel","link") }} å±æ§ã䜿çšããããšã§ããã®ãã¹ãåã䜿çšããç¹å®ã®ã¢ã³ã«ãŒãæäŸããã«ãç¹å®ã®ãã¹ãåã匷å¶çã«æ€çŽ¢ããããšãã§ããŸãã</p> + +<pre class="brush: html notranslate"><link rel="dns-prefetch" href="https://www.mozilla.org/contribute/"> +</pre> + +<p>ãã®äŸã§ã¯ã "<a class="linkification-ext external" href="https://www.mozilla.org/contribute/" title="Linkification: https://www.mozilla.org/contribute/">www.mozilla.org/contribute</a>" ãšãããã¡ã€ã³åãäºåã«è§£æ±ºãããŸãã</p> + +<p>åæ§ã«ã link èŠçŽ ã¯å®å
šãª URL ãæäŸããã«ãã¹ãåã解決ããããã«äœ¿çšããããšãã§ããŸããããã¹ãåã®åã«2ã€ã®ã¹ã©ãã·ã¥ãä»ããå Žåã ãã§ãã</p> + +<pre class="brush: html notranslate"><link rel="dns-prefetch" href="//www.mozilla.org/contribute/"> +</pre> + +<p>ãã¹ãåã®åŒ·å¶çãªå
èªã¿ã¯ãäŸãã°ããããµã€ãã®ããŒã ããŒãžèªäœã§ã¯äœ¿çšãããŠããªãã«ããããããããµã€ãå
šäœã§é »ç¹ã«åç
§ããããã¡ã€ã³åã匷å¶çã«äºå解決ããããã«æçšãããããŸãããããã¯ãããŒã ããŒãžã®æ§èœã«ã¯åœ±é¿ããªããããããŸãããããµã€ãã®å
šäœçãªããã©ãŒãã³ã¹ãåäžãããŸãã</p> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.X-DNS-Prefetch-Control")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a class="external" href="https://bitsup.blogspot.com/2008/11/dns-prefetching-for-firefox.html">Firefox ã® DNS å
èªã¿ (ããã°èšäº)</a></li> + <li><a class="external" href="https://dev.chromium.org/developers/design-documents/dns-prefetching">Google Chrome ãã DNS å
èªã¿å¶åŸ¡ãæ±ããŸã</a></li> +</ul> diff --git a/files/ja/web/http/headers/x-forwarded-for/index.html b/files/ja/web/http/headers/x-forwarded-for/index.html new file mode 100644 index 0000000000..b5f0fe1174 --- /dev/null +++ b/files/ja/web/http/headers/x-forwarded-for/index.html @@ -0,0 +1,81 @@ +--- +title: X-Forwarded-For +slug: Web/HTTP/Headers/X-Forwarded-For +tags: + - HTTP + - HTTP ããã㌠+ - ããã㌠+ - ãªã¯ãšã¹ãããã㌠+ - ãªãã¡ã¬ã³ã¹ + - æšæºå€ +translation_of: Web/HTTP/Headers/X-Forwarded-For +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>X-Forwarded-For</code></strong> (XFF) ããããŒã¯ã HTTP ãããã·åã¯ããŒããã©ã³ãµãŒãééããŠãŠã§ããµãŒããŒãžæ¥ç¶ããã¯ã©ã€ã¢ã³ãã®ãéä¿¡å
IP ã¢ãã¬ã¹ãç¹å®ããããã«äºå®äžã®æšæºãšãªã£ãŠããããããŒã§ããã¯ã©ã€ã¢ã³ããšãµãŒããŒãšã®éã§ãã©ãã£ãã¯ã«äœããä»åšãããšããµãŒããŒã®ã¢ã¯ã»ã¹ãã°ã«ã¯ãããã·åã¯ããŒããã©ã³ãµãŒã®ã¢ãã¬ã¹ããæ®ããŸãããã¯ã©ã€ã¢ã³ãã®å
IP ã¢ãã¬ã¹ãèšé²ããããã«ã <code>X-Forwarded-For</code> èŠæ±ããããŒã䜿çšãããŸãã</p> + +<p>ãã®ããããŒã¯ãããã°ãçµ±èšãäœçœ®ã«äŸåããã³ã³ãã³ãã®çæãªã©ã«äœ¿çšãããã¯ã©ã€ã¢ã³ãã® IP ã¢ãã¬ã¹ã®ãããªãã©ã€ãã·ãŒã«ææãªæ
å ±ãå
¬éããŸããåŸã£ãŠããã®ããããŒãå±éããæã¯ããŠãŒã¶ãŒã®ãã©ã€ãã·ãŒã念é ã«çœ®ãå¿
èŠããããŸãã</p> + +<p>æšæºåãããããããŒã¯ HTTP {{HTTPHeader("Forwarded")}} ããããŒã§ãã</p> + +<p><code>X-Forwarded-For</code> ã¯ãé»åã¡ãŒã«ã¡ãã»ãŒãžãä»ã®ã¢ã«ãŠã³ããã転éãããããšã瀺ãé»åã¡ãŒã«ããããŒãšããŠã䜿ãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "èŠæ±ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">X-Forwarded-For: <client>, <proxy1>, <proxy2> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><client></dt> + <dd>ã¯ã©ã€ã¢ã³ãã® IP ã¢ãã¬ã¹</dd> + <dt><proxy1>, <proxy2></dt> + <dd>èŠæ±ãè€æ°ã®ãããã·ãéããŠè¡ãããå Žåãããããã®ééãããããã·ã® IP ã¢ãã¬ã¹ãæžãåºãããŸããã€ãŸããæãå³ã® IP ã¢ãã¬ã¹ãæãåŸã®ãããã·ã§ãããæãå·Šã® IP ã¢ãã¬ã¹ãå
ã®ã¯ã©ã€ã¢ã³ãã® IP ã¢ãã¬ã¹ã§ãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>X-Forwarded-For: 2001:db8:85a3:8d3:1319:8a2e:370:7348 + +X-Forwarded-For: 203.0.113.195 + +X-Forwarded-For: 203.0.113.195, 70.41.3.18, 150.172.238.178 +</pre> + +<p>ãã®ã»ãã®æšæºå€ã®åœ¢åŒ:</p> + +<pre># ããã€ãã® Google ãµãŒãã¹ã§äœ¿çšããã +X-ProxyUser-Ip: 203.0.113.19</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<p>çŸæç¹ã§ãä»æ§æžã®äžéšã§ã¯ãããŸããããã®ããããŒã®æšæºåç㯠{{HTTPHeader("Forwarded")}} ããããŒã§ãã</p> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååãããã®ã§ããã°ã <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.X-Forwarded-For")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Forwarded")}}</li> + <li>{{HTTPHeader("X-Forwarded-Host")}}</li> + <li>{{HTTPHeader("X-Forwarded-Proto")}}</li> + <li>{{HTTPHeader("Via")}}</li> +</ul> diff --git a/files/ja/web/http/headers/x-forwarded-host/index.html b/files/ja/web/http/headers/x-forwarded-host/index.html new file mode 100644 index 0000000000..fa2c3dc451 --- /dev/null +++ b/files/ja/web/http/headers/x-forwarded-host/index.html @@ -0,0 +1,70 @@ +--- +title: X-Forwarded-Host +slug: Web/HTTP/Headers/X-Forwarded-Host +tags: + - HTTP + - HTTPããã㌠+ - Reference + - ããã㌠+ - ãªã¯ãšã¹ãããã㌠+ - æšæºå€ +translation_of: Web/HTTP/Headers/X-Forwarded-Host +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>X-Forwarded-Host</code></strong> (XFH) ããããŒã¯ã HTTP ã® {{HTTPHeader("Host")}} ãªã¯ãšã¹ãããããŒå
ã§ã¯ã©ã€ã¢ã³ãããèŠæ±ãããå
ã®ãã¹ããç¹å®ããããã®äºå®äžã®æšæºãšãªã£ãŠããããããŒã§ãã</p> + +<p>ãªããŒã¹ãããã· (ããŒããã©ã³ãµãŒã CDN) ã®ãã¹ãåãšããŒãçªå·ã¯ããªã¯ãšã¹ããæ±ãå
ã®ãµãŒããŒãšã¯ç°ãªã£ãŠãããããã®å Žåã¯ããšããšäœ¿çšãããŠããã®ãã©ã®ãã¹ãã§ããããç¹å®ããã®ã« <code>X-Forwarded-Host</code> ããããŒã䟿å©ã§ãã</p> + +<p>ãã®ããããŒã¯ãããã°ãçµ±èšãäœçœ®ã«äŸåããã³ã³ãã³ãã®çæãªã©ã«äœ¿çšãããã¯ã©ã€ã¢ã³ãã® IP ã¢ãã¬ã¹ã®ãããªãã©ã€ãã·ãŒã«ææãªæ
å ±ãå
¬éããŸããåŸã£ãŠããã®ããããŒãå±éããæã¯ããŠãŒã¶ãŒã®ãã©ã€ãã·ãŒã念é ã«çœ®ãå¿
èŠããããŸãã</p> + +<p>æšæºåãããããããŒã¯ HTTP {{HTTPHeader("Forwarded")}} ããããŒã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">X-Forwarded-Host: <host> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><host></dt> + <dd>転éããããµãŒããŒã®ãã¡ã€ã³å</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>X-Forwarded-Host: id42.example-cdn.com +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<p>çŸæç¹ã§ãä»æ§æžã®äžéšã§ã¯ãããŸããããã®ããããŒã®æšæºåç㯠{{HTTPHeader("Forwarded")}} ããããŒã§ãã</p> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.X-Forwarded-Host")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Host")}}</li> + <li>{{HTTPHeader("Forwarded")}}</li> + <li>{{HTTPHeader("X-Forwarded-For")}}</li> + <li>{{HTTPHeader("X-Forwarded-Proto")}}</li> +</ul> diff --git a/files/ja/web/http/headers/x-forwarded-proto/index.html b/files/ja/web/http/headers/x-forwarded-proto/index.html new file mode 100644 index 0000000000..5442b9fe29 --- /dev/null +++ b/files/ja/web/http/headers/x-forwarded-proto/index.html @@ -0,0 +1,74 @@ +--- +title: X-Forwarded-Proto +slug: Web/HTTP/Headers/X-Forwarded-Proto +tags: + - HTTP + - HTTPããã㌠+ - Reference + - ããã㌠+ - ãªã¯ãšã¹ãããã㌠+ - æšæºå€ +translation_of: Web/HTTP/Headers/X-Forwarded-Proto +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>X-Forwarded-Proto</code></strong> (XFP) ããããŒã¯ããããã·ãŸãã¯ããŒããã©ã³ãµãŒãžæ¥ç¶ããã®ã«äœ¿ã£ãŠããã¯ã©ã€ã¢ã³ãã®ãããã³ã« (HTTP ãŸã㯠HTTPS) ãç¹å®ããããã«äºå®äžã®æšæºãšãªã£ãŠããããããŒã§ãããµãŒããŒã®ã¢ã¯ã»ã¹ãã°ã«ã¯ãµãŒããŒãšããŒããã©ã³ãµãŒã®éã§äœ¿ããããããã³ã«ãå«ãŸããŠããŸãããã¯ã©ã€ã¢ã³ããšããŒããã©ã³ãµãŒã®éã§äœ¿çšããããããã³ã«ã¯å«ãŸããŠããŸãããã¯ã©ã€ã¢ã³ããšããŒããã©ã³ãµãŒã®éã§äœ¿çšããããããã³ã«ãç¹å®ããã«ã¯ã <code>X-Forwarded-Proto</code> ãªã¯ãšã¹ãããããŒã䜿çšããããšãã§ããŸãã</p> + +<p>æšæºåãããããããŒã¯ HTTP {{HTTPHeader("Forwarded")}} ããããŒã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Request header", "ãªã¯ãšã¹ãããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">X-Forwarded-Proto: <protocol> +</pre> + +<h2 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h2> + +<dl> + <dt><protocol></dt> + <dd>転éããããããã³ã« (http ãŸã㯠https).</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>X-Forwarded-Proto: https</pre> + +<p>ãã®ä»ã®æšæºå€ã®åœ¢åŒ:</p> + +<pre># Microsoft +Front-End-Https: on + +X-Forwarded-Protocol: https +X-Forwarded-Ssl: on +X-Url-Scheme: https +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<p>çŸæç¹ã§ãä»æ§æžã®äžéšã§ã¯ãããŸããããã®ããããŒã®æšæºåç㯠{{HTTPHeader("Forwarded")}} ããããŒã§ãã</p> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.headers.X-Forwarded-Proto")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Forwarded")}}</li> + <li>{{HTTPHeader("X-Forwarded-For")}}</li> + <li>{{HTTPHeader("X-Forwarded-Host")}}</li> +</ul> diff --git a/files/ja/web/http/headers/x-frame-options/index.html b/files/ja/web/http/headers/x-frame-options/index.html new file mode 100644 index 0000000000..321f582862 --- /dev/null +++ b/files/ja/web/http/headers/x-frame-options/index.html @@ -0,0 +1,158 @@ +--- +title: X-Frame-Options +slug: Web/HTTP/Headers/X-Frame-Options +tags: + - Apache + - Gecko + - HAProxy + - HTTP + - Security + - nginx + - ã»ãã¥ãªã㣠+ - ã¬ã¹ãã³ã¹ããã㌠+translation_of: Web/HTTP/Headers/X-Frame-Options +--- +<div>{{HTTPSidebar}}</div> + +<p><strong><code>X-Frame-Options</code></strong> 㯠<a href="/ja/docs/Web/HTTP">HTTP</a> ã®ã¬ã¹ãã³ã¹ããããŒã§ããã©ãŠã¶ãŒãããŒãžã {{HTMLElement("frame")}}, {{HTMLElement("iframe")}}, {{HTMLElement("embed")}}, {{HTMLElement("object")}} ã®äžã«è¡šç€ºããããšãèš±å¯ãããã©ããã瀺ãããã«äœ¿çšãããŸãããµã€ãã¯ã³ã³ãã³ããä»ã®ãµã€ãã«åã蟌ãŸããªãããä¿èšŒããããšã§ã{{interwiki("wikipedia", "ã¯ãªãã¯ãžã£ããã³ã°")}}æ»æãé²ãããã«äœ¿çšããããšãã§ããŸãã</p> + +<p>匷åãããã»ãã¥ãªãã£ã¯ããŠãŒã¶ãŒã <code>X-Frame-Options</code> ã«å¯Ÿå¿ãããã©ãŠã¶ãŒã䜿çšããŠææžã«ã¢ã¯ã»ã¹ããå Žåã®ã¿æäŸãããŸãã</p> + +<div class="note"> +<p><strong>Note:</strong> {{HTTPHeader("Content-Security-Policy")}} ããããŒã«ã¯ <code><a href="/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors">frame-ancestors</a></code> ãã£ã¬ã¯ãã£ããããã察å¿ããŠãããã©ãŠã¶ãŒã«ãããŠãã®ããããŒã<a href="https://www.w3.org/TR/CSP2/#frame-ancestors-and-frame-options">眮ãæããŠ</a>ããŸãã</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<p><code>X-Frame-Options</code> ã«ã¯äºã€ã®æå¹ãªãã£ã¬ã¯ãã£ãããããŸãã</p> + +<pre class="syntaxbox notranslate">X-Frame-Options: DENY +X-Frame-Options: SAMEORIGIN +</pre> + +<h3 id="Directives" name="Directives">ãã£ã¬ã¯ãã£ã</h3> + +<p><code>DENY</code> ãæå®ããå Žåã¯ãä»ã®ãµã€ããããã¬ãŒã ã«ããŒãžãèªã¿èŸŒãããšããæã«å€±æããã ãã§ãªããåããµã€ãããèªã¿èŸŒãããšããæã«ã倱æããŸããäžæ¹ã <code>SAMEORIGIN</code> ãæå®ããå Žåã¯ããã¬ãŒã ã®äžã®ããŒãžãå«ããµã€ãããããŒãžãæäŸããŠãããµã€ããšåãã§ããéãããã¬ãŒã å
ã§ããŒãžãå©çšããããšãã§ããŸãã</p> + +<dl> + <dt><code>DENY</code></dt> + <dd>ãµã€ãåŽã®æå³ã«é¢ããããããŒãžããã¬ãŒã å
ã«è¡šç€ºããããšã¯ã§ããŸããã</dd> + <dt><code>SAMEORIGIN</code></dt> + <dd>ããŒãžã¯ãããŒãžèªäœãšåããªãªãžã³ã®ãã¬ãŒã å
ã§ã®ã¿è¡šç€ºãããŸããä»æ§æžã§ã¯ãã®ãªãã·ã§ã³ãæäžäœã芪ããã§ãŒã³å
šäœã®ã©ãã«é©çšãããããã©ãŠã¶ãŒãã³ããŒã«ä»»ããŠããŸããããã¹ãŠã®çæå
ãåããªãªãžã³ã§ãªãéããå©çšäŸ¡å€ããªããšè°è«ãããŠããŸãã ({{bug(725490)}} ãåç
§)ã察å¿ã®è©³çŽ°ã¯{{anch("Browser compatibility", "ãã©ãŠã¶ãŒã®äºææ§")}}ãã芧ãã ããã</dd> + <dt><code>ALLOW-FROM <em>uri</em></code><em> (å»æ¢)</em></dt> + <dd>ããã¯å»æ¢ããããã£ã¬ã¯ãã£ãã§ãããæè¿ã®ãã©ãŠã¶ãŒã§ã¯åäœããŸããã䜿çšããªãã§ãã ããã察å¿ããŠããå€ããã©ãŠã¶ãŒã§ã¯ãããŒãžã¯æå®ããããªãªãžã³ <em>uri</em> ã®ãã¬ãŒã å
ã§ã®ã¿è¡šç€ºãããŸãããªããåŸæ¥ã® Firefox ã§ã¯Â <code>SAMEORIGIN</code> ãšåãåé¡ããããŸããã â ãã¬ãŒã ã®çæå
ãåããªãªãžã³ã§ãããã©ããããã§ãã¯ããŸããã {{HTTPHeader("Content-Security-Policy")}} ããããŒã«ã¯ <code>frame-ancestors</code> ãã£ã¬ã¯ãã£ããããã代ããã«ããã䜿çšããããšãã§ããŸãã</dd> +</dl> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<div class="note"> +<p><strong>ã¡ã¢:</strong> meta ã¿ã°ã«èšå®ããŠãæå³ããããŸãããäŸãã°ã <code><meta http-equiv="X-Frame-Options" content="deny"></code> ã¯å¹æããããŸããã䜿çšããªãã§ãã ããã以äžã®äŸã«ããããã«ã <code>X-Frame-Options</code> 㯠HTTP ããããŒãéããŠèšå®ãããå Žåã®ã¿åäœããŸãã</p> +</div> + +<h3 id="Configuring_Apache" name="Configuring_Apache">Apache ã®èšå®</h3> + +<p>Apache 㧠X-Frame-Options ãããããã¹ãŠã®ããŒãžã§éä¿¡ããããã«èšå®ããã«ã¯ããµã€ãã®èšå®ã«ä»¥äžã®èšè¿°ãè¿œå ããŠãã ããã</p> + +<pre class="notranslate">Header always set X-Frame-Options "SAMEORIGIN" +</pre> + +<p>Apache 㧠<code>X-Frame-Options</code> ã DENY ã«èšå®ããã«ã¯ããµã€ãã®èšå®ã«ä»¥äžã®èšè¿°ãè¿œå ããŠãã ãã</p> + +<pre class="notranslate">Header set X-Frame-Options "DENY" +</pre> + +<h3 id="Configuring_nginx" name="Configuring_nginx">nginx ã®èšå®</h3> + +<p>nginx 㧠<code>X-Frame-Options</code> ããããŒãéä¿¡ããããã«èšå®ããã«ã¯ã以äžã®èšè¿°ã httpãserverã location ã®ããããã®èšå®ã«è¿œå ããŠãã ããã</p> + +<pre class="notranslate">add_header X-Frame-Options SAMEORIGIN always; +</pre> + +<h3 id="Configuring_IIS" name="Configuring_IIS">IIS ã®èšå®</h3> + +<p>IIS 㧠<code>X-Frame-Options</code> ããããŒãéä¿¡ããããã«èšå®ããã«ã¯ããµã€ãã® <code>Web.config</code> ãã¡ã€ã«ã«ä»¥äžã®èšå®ãè¿œå ããŠãã ããã</p> + +<pre class="brush: xml notranslate"><system.webServer> + ... + + <httpProtocol> + <customHeaders> + <add name="X-Frame-Options" value="SAMEORIGIN" /> + </customHeaders> + </httpProtocol> + + ... +</system.webServer> +</pre> + +<h3 id="Configuring_HAProxy" name="Configuring_HAProxy">HAProxy ã®èšå®</h3> + +<p>HAProxy 㧠<code>X-Frame-Options</code> ããããŒãéä¿¡ããããã«èšå®ããã«ã¯ã以äžã®èšè¿°ã front-endãlistenãbackend ã®ããããã®èšå®ã«è¿œå ããŠãã ããã</p> + +<pre class="notranslate">rspadd X-Frame-Options:\ SAMEORIGIN +</pre> + +<p>ä»ã«ããããæ°ããããŒãžã§ã³ã§ã¯æ¬¡ã®ãããªèšå®ãã§ããŸãã</p> + +<pre class="notranslate">http-response set-header X-Frame-Options SAMEORIGIN +</pre> + +<h3 id="Configuring_Express" name="Configuring_Express">Express ã®èšå®</h3> + +<p>Express ã§Â <code>X-Frame-Options</code> ããããŒãéä¿¡ããããã«èšå®ããã«ã¯ã <a href="https://helmetjs.github.io/">helmet</a> ã䜿çšã㊠<a href="https://helmetjs.github.io/docs/frameguard/">frameguard</a> ã§ããããŒãèšå®ããŸãã以äžã®èšè¿°ããµãŒããŒèšå®ã«è¿œå ããŠãã ããã</p> + +<pre class="brush: js notranslate">const helmet = require('helmet'); +const app = express(); +app.use(helmet.frameguard({ action: 'SAMEORIGIN' })); +</pre> + +<p>ä»ã«ããçŽæ¥ frameguard ã䜿çšããããšãã§ããŸãã</p> + +<pre class="brush: js notranslate">const frameguard = require('frameguard') +app.use(frameguard({ action: 'SAMEORIGIN' })) +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7034")}}</td> + <td>HTTP Header Field X-Frame-Options</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.X-Frame-Options")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors"><code>frame-ancestors</code> (CSP)</a></li> + <li><a href="https://tools.ietf.org/html/rfc7034">HTTP Header Field X-Frame-Options - RFC 7034</a></li> + <li><a class="external" href="https://blogs.msdn.com/b/ie/archive/2009/01/27/ie8-security-part-vii-clickjacking-defenses.aspx">ClickJacking Defenses - IEBlog</a></li> + <li><a href="https://blogs.msdn.com/b/ieinternals/archive/2010/03/30/combating-clickjacking-with-x-frame-options.aspx">Combating ClickJacking with X-Frame-Options - IEInternals</a></li> +</ul> diff --git a/files/ja/web/http/headers/x-xss-protection/index.html b/files/ja/web/http/headers/x-xss-protection/index.html new file mode 100644 index 0000000000..1b73646d98 --- /dev/null +++ b/files/ja/web/http/headers/x-xss-protection/index.html @@ -0,0 +1,97 @@ +--- +title: X-XSS-Protection +slug: Web/HTTP/Headers/X-XSS-Protection +tags: + - HTTP + - Reference + - XSS + - ã»ãã¥ãªã㣠+ - ããã㌠+translation_of: Web/HTTP/Headers/X-XSS-Protection +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>X-XSS-Protection</code></strong> ã¬ã¹ãã³ã¹ããããŒã¯ Internet Explorer, Chrome, Safari ã®æ©èœã§ãåå°åã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã° ({{Glossary("XSS")}}) æ»æãæ€åºãããšãã«ãããŒãžã®èªã¿èŸŒã¿ãåæ¢ããããã®ãã®ã§ãã匷ã {{HTTPHeader("Content-Security-Policy")}} ããµã€ããå®è£
ããŠãã€ã³ã©ã€ã³ JavaScript ã®äœ¿çšãç¡å¹ã«ããŠããã° (<code>'unsafe-inline'</code>)ãçŸåšã®ãã©ãŠã¶ãŒã§ã¯ãããã®é²åŸ¡ã¯å€§æ ã§äžèŠãªãã®ã§ããããŸã {{Glossary("CSP")}} ã«å¯Ÿå¿ããŠããªãå€ããŠã§ããã©ãŠã¶ãŒã䜿çšããŠãããŠãŒã¶ãŒã«ã¯é²åŸ¡ã«ãªããŸãã</p> + +<div class="note"> +<ul> + <li>Chrome 㯠<a href="https://www.chromestatus.com/feature/5021976655560704">XSS Auditor ãåé€</a>ããŸãã</li> + <li>Firefox ã¯å¯Ÿå¿ããŠãããã <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=528661"><code>X-XSS-Protection</code> ãä»åŸãå®è£
ããŸãã</a></li> + <li>Edge 㯠<a href="https://blogs.windows.com/windowsexperience/2018/07/25/announcing-windows-10-insider-preview-build-17723-and-build-18204/">XSS filter ãå»æ¢ããŸãã</a></li> +</ul> + +<p>ã€ãŸããã¬ã¬ã·ãŒãã©ãŠã¶ããµããŒãããå¿
èŠããªãå Žåã¯ã代ããã« <code><a href="/en-US/docs/Web/HTTP/Headers/Content-Security-Policy">Content-Security-Policy</a></code> ã䜿çšã <code>unsafe-inline</code> ãèš±å¯ããªãããšããå§ãããŸãã</p> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ããããŒçš®å¥</th> + <td>{{Glossary("Response header", "ã¬ã¹ãã³ã¹ããããŒ")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name", "çŠæ¢ããããŒå")}}</th> + <td>ããã</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">X-XSS-Protection: 0 +X-XSS-Protection: 1 +X-XSS-Protection: 1; mode=block +X-XSS-Protection: 1; report=<reporting-uri> +</pre> + +<dl> + <dt>0</dt> + <dd>XSS ãã£ã«ã¿ãªã³ã°ãç¡å¹åããŸãã</dd> + <dt>1</dt> + <dd>XSS ãã£ã«ã¿ãªã³ã°ãæå¹åããŸã (éåžžã¯ãã©ãŠã¶ãŒã®æ¢å®å€ã§ã)ãã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã°æ»æãæ€ç¥ãããšããã©ãŠã¶ãŒã¯ããŒãžããµãã¿ã€ãºããŸã (å®å
šã§ãªãéšåãåãé€ããŸã)ã</dd> + <dt>1; mode=block</dt> + <dd>XSS ãã£ã«ã¿ãªã³ã°ãæå¹åããŸããæ»æãæ€ç¥ãããšãããŒãžããµãã¿ã€ãžã³ã°ããããããããŒãžã®ã¬ã³ããªã³ã°ãåæ¢ããŸãã</dd> + <dt>1; report=<reporting-URI> (Chromium only)</dt> + <dd>XSS ãã£ã«ã¿ãªã³ã°ãæå¹åããŸããã¯ãã¹ãµã€ãã¹ã¯ãªããã£ã³ã°æ»æãæ€ç¥ãããšããã©ãŠã¶ãŒã¯ããŒãžããµãã¿ã€ãºããæ»æã¬ããŒããäœæããŸããã¬ããŒããéä¿¡ããããã«ã CSP {{CSP("report-uri")}} ãã£ã¬ã¯ãã£ãæ©èœãå©çšããŸãã</dd> +</dl> + +<h2 id="Example" name="Example">äŸ</h2> + +<p>XSS æ»æãåæ ãããããŒãžãèŠã€ããããã®èªã¿èŸŒã¿ããããã¯ããå Žåã</p> + +<pre class="brush: bash notranslate">X-XSS-Protection: 1; mode=block</pre> + +<p>PHP</p> + +<pre class="brush: php notranslate">header("X-XSS-Protection: 1; mode=block");</pre> + +<p>Apache (.htaccess)</p> + +<pre class="brush: bash notranslate"><IfModule mod_headers.c> + Header set X-XSS-Protection "1; mode=block" +</IfModule></pre> + +<p>Nginx</p> + +<pre class="brush: bash notranslate">add_header "X-XSS-Protection" "1; mode=block";</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<p>ä»æ§æžãèæ¡ã§å®çŸ©ããããã®ã§ã¯ãããŸããã</p> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.headers.X-XSS-Protection")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Security-Policy")}}</li> + <li><a href="https://blogs.msdn.microsoft.com/ieinternals/2011/01/31/controlling-the-xss-filter/">Controlling the XSS Filter â Microsoft</a></li> + <li><a href="https://www.virtuesecurity.com/blog/understanding-xss-auditor/">Understanding XSS Auditor â Virtue Security</a></li> + <li> + <p><a href="https://blog.innerht.ml/the-misunderstood-x-xss-protection/">The misunderstood X-XSS-Protection â blog.innerht.ml</a></p> + </li> +</ul> diff --git a/files/ja/web/http/index.html b/files/ja/web/http/index.html new file mode 100644 index 0000000000..eb358b75ce --- /dev/null +++ b/files/ja/web/http/index.html @@ -0,0 +1,88 @@ +--- +title: HTTP +slug: Web/HTTP +tags: + - HTTP + - Hypertext + - Reference + - TCP/IP + - Web + - Web Development + - 'l10n:priority' +translation_of: Web/HTTP +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><strong><dfn>Hypertext Transfer Protocol (HTTP)</dfn></strong> 㯠HTML ãªã©ã®ãã€ããŒã¡ãã£ã¢ææžã転éããããã®<a href="https://ja.wikipedia.org/wiki/%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E5%B1%A4">ã¢ããªã±ãŒã·ã§ã³å±€</a>ãããã³ã«ã§ãããã®ãããã³ã«ã¯ãŠã§ããã©ãŠã¶ãŒ(ã¯ã©ã€ã¢ã³ã)ãšãŠã§ããµãŒããŒéã®éä¿¡ãç®çãšããŠèšèšãããŠããŸãããä»ã®çšéã§ã䜿çšãããããšããããŸãã HTTP ã¯æ§æ¥ã®<a href="https://ja.wikipedia.org/wiki/%E3%82%AF%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%B3%E3%83%88%E3%82%B5%E3%83%BC%E3%83%90%E3%83%A2%E3%83%87%E3%83%AB">ã¯ã©ã€ã¢ã³ãã»ãµãŒããŒã¢ãã«</a>ã«åã£ãŠãããã¯ã©ã€ã¢ã³ãã¯ãµãŒããŒã«ãªã¯ãšã¹ããéä¿¡ããããã«ããŒããéãããµãŒããŒåŽããã®ã¬ã¹ãã³ã¹ãè¿ã£ãŠãããŸã§åŸ
æ©ããŸãã HTTP ã¯ãããã<a href="https://ja.wikipedia.org/wiki/%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%AC%E3%82%B9%E3%83%BB%E3%83%97%E3%83%AD%E3%83%88%E3%82%B3%E3%83%AB">ã¹ããŒãã¬ã¹ãããã³ã«</a>ã§ãããã€ãŸããµãŒããŒã¯äºã€ã®ãªã¯ãšã¹ãéã§äœãããŒã¿ãä¿æããŸããã HTTP ã¯å€ãã®å Žå TCP/IP å±€äžã®éä¿¡ã§äœ¿çšãããŸãããä»»æã®ä¿¡é Œæ§ããã<a href="https://ja.wikipedia.org/wiki/%E3%83%88%E3%83%A9%E3%83%B3%E3%82%B9%E3%83%9D%E3%83%BC%E3%83%88%E5%B1%A4">ãã©ã³ã¹ããŒãå±€</a>ãããªãã¡ã UDP ã®ããã«ç¥ãã¬éã«ã¡ãã»ãŒãžã倱ããããããªããšããªããããã³ã«ã§ã䜿çšãããããšããããŸãã <a href="https://en.wikipedia.org/wiki/Reliable_User_Datagram_Protocol">RUDP</a> â UDP ã«ä¿¡é Œæ§ãè¿œå ãããã® â ã代æ¿çšãšããŠé©åããŸãã</p> + +<div class="column-container"> +<div class="column-half"> +<h2 id="Tutorials" name="Tutorials">ãã¥ãŒããªã¢ã«</h2> + +<p>ã¬ã€ãããã¥ãŒããªã¢ã«ã§ã HTTP ã®äœ¿ãæ¹ãåŠã³ãŸãããã</p> + +<dl> + <dt><a href="/ja/docs/Web/HTTP/Overview">HTTP ã®æŠèŠ</a></dt> + <dd>ã¯ã©ã€ã¢ã³ããµãŒããŒãããã³ã«ã®åºæ¬çãªç¹åŸŽã§ãã HTTP ã§å®çŸã§ããããšããŸãäœæ
ãããå®çŸãã¹ããªã®ãã説æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Caching">HTTP ãã£ãã·ã¥</a></dt> + <dd>ãã£ãã·ã¥ã¯é«éã§å¿«é©ãªãŠã§ããµã€ãã®é²èŠ§ãå¯èœã«ããããã«éåžžã«éèŠãªèŠçŽ ã§ãããã®èšäºã§ã¯æ§ã
ãªãã£ãã·ã³ã°ã®ææ³ããHTTP ããããŒã§ã©ã®ããã«ããããå¶åŸ¡ãããã説æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Cookies">HTTP Cookie</a></dt> + <dd>Cookie ã®åäœã¯ <a href="http://tools.ietf.org/html/rfc6265">RFC 6265</a> ã§å®çŸ©ãããŠããŸãããµãŒããŒã¯ HTTP ãªã¯ãšã¹ããã¯ã©ã€ã¢ã³ãåŽã«éä¿¡ããéã<code>Set-Cookie</code> ããããŒä»äžããããšãã§ããŸããã¯ãããŒã®å€ã¯ <code>Cookie</code> ãªã¯ãšã¹ãã®ããããŒã®èå¥åã«å«ãŸãããåäžãµãŒããŒã«å¯Ÿããå
šãŠã®ãªã¯ãšã¹ããä¿æããŠãããã¯ã©ã€ã¢ã³ãåŽã¯ãããè¿ããŸãããŸããCookie ã«æå¹æéãèšå®ããããç¹å®ã®ãã¡ã€ã³ããã¹ã ãã«ã¹ããŒããã«ãªæåãéå®ããããšãã§ããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/CORS">ãªãªãžã³éãªãœãŒã¹å
±æ (CORS)</a></dt> + <dd><strong>ãµã€ãé HTTP ãªã¯ãšã¹ã</strong>ãšã¯ããªã¯ãšã¹ããçæãããªãœãŒã¹ããããã¡ã€ã³ãšã¯ <strong>å¥ã®ãã¡ã€ã³ </strong>ã®ãªãœãŒã¹ããªã¯ãšã¹ããã HTTP ãªã¯ãšã¹ãã®ããšãæããŸããäŸãã°ããã¡ã€ã³ A (<code>http://domaina.example/</code>) ããèªã¿èŸŒãŸãã HTML ããŒãžãã<code>img</code> èŠçŽ ã䜿çšããŠãã¡ã€ã³ B ã®ç»å (<code>http://domainb.foo/image.jpg</code>) ã«å¯Ÿãããªã¯ãšã¹ããçºè¡ããããšãããã«ããããŸããæšä»ã®ãŠã§ãããŒãžã§ã¯ãCSS ã¹ã¿ã€ã«ã·ãŒããç»åããŒã¿ãã¹ã¯ãªããããã®ä»ã®ãªãœãŒã¹ãå«ããäžèšã®äŸã®ããã«ãµã€ããè·šã£ãŠããŒã¿ãèªã¿èŸŒãã®ãäžè¬çã«ãªã£ãŠããŸãããŠã§ãéçºè
ã¯ãCORS ã䜿ã£ãŠãã®ãããªãµã€ãéã®ãªã¯ãšã¹ãã«å¯ŸããŠåã
ã®ãµã€ãã瀺ãæåãå¶åŸ¡ããããšãã§ããŸãã</dd> +</dl> + +<dl> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Evolution_of_HTTP">HTTP ã®é²å</a></dt> + <dd>åæããŒãžã§ã³ã® HTTP ããææ°ã® HTTP/2ã姿ãçŸãã HTTP/3 以éãŸã§ã®å€é©ã端çã«èª¬æããŸãã</dd> + <dt><a href="https://wiki.mozilla.org/Security/Guidelines/Web_Security">Mozilla ãŠã§ãã»ãã¥ãªãã£ã¬ã€ãã©ã€ã³</a></dt> + <dd>éçšããŒã ãã»ãã¥ã¢ãªãŠã§ãã¢ããªã±ãŒã·ã§ã³ãéçºããã®ã«åœ¹ç«ã€ã³ãããŸãšããŸããã</dd> +</dl> + +<dl> + <dt><a href="/ja/docs/Web/HTTP/Messages">HTTP ã¡ãã»ãŒãž</a></dt> + <dd>HTTP/1.x ã HTTP/2 ã®å€æ§ãªã¡ãã»ãŒãžãæã€åãæ§é ã説æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Session">HTTP ã»ãã·ã§ã³ã®å
žåäŸ</a></dt> + <dd>äžè¬ç㪠HTTP ã»ãã·ã§ã³ã®ãããŒã瀺ããªãã説æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Connection_management_in_HTTP_1.x">HTTP/1.x ã®ã³ãã¯ã·ã§ã³å¶åŸ¡</a></dt> + <dd>HTTP/1.x ã§äœ¿çšã§ãã 3çš®é¡ã®éä¿¡å¶åŸ¡ã¢ãã«ã®æã€é·æãšçæã説æããŸãã</dd> +</dl> +</div> + +<div class="column-half"> +<h2 id="Reference" name="Reference">ãªãã¡ã¬ã³ã¹</h2> + +<p>詳现㪠HTTP ã®åèè³æãèŠãŠãããŸãããã</p> + +<dl> + <dt><a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a></dt> + <dd>HTTP ã¡ãã»ãŒãžããããŒã¯ããªãœãŒã¹ããããã¯ãµãŒããŒãã¯ã©ã€ã¢ã³ãã®æåã瀺ãããã«äœ¿çšããŸããå人çã«ããããŒãã«ã¹ã¿ãã€ãºããå Žåã¯ã<code>X-</code> ãé ã«ä»ããããšã§è¿œå ã§ããŸãããã以å€ã®ããããŒã¯ <a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml#perm-headers">IANA ã¬ãžã¹ããª</a> ã«åé²ãããŠããŸãããå
ã®å
容㯠<a href="http://tools.ietf.org/html/rfc4229">RFC 4229</a> ã§å®çŸ©ãããŠããŸãããIANA 㯠<a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml#prov-headers">æ°ãã«ææ¡ããã HTTP ã¡ãã»ãŒãžããããŒã®ã¬ãžã¹ããª</a>ã管çããŠããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Methods">HTTP ãªã¯ãšã¹ãã¡ãœãã</a></dt> + <dd>HTTP ã§ã¯å€æ§ãªæäœãå®çŸããããšãã§ããŸããäžè¬ç㪠{{HTTPMethod("GET")}} ã {{HTTPMethod("POST")}} ã ãã§ãªãã{{HTTPMethod("OPTIONS")}} ã {{HTTPMethod("DELETE")}}ã{{HTTPMethod("TRACE")}} ãªã©ã®ããŸãäžè¬çã§ã¯ãªããªã¯ãšã¹ããå
æ¬ããŠããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Response_codes">HTTP ã¹ããŒã¿ã¹ã¬ã¹ãã³ã¹ã³ãŒã</a></dt> + <dd>HTTP ã¬ã¹ãã³ã¹ã³ãŒãã¯ãç¹å®ã® HTTP ãªã¯ãšã¹ããæ£åžžã«å®äºãããã瀺ããŸããã¬ã¹ãã³ã¹ã¯éç¥ã¬ã¹ãã³ã¹ãæåã¬ã¹ãã³ã¹ããªãã€ã¬ã¯ã·ã§ã³ãã¯ã©ã€ã¢ã³ããšã©ãŒããµãŒããŒãšã©ãŒã® 5 ã€ã®ã¯ã©ã¹ã«åé¡ãããŸãã</dd> +</dl> + +<dl> + <dt><a href="/ja/docs/Web/HTTP/Headers/Content-Security-Policy">CSP ãã£ã¬ã¯ãã£ã</a></dt> + <dd>ãŠã§ããµã€ãã®ç®¡çè
ã¯ã{{HTTPHeader("Content-Security-Policy")}} ã¬ã¹ãã³ã¹ããããŒãã£ãŒã«ãã§ããŠãŒã¶ãŒãšãŒãžã§ã³ããç¹å®ã®ããŒãžã§èªã¿èŸŒãããšãèš±å¯ãããŠãããªãœãŒã¹ãå¶åŸ¡ããããšãã§ããŸããããã€ãäŸå€ã¯ãããŸããã倧å
ã®ãµãŒããŒãã¹ã¯ãªããã®ãšã³ããã€ã³ãã®ç¹å®ãããªã·ãŒãšããŠå«ãã§ããããšãå€ãã§ãã</dd> +</dl> + +<h2 id="Tools_resources" name="Tools_resources">ããŒã«ãšãªãœãŒã¹</h2> + +<p>HTTP ã®ç解ããããã°ã«åœ¹ç«ã€ããŒã«ããªãœãŒã¹ã§ãã</p> + +<dl> + <dt><a href="/docs/Tools">Firefox éçºããŒã«</a></dt> + <dd><a href="/docs/Tools/Network_Monitor">ãããã¯ãŒã¯ã¢ãã¿ãŒ</a></dd> + <dt><a href="https://observatory.mozilla.org/">Mozilla ç 究宀</a></dt> + <dd> + <p>éçºè
ãã·ã¹ãã 管çè
ãã»ãã¥ãªãã£ã®å°é家ã®ãå®å
šã§ã»ãã¥ã¢ãªãµã€ãã®æ§ç¯ãæ¯æŽãããããžã§ã¯ãã§ãã</p> + </dd> + <dt><a href="https://redbot.org/">RedBot</a></dt> + <dd>ãã£ãã·ã¥é¢ä¿ã®ããããŒãæ€èšŒããããŒã«ã§ãã</dd> + <dt><a href="http://www.html5rocks.com/en/tutorials/internals/howbrowserswork/">How Browsers Work</a></dt> + <dd>ãã©ãŠã¶ãŒã®å
éšåŠçãã HTTP ãããã³ã«ã®ãªã¯ãšã¹ãåŠçã®ãããŒã«é¢ããŠãšãŠã詳ããæžãããèšäºã§ãããŠã§ãéçºè
ã§ããã°äžèªããã¹ãèšäºã«ãªããŸãã</dd> +</dl> +</div> +</div> diff --git a/files/ja/web/http/index/index.html b/files/ja/web/http/index/index.html new file mode 100644 index 0000000000..acbf54eb38 --- /dev/null +++ b/files/ja/web/http/index/index.html @@ -0,0 +1,13 @@ +--- +title: çŽ¢åŒ +slug: Web/HTTP/Index +tags: + - HTTP + - Index +translation_of: Web/HTTP/Index +--- +<div>{{HTTPSidebar}}</div> + +<p>ãã®ããŒãžã¯æŠèŠãã¿ã°ã«æ²¿ã£ã MDN ã®ãã¹ãŠã® HTTP ããŒãžã®äžèŠ§ã§ãã</p> + +<p>{{Index("/ja/docs/Web/HTTP")}}</p> diff --git a/files/ja/web/http/link_prefetching_faq/index.html b/files/ja/web/http/link_prefetching_faq/index.html new file mode 100644 index 0000000000..4bbfbe2b0e --- /dev/null +++ b/files/ja/web/http/link_prefetching_faq/index.html @@ -0,0 +1,133 @@ +--- +title: ãªã³ã¯å
èªã¿ã® FAQ +slug: Web/HTTP/Link_prefetching_FAQ +tags: + - Gecko + - HTML + - HTTP + - Link + - Necko + - Performance + - Web Development + - å
èªã¿ + - ç§»è¡ +translation_of: Web/HTTP/Link_prefetching_FAQ +--- +<h3 id="What_is_link_prefetching.3F" name="What_is_link_prefetching.3F">ãªã³ã¯ã®å
èªã¿ãšã¯?</h3> + +<p>ãªã³ã¯ã®å
èªã¿ãšã¯ãã©ãŠã¶ãŒã®æ©èœã®äžã€ã§ããã©ãŠã¶ãŒã®ã¢ã€ãã«æéã䜿ã£ãŠããŠãŒã¶ãŒãè¿ãå°æ¥ã«èšªåããã§ãããææžãããŠã³ããŒãããŠãäºãèªã¿èŸŒãã§ããããšãæããŸãããŸããWeb ããŒãžã®æ¹ããå
èªã¿ã®ãã³ãããã©ãŠã¶ãŒã«æž¡ããŸãããã®ããŒãžã®èªã¿èŸŒã¿ãå®äºãããšããã©ãŠã¶ãŒã¯é»ã£ãŠæå®ãããææžãå
èªã¿ãããã£ãã·ã¥ã«èç©ããŠãããŸãããŠãŒã¶ãŒãå
èªã¿ãããŠããææžã蚪åãããšããã©ãŠã¶ãŒã®ãã£ãã·ã¥ããããã«æäŸã§ããŸãã</p> + +<h3 id="Does_prefetching_work_with_HTTPS" name="Does_prefetching_work_with_HTTPS">HTTPS ã§ãå
èªã¿ããŸãã?</h3> + +<p>Gecko 1.9.1 (Firefox 3.5) 以éãã HTTPS ã³ã³ãã³ããå
èªã¿ã§ããŸãã</p> + +<h3 id="What_are_the_prefetching_hints.3F" name="What_are_the_prefetching_hints.3F">å
èªã¿ã®ãã³ããšã¯?</h3> + +<p>HTML ã® <code>link</code> ã¿ã°ãŸã㯠<a href="/ja/docs/Web/HTTP/Headers">HTTP ã® <code>Link:</code> ããããŒ</a>ã«ãããŠã<code>next</code>, <code>prefetch</code> ã®ããããã®é¢ä¿ãæã€ãã®ã§ãã <code>link</code> ã¿ã°ã䜿ãäŸã以äžã«ç€ºããŸãã</p> + +<pre class="eval"><link rel="prefetch" href="/images/big.jpeg"> +</pre> + +<p>åããã³ãã <a href="/ja/docs/Web/HTTP/Headers">HTTP ã® <code>Link:</code> ããããŒ</a>ã䜿ã£ãŠè¡šããšæ¬¡ã®ããã«ãªããŸãã</p> + +<pre class="eval">Link: </images/big.jpeg>; rel=prefetch +</pre> + +<p><code>Link:</code> ããããŒã¯ HTML ææžäžããã HTML ã® <code><meta></code> ã¿ã°ã䜿ã£ãŠæå®ã§ããŸãã</p> + +<pre class="eval"><meta http-equiv="Link" content="</images/big.jpeg>; rel=prefetch"> +</pre> + +<p><code>Link:</code> ããããŒã®æžåŒã¯ã <a class="external" href="http://tools.ietf.org/html/rfc2068" title="http://tools.ietf.org/html/rfc2068">RFC 2068</a> ã® 19.6.2.4 ç¯ã§èª¬æãããŠããŸãã</p> + +<p>ãã©ãŠã¶ãŒã¯ãããã®ãã³ãå
šãŠãå
ã«ããã©ãŠã¶ãŒã䜿ãããŠããªãæã«å
èªã¿ããããã®åãªã¯ãšã¹ããåŸ
ã¡è¡åã«å
¥ããŸãã1ããŒãžã«è€æ°ã®ãã³ããããã°ãè€æ°ã®ææžã«å¯ŸããŠå
èªã¿ãè¡ããŸããäŸãã°ã次ã®ææžãšããŠããã€ãã®å€§ããªç»åãæå®ããããšããããŸãã</p> + +<p>ä»ã«ã以äžã®ãããªæå®ãã§ããŸãã</p> + +<pre class="eval"><link rel="prefetch alternate stylesheet" title="Designed for Mozilla" href="mozspecific.css"> +<link rel="next" href="2.html"> +</pre> + +<h3 id="Are_anchor_.28.3Ca.3E.29_tags_prefetched.3F" name="Are_anchor_.28.3Ca.3E.29_tags_prefetched.3F">ã¢ã³ã«ãŒã¿ã°ïŒ<a>ïŒã®å
容ãå
èªã¿ãããŸãã?</h3> + +<p>ãããã <code>next</code> ã <code>prefetch</code> ã®ãªã³ã¯åœ¢åŒãæ〠<code><link></code> ã¿ã°ã ããå
èªã¿ã®å¯Ÿè±¡ã§ããããããèŠæãå€ããããªããå°æ¥çã«ã¯ <code>next</code> ã <code>prefetch</code> ã®é¢ä¿ãå«ã <code><a></code> ã¿ã°ã®ãªã³ã¯ã®å
èªã¿ã«ã察å¿ããããã«ãªããããããŸãããããããã°ãã³ã³ãã³ãæäŸè
ãå
èªã¿ãªã³ã¯ãæŽæ°ãå¿ãããšããåé¡ãåé¿ãããããªãã§ãããã</p> + +<h3 id="Is_link_prefetching_standards_compliant.3F" name="Is_link_prefetching_standards_compliant.3F">ãªã³ã¯ã®å
èªã¿æ©èœã¯æšæºã«æºæ ããŠããŸãã?</h3> + +<p>ã¯ããããã§è¿°ã¹ãŠãããªã³ã¯ã®å
èªã¿æ©èœã¯ãæ¢åã®ãŠã§ãæšæºã«éåããŠããŸãããå®éãHTML 4.01 ä»æ§æžã§ã¯æ°ããªãªã³ã¯åœ¢åŒã®å®çŸ©ãæ確ã«èš±ãããŠããŸã(<a class="external" href="http://www.w3.org/TR/html4/types.html#type-links">Section 6.12: Link types ãåç
§</a>)ãããããMozilla ã§æ¡çšããææ³èªäœã¯ãŸã æšæºåãããŠããŸããã Internet Draft ãçŸåšæºåäžã§ãã</p> + +<p>ãã®ææ³ã®æšæºå㯠HTML5 ã®ç¯å²ã®äžéšã§ããçŸåšã®ã¯ãŒãã³ã°ãã©ããã® <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/#link-type-prefetch" rel="external nofollow" title="http://www.whatwg.org/specs/web-apps/current-work/#link-type-prefetch">section §5.11.3.13. Link type "prefetch"</a> ãåç
§ããŠãã ããã</p> + +<h3 id="How_is_browser_idle_time_determined.3F" name="How_is_browser_idle_time_determined.3F">ãã©ãŠã¶ãŒã®ã¢ã€ãã«æéã¯ã©ã®ããã«å€å®ãããŸãã?</h3> + +<p>çŸåšã®å®è£
ïŒMozilla 1.2ïŒã§ã¯ãã¢ã€ãã«æé㯠<code>nsIWebProgressListener</code> API ãçšããŠå€å®ãããŸãããããã¬ãã«ã® <code>nsIWebProgress</code> ãªããžã§ã¯ãã«ãªã¹ããŒãè¿œå ããŸããïŒ"@<a class="linkification-ext external" href="http://mozilla.org/docloaderservice;1" title="Linkification: http://mozilla.org/docloaderservice;1">mozilla.org/docloaderservice;1</a>"ïŒããã®ãªã¹ããŒãããææžã®éå§ãšåæ¢ã®éç¥ãåãåã£ãŠãåã®ææžã®åæ¢ãšæ¬¡ã®ææžã®éå§ã®éã®æéãã¢ã€ãã«æéãšããŠæŠç®ããŸããåã®ææžã®åæ¢éç¥ã¯ã倧ãŸãã«èšã£ãŠããããã¬ãã«ææžã® onLoad ãã³ãã©ãèµ·åããæã«è¡ãããŸãããã®æãå
èªã¿ãªã¯ãšã¹ããè¡ãæã«ãªããŸãããµããã¬ãŒã ãå
èªã¿ã®ãã³ããå«ãå Žåã«ããå
èªã¿ã¯æäžäœã®ãã¬ãŒã ãšãã®ãåããã¬ãŒã ã®èªã¿èŸŒã¿ãçµäºãããŸã§å§ãŸããŸããã</p> + +<h3 id="What_happens_if_I_click_on_a_link_while_something_is_being_prefetched.3F" name="What_happens_if_I_click_on_a_link_while_something_is_being_prefetched.3F">å
èªã¿ã®ååŸäžã«å¥ã®ãªã³ã¯ãã¯ãªãã¯ãããšã©ããªããŸãã?</h3> + +<p>ãŠãŒã¶ãŒããªã³ã¯ãã¯ãªãã¯ããããäœããã®çš®é¡ã®ããŒãžèªã¿èŸŒã¿ãçºçãããããããšãå
èªã¿ã¯åæ¢ããå
èªã¿ã®ãã³ãã¯æšãŠãããŸããå
èªã¿ããŠããææžãéšåçã«ããŠã³ããŒããããŠããå Žåã¯ãéäžãŸã§ã®ææžããµãŒãããéããã "Accept-Ranges: bytes" ã¬ã¹ãã³ã¹ããããŒä»ãã§ãã£ãã·ã¥ã«èç©ãããŸãããã®ããããŒã¯ã倧æµããŠã§ããµãŒããéçãªã³ã³ãã³ããæäŸããéã«çæãããã®ã§ãããŠãŒã¶ãŒãå
èªã¿ããææžãå®éã«èšªåããéã«ã¯ããã®ææžã®æ®ãã®éšåã HTTP ã® byte-range ãªã¯ãšã¹ãã䜿ã£ãŠååŸããŸãã</p> + +<h3 id="What_if_I.27m_downloading_something_in_the_background.3F_Will_link_prefetching_compete_for_bandwidth.3F" name="What_if_I.27m_downloading_something_in_the_background.3F_Will_link_prefetching_compete_for_bandwidth.3F">ããã¯ã°ã©ãŠã³ãã§äœããããŠã³ããŒãããŠããå Žåã¯ã©ãã§ãã? ãªã³ã¯ã®å
èªã¿æ©èœã¯åç·å®¹éã奪ãåããŸãã?</h3> + +<p>ãã€ãšã¹ãã§ããããããŒãã§ããããŸãããŸããMozilla ã䜿ã£ãŠäœããããŠã³ããŒãããŠããå Žåã¯ãå
šãŠã®ããŠã³ããŒããçµãããŸã§ãªã³ã¯ã®å
èªã¿æ©èœãé
ãããŸããäŸãã°ãããã¯ããŒã¯ã»ã°ã«ãŒããèªã¿èŸŒãã§ããïŒè€æ°ã®ã¿ããéãïŒå Žåã«ã¯ããã®ããã¯ããŒã¯ãããããŒãžã§çºçããå
èªã¿ãªã¯ãšã¹ãã¯ãå
šãŠã®ã¿ããããŒããçµãããŸã§ãéå§ãããŸãããäžæ¹ãå¥ã®ã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ã䜿ã£ãŠããå Žåã¯ãMozilla ã®ãªã³ã¯ã®å
èªã¿ã¯ãã®ä»ã®ã¢ããªã±ãŒã·ã§ã³ãšåç·å®¹éã奪ãåããŸããå°æ¥çã«ã¯ããããã¯ãŒã¯ã®ã¢ã€ãã«æéãç£èŠãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ãµãŒãã¹ãå©çšããŠããã®åé¡ã解決ããããšæã£ãŠããŸã</p> + +<h3 id="Are_there_any_restrictions_on_what_is_prefetched.3F" name="Are_there_any_restrictions_on_what_is_prefetched.3F">å
èªã¿ã§ãããã®ã«äœãå¶éã¯ãããŸãã?</h3> + +<p>ã¯ãã<a class="external" href="http://" rel="freelink">http://</a> (ãš {{ Gecko("1.9.1") }} ãã㯠<a class="link-https" href="https://" rel="freelink">https://</a> )URL ã ããå
èªã¿å¯èœã§ããïŒFTP ãªã©ã®ïŒãã®ä»ã®ãããã³ã«ã¯ã¯ã©ã€ã¢ã³ããµã€ãã®ãã£ãã·ã¥ãžã®å¯Ÿå¿ãååã§ãããŸããã</p> + +<h3 id="Will_Mozilla_prefetch_documents_from_a_different_host.3F" name="Will_Mozilla_prefetch_documents_from_a_different_host.3F">Mozilla ã¯å¥ã®ãã¹ããããææžãå
èªã¿ããŸãã?</h3> + +<p>ã¯ããå
èªã¿ã«ã¯ã åäžãªãªãžã³ (same-origin) ã«ã€ããŠã®å¶éã¯ãããŸããããªã³ã¯ã®å
èªã¿ãåäžãµãŒãã® URL ã«éå®ãããšããŠãããã©ãŠã¶ãŒã®ã»ãã¥ãªãã£åäžã«ã¯ãªããªãã§ãããããã</p> + +<h3 id="Do_prefetched_requests_contain_a_Referer_header.3F" name="Do_prefetched_requests_contain_a_Referer:_header.3F">å
èªã¿ã®ãªã¯ãšã¹ãã«ã¯ Referer: ããããŒãä»ããŸãã?</h3> + +<p>ã¯ããå
èªã¿ãªã¯ãšã¹ãã«ã¯ãã©ã®ææžããå
èªã¿ãã³ããåã£ããã瀺ããHTTP ã® <code>Referer:</code> ããããŒãä»ããŸãã</p> + +<p>ãã®ããšã¯ãå€ãã®ãµã€ãã§åºãè¡ãããŠããåç
§å
ã®è¿œè·¡ã«åœ±é¿ãããããããŸããããã®ããããªã³ã¯ã®å
èªã¿ã¯å
šãŠã®ã³ã³ãã³ãã«å¯ŸããŠåããã®ã§ã¯ãªããããããŸãããããã§ã<code>Cache-control: must-revalidate</code> HTTP ã¬ã¹ãã³ã¹ããããŒãæå®ããããšã«ããããŠãŒã¶ãŒãå
èªã¿ãããææžãžã®ãªã³ã¯ã蟿ã£ãéã«ãMozilla ã«ãã®å
èªã¿ãããææžãæ€èšŒãããããšãã§ããããã«ããŠããŸãããã®ããããŒã䜿ããããšããã£ãã·ã¥ã¯æå¹ãªãŸãŸã§ããããã©ãŠã¶ãŒã®ãã£ãã·ã¥ããææžãåãåºãåã«ã¯ã<code>If-Modified-Since</code> ããã㯠<code>If-None-Match</code> ã®æ€èšŒçšãªã¯ãšã¹ããå¿
èŠã«ãªããŸãã</p> + +<h3 id="As_a_server_admin.2C_can_I_distinguish_prefetch_requests_from_normal_requests.3F" name="As_a_server_admin.2C_can_I_distinguish_prefetch_requests_from_normal_requests.3F">ãµãŒã管çè
ã§ãããå
èªã¿ã®ãªã¯ãšã¹ããéåžžã®ãªã¯ãšã¹ããšåºå¥ããæ¹æ³ã¯ãããŸãã?</h3> + +<p>ã¯ããå
èªã¿ã®ãªã¯ãšã¹ãã«ã¯ã次ã®ãããªããããŒãä»ããŸãã</p> + +<pre>X-moz: prefetch</pre> + +<p>ãã¡ããããã®ãªã¯ãšã¹ãããããŒã¯å
šãæšæºåãããŠããªããã®ã§ãã®ã§ãå°æ¥ã® Mozilla ãªãªãŒã¹ã§ã¯å€æŽãããå¯èœæ§ããããŸãã</p> + +<h3 id="Is_there_a_preference_to_disable_link_prefetching.3F" name="Is_there_a_preference_to_disable_link_prefetching.3F">ãªã³ã¯ã®å
èªã¿æ©èœãç¡å¹åããèšå®ã¯ãããŸãã?</h3> + +<p>ã¯ãããªã³ã¯ã®å
èªã¿æ©èœãç¡å¹åã§ããé ãèšå®ããããŸãã ããªãã®ãããã¡ã€ã«ãã£ã¬ã¯ããªã«ãã prefs.js ãã¡ã€ã«ã«æ¬¡ã®è¡ãè¿œå ããŠãã ããïŒãããã¯ãabout:config çµç±ã§å€æŽããŠãã ããïŒã</p> + +<pre class="eval">user_pref("network.prefetch-next", false); +</pre> + +<p>ãããããªã³ã¯ã®å
èªã¿æ©èœãç¡å¹ã«ããããšããå Žåã«ã¯ããã®å
èªã¿ã®å®è£
ã«äœãäžå
·åãããã®ã§ã¯ãªãããšæããŸããæã
ãšããŠã¯ãäžå
·åãããå Žåã«ã¯ããŠãŒã¶ãŒã«èšå®ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ã®äžããç®ç«ããªãèšå®é
ç®ãæ¢ãããŠå€æŽãããããããå®è£
ãæ¹åããããšæã£ãŠããŸãã</p> + +<h3 id="What_about_folks_who_pay-per-byte_for_network_bandwidth.3F" name="What_about_folks_who_pay-per-byte_for_network_bandwidth.3F">ãããã¯ãŒã¯åç·ãåŸéå¶èª²éã§äœ¿ã£ãŠãã人ãã¡ã«ã€ããŠã¯ã©ãã§ãã?</h3> + +<p>åºæ¬çã«ã¯ããã®åé¡ã¯äºã€ã®èŠ³ç¹ããèŠãããšãã§ããŸãããŠã§ããµã€ãã§ã¯æ¢ã« JavaScript ã DOM çã®å°æã䜿ã£ãŠãæé»ã®ããŠã³ããŒããè¡ãããŠããããšãå
èªã¿ã¯ãã©ãŠã¶ãŒã®æ©èœã®äžã€ã§ããããŠãŒã¶ãŒãç°¡åã«ç¡å¹åã§ããããã«ããŠããã¹ãã ãšããããšã§ãã</p> + +<p>ãŠã§ããµã€ã㧠JavaScript ã DOM ã®è²ã
ãªå°æã䜿çšããŠæé»ã«ããŠã³ããŒããã©ãã©ãé²ããããšãã代ããã«ã <code><link></code> ã¿ã°ã䜿ã£ãå
èªã¿ãæ¡çšããŠãããããšãéèŠã§ãã <code><link></code> ã¿ã°ã«ããããã©ãŠã¶ãŒã¯ã©ã®ãµã€ããææ°ã§ããããç¥ãããšãã§ããææžã®å
èªã¿ã®åªå
é åºãããè¯ãä»ããããšãã§ããŸãããŠãŒã¶ãŒèšå®ã§ <code><link></code> ã¿ã°ã«ããå
èªã¿ãç¡å¹åã§ããããã«ãããšãåã« JavaScript ã DOM ã«ããå°æãæšå¥šãããããšã«ã€ãªããããŠãŒã¶ãŒã«ãšã£ãŠè¯ãçµæã«ã¯ãªãmå·®åãå
èªã¿æ©èœãæ¢å®ã§æå¹ãªã®ã¯ããã®ããã§ãã</p> + +<h3 id="Which_browsers_support_link_prefetching.3F" name="Which_browsers_support_link_prefetching.3F">ã©ã®ãã©ãŠã¶ãŒããªã³ã¯ã®å
èªã¿æ©èœã«å¯Ÿå¿ããŠããŸãã?</h3> + +<p>Mozilla 1.2 以éããŒã¹ããã³ Mozilla 1.0.2 以éããŒã¹ã®ãã©ãŠã¶ãŒãå
èªã¿æ©èœã«å¯Ÿå¿ããŠããŸããããã«ã¯ Netscape 7.01 以éãš Phoenix ãã«ããå«ãŸããŸãã 2003幎3æçŸåšã® Chimera ãã«ã㯠Mozilla 1.0.1 ããŒã¹ã§ãã®ã§ãå
èªã¿æ©èœã«å¯Ÿå¿ããŠããŸãããããªãã®ãã©ãŠã¶ãŒããªã³ã¯ã®å
èªã¿ã«å¯Ÿå¿ããŠãããã©ãã<a class="external" href="http://gemal.dk/browserspy/prefetch.php" title="http://gemal.dk/browserspy/prefetch.php">ãã¹ã</a>ã§ããŸãã</p> + +<h3 id="Privacy_implications" name="Privacy_implications">ãã©ã€ãã·ãŒãšã®é¢ãã</h3> + +<p>åç
§å
ãš URL ã®è¿œè·¡ãšã®é¢ä¿ã¯ãã§ã«äžèšã§èª¬æãããŠãããšããã§ãããå
èªã¿ã¯äžè¬çã«å
èªã¿ãµã€ãã® Cookie ãžã®ã¢ã¯ã»ã¹ãåŒãèµ·ãããŸããïŒäŸãã°ã amazon ã Google ã§æ€çŽ¢ãããšãã Google ã®çµæããŒãžã¯ www.amazon.com google.co.jp ã§æ€çŽ¢ããå Žå㯠www.amazon.co.jp ãå
èªã¿ãããã©ãŠã¶ãŒã« Cookie ãéãããŠããŸãã Firefox 㧠ãµãŒãããŒãã£ã® Cookie ããããã¯ããã«ã¯ã<a class="external" href="http://support.mozilla.com/kb/Disabling+third+party+cookies" rel="external" title="http://support.mozilla.com/kb/Disabling+third+party+cookies">Disabling third party cookies</a> ãåç
§ããŠãã ãããïŒ</p> + +<h3 id="What_about....3F" name="What_about....3F">ä»ã«ã¯...?</h3> + +<p>ãªã³ã¯ã®å
èªã¿æ©èœã«ã€ããŠè³ªåãã³ã¡ã³ããªã©ãããŸããããç§ã®æ¹ãŸã§ãæ°è»œã«ã©ããã :-)</p> + +<h4 id="See_also..." name="See_also...">é¢é£æ
å ±...</h4> + +<p><a class="external" href="http://www.edochan.com/programming/pf.htm">Prefetching Hints</a></p> + +<div class="originaldocinfo"> +<h2 id="Original_Document_Information" name="Original_Document_Information">åææ
å ±</h2> + +<ul> + <li>èè
: Darin Fisher (darin at meer dot net)</li> + <li>æçµæŽæ°æ¥: Updated: March 3, 2003</li> +</ul> +</div> diff --git a/files/ja/web/http/messages/index.html b/files/ja/web/http/messages/index.html new file mode 100644 index 0000000000..9f0f7edae5 --- /dev/null +++ b/files/ja/web/http/messages/index.html @@ -0,0 +1,145 @@ +--- +title: HTTP ã¡ãã»ãŒãž +slug: Web/HTTP/Messages +tags: + - Guide + - HTTP + - WebMechanics + - ã¬ã€ã +translation_of: Web/HTTP/Messages +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary">HTTP ã¡ãã»ãŒãžã¯ããµãŒããŒãšã¯ã©ã€ã¢ã³ããããŒã¿ã亀æããæ段ã§ããã¯ã©ã€ã¢ã³ããéä¿¡ããŠãµãŒããŒã«ã¢ã¯ã·ã§ã³ãèµ·ãããã<em>ãªã¯ãšã¹ã</em>ãšããµãŒããŒã®åçã§ãã<em>ã¬ã¹ãã³ã¹</em>ã®ã2 çš®é¡ã®ã¡ãã»ãŒãžããããŸãã</p> + +<p>HTTP ã¡ãã»ãŒãžã¯ ASCII ã§ãšã³ã³ãŒããããããã¹ãæ
å ±ã§æ§æãããŠãããè€æ°ã®è¡ã«ãŸããããŸããHTTP/1.1 ããã³ããããåã®ããŒãžã§ã³ã®ãããã³ã«ã§ã¯ãã¡ãã»ãŒãžãã³ãã¯ã·ã§ã³å
ã§ãã®ãŸãŸéä¿¡ãããŸããHTTP/2 ã§ã¯ã人éãèªãã圢åŒã®ã¡ãã»ãŒãžã HTTP ãã¬ãŒã ã«åå²ããŠãæé©åãããã©ãŒãã³ã¹ã®åäžãå®çŸããŸãã</p> + +<p>ãŠã§ãéçºè
ããŠã§ã管çè
ããããããã¹ã圢åŒã® HTTP ã¡ãã»ãŒãžãäœæããããšã¯ãã£ãã«ãããŸããããŠã§ããã©ãŠã¶ãŒããããã·ããŠã§ããµãŒããŒãšãã£ããœãããŠã§ã¢ãè¡ããŸããããã㯠HTTP ã¡ãã»ãŒãžãèšå®ãã¡ã€ã« (ãããã·ããµãŒããŒ)ãAPI (ãã©ãŠã¶ãŒ)ããããã¯ä»ã®ã€ã³ã¿ãŒãã§ã€ã¹ã«ãã£ãŠæäŸããŸãã</p> + +<p><img alt="From a user-, script-, or server- generated event, an HTTP/1.x msg is generated, and if HTTP/2 is in use, it is binary framed into an HTTP/2 stream, then sent." src="https://mdn.mozillademos.org/files/13825/HTTPMsg2.png" style="height: 538px; width: 1174px;"></p> + +<p>HTTP/2 ã®ãã€ããªãã¬ãŒã åæ¹åŒã¯ãé©çšããã API ãèšå®ãã¡ã€ã«ã®å€æŽãå¿
èŠãšããªãããã«èšèšãããŠããŸããããã¯ãŠãŒã¶ãŒã«å¯ŸããŠééçã§ãã</p> + +<p>HTTP ã®ãªã¯ãšã¹ããã¬ã¹ãã³ã¹ã¯äŒŒãæ§é ãå
±çšããŠããã以äžã®èŠçŽ ã§æ§æãããŸãã</p> + +<ol> + <li>å®è¡ãããªã¯ãšã¹ãããŸãã¯æåã倱æãã®ç¶æ
ãè¡šã<em>éå§è¡</em>ãéå§è¡ã¯åžžã« 1 è¡ã§ãã</li> + <li>ãªã¯ãšã¹ãã®è©³çŽ°ã瀺ãããŸãã¯ã¡ãã»ãŒãžã«å«ãŸããæ¬æã説æãããçç¥å¯èœãª <em>HTTP ããããŒ</em>äžåŒã</li> + <li>ãªã¯ãšã¹ãã®ã¡ã¿æ
å ±ããã¹ãŠéä¿¡ãããããšã瀺ã空è¡ã</li> + <li>ãªã¯ãšã¹ãã«é¢é£ä»ããããããŒã¿ (HTML ãã©ãŒã ã®å
容ãªã©)ããããã¯ã¬ã¹ãã³ã¹ã«é¢é£ä»ããããããã¥ã¡ã³ããå«ããçç¥å¯èœãª<em>æ¬æ</em>ãæ¬æãååšããããšããã®ãµã€ãºã¯ãéå§è¡ã HTTP ããããŒã§æå®ããŸãã</li> +</ol> + +<p>HTTP ã¡ãã»ãŒãžã®éå§è¡ãš HTTP ããããŒã¯ããŸãšããŠãªã¯ãšã¹ãã®<em>ããã</em>ãšããŠç¥ãããŠããŸããäžæ¹ããã€ããŒãã¯<em>æ¬æ</em>ãšããŠç¥ãããŠããŸãã</p> + +<p><img alt="Requests and responses share a common structure in HTTP" src="https://mdn.mozillademos.org/files/13827/HTTPMsgStructure2.png" style="height: 368px; width: 1239px;"></p> + +<h2 id="HTTP_Requests" name="HTTP_Requests">HTTP ãªã¯ãšã¹ã</h2> + +<h3 id="Start_line" name="Start_line">éå§è¡</h3> + +<p>HTTP ãªã¯ãšã¹ãã¯ãã¢ã¯ã·ã§ã³ãå§ããããã«ã¯ã©ã¢ã³ããããµãŒããŒãžéãããŸãããã®<em>éå§è¡</em>ã«ã¯ã3 ã€ã®èŠçŽ ãå«ãŸããŠããŸãã</p> + +<ol> + <li><em><a href="/ja/docs/Web/HTTP/Methods">HTTP ã¡ãœãã</a></em>ãå®è¡ããã¢ã¯ã·ã§ã³ãè¡šããåè© ({{HTTPMethod("GET")}}ã{{HTTPMethod("PUT")}}ã{{HTTPMethod("POST")}} ãªã©) ãŸãã¯åè© ({{HTTPMethod("HEAD")}}ã{{HTTPMethod("OPTIONS")}})ãäŸãã° <code>GET</code> ã¯ãªãœãŒã¹ãåã蟌ãããšã<code>POST</code> ã¯ããŒã¿ããµãŒããŒãžéä¿¡ããããš (ãªãœãŒã¹ãäœæãŸãã¯å€æŽããããããã¯è¿éããäžæçãªããã¥ã¡ã³ããçæãã) ããšã瀺ããŸãã</li> + <li><em>ãªã¯ãšã¹ã察象</em>ãé垞㯠{{glossary("URL")}} ã§ããããããã³ã«ãããŒãããã¡ã€ã³ã®çµ¶å¯Ÿãã¹ã¯éåžžããªã¯ãšã¹ãã®ç¶æ³ããæããã«ãããŸãããªã¯ãšã¹ã察象ã®åœ¢åŒã¯ãHTTP ã¡ãœããã«ããç°ãªããŸãã以äžã®ãããªåœ¢åŒããããŸãã + <ul> + <li>æåŸã« <code>'?'</code> ãšã¯ãšãªãŒæååããã絶察ãã¹ããã㯠<em>origin form</em> ãšããŠç¥ãããŠãããã£ãšãäžè¬çãªåœ¢åŒã§ããã<code>GET</code>ã<code>POST</code>ã<code>HEAD</code>ã<code>OPTIONS</code> ã¡ãœããã§äœ¿çšããŸãã<br> + <code>POST / HTTP/1.1<br> + GET /background.png HTTP/1.0<br> + HEAD /test.html?query=alibaba HTTP/1.1<br> + OPTIONS /anypage.html HTTP/1.0</code></li> + <li><em>absolute form</em> ãšããŠç¥ãããŠããå®å
šãª URL ã¯ãäž»ã«ãããã·ãžæ¥ç¶ããéã« <code>GET</code> ã§äœ¿çšããŸãã<br> + <code>GET http://developer.mozilla.org/en-US/docs/Web/HTTP/Messages HTTP/1.1</code></li> + <li>ãã¡ã€ã³åãšããŒã (çç¥å¯èœã<code>':'</code> ãåã«ã€ãã) ã§æ§æããããURL ã® authority ã®éšå㯠<em>authority form</em> ãšåŒã°ããŸãããã㯠<code>CONNECT</code> 㧠HTTP ãã³ãã«ãèšå®ãããšãã«éã䜿çšãããŸãã<br> + <code>CONNECT developer.mozilla.org:80 HTTP/1.1</code></li> + <li>åãªãã¢ã¹ã¿ãªã¹ã¯ (<code>'*'</code>) ã§ãã <em>asterisk form</em> 㯠<code>OPTIONS</code> ã§äœ¿çšãããŠããããµãŒããŒå
šäœãè¡šããŸãã<br> + <code>OPTIONS * HTTP/1.1</code></li> + </ul> + </li> + <li><em>HTTP ããŒãžã§ã³</em>ãããã¯ã¡ãã»ãŒãžã®æ®ãã®éšåã®æ§é ãå®çŸ©ããŠãããã¬ã¹ãã³ã¹ã§äœ¿çšããããšãæ³å®ããŠããããŒãžã§ã³ã瀺ã圹å²ããããŸãã</li> +</ol> + +<h3 id="Headers" name="Headers">ããããŒ</h3> + +<p>ãªã¯ãšã¹ãã® <a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a> ã¯ãHTTP ããããŒã®äžå®ã®åºæ¬æ§é ã«åŸããŸãã倧æåã»å°æåãåºå¥ããªãæååã®åŸã«ã³ãã³ (<code>':'</code>) ãšãããããŒã«å¿ããæ§é ã®å€ãç¶ããŸããå€ãå«ãããããŒå
šäœã¯ 1 è¡ã§æ§æãããŠããããšãŠãé·ããªãå ŽåããããŸãã</p> + +<p>䜿çšã§ãããªã¯ãšã¹ãããããŒã¯å€æ°ãããŸãããããã¯ããã€ãã®ã°ã«ãŒãã«åé¡ãããŸãã</p> + +<ul> + <li><em>äžè¬ããããŒ</em>ã¯ã {{HTTPHeader("Via")}} ãªã©ãã¡ãã»ãŒãžå
šäœã«é©çšããããã®ã§ãã</li> + <li><em>ãªã¯ãšã¹ãããããŒ</em>ã¯ã {{HTTPHeader("User-Agent")}}, {{HTTPHeader("Accept-Type")}}, æå®ãããšãªã¯ãšã¹ããå€æŽãããã® ({{HTTPHeader("Accept-Language")}} ãªã©)ãç¶æ³ã瀺ããã® ({{HTTPHeader("Referer")}} ãªã©)ãæ¡ä»¶ãäžãããã® ({{HTTPHeader("If-None")}} ãªã©) ããããŸãã</li> + <li><em>ãšã³ãã£ãã£ããããŒ</em>㯠{{HTTPHeader("Content-Length")}} ãªã©ããªã¯ãšã¹ãã®æ¬æã«é©çšãããŸããåœç¶ãªããããªã¯ãšã¹ãå
ã«æ¬æããªãå Žåã¯ãããã®ããããŒãéä¿¡ãããŸããã</li> +</ul> + +<p><img alt="Example of headers in an HTTP request" src="https://mdn.mozillademos.org/files/13821/HTTP_Request_Headers2.png" style="height: 280px; width: 872px;"></p> + +<h3 id="Body" name="Body">æ¬æ</h3> + +<p>ãªã¯ãšã¹ãã®æåŸã®éšåãæ¬æã§ããæ¬æãååšããªããªã¯ãšã¹ãããããŸãããªãœãŒã¹ãåã蟌ããªã¯ãšã¹ãã§ãã <code>GET</code>, <code>HEAD</code>, <code>DELETE</code>, <code>OPTIONS</code> ã¯éåžžãæ¬æã¯äžèŠã§ãããµãŒããŒå
ã®ããŒã¿ãæŽæ°ããããã«ããŒã¿ãéä¿¡ãããªã¯ãšã¹ããããã <code>POST</code> ãªã¯ãšã¹ãã§ãããããŸã (HTML ãã©ãŒã ã®ããŒã¿ãæã€)ã</p> + +<p>æ¬æã¯ã倧ãã 2 çš®é¡ã«åé¡ãããŸãã</p> + +<ul> + <li>åäžãªãœãŒã¹ã®æ¬æã1 åã®ãã¡ã€ã«ã§æ§æããã{{HTTPHeader("Content-Type")}} ãš {{HTTPHeader("Content-Length")}} ã® 2 ã€ã®ããããŒã§å®çŸ©ãããŸãã</li> + <li><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types#multipartform-data">è€æ°ãªãœãŒã¹ã®æ¬æ</a>ããã«ãããŒãã®æ¬æã§æ§æããããããããç°ãªãæ
å ±ãæã¡ãŸããããã¯äž»ã«ã <a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã </a>ãšé¢é£ä»ããããŸãã</li> +</ul> + +<h2 id="HTTP_Responses" name="HTTP_Responses">HTTP ã¬ã¹ãã³ã¹</h2> + +<h3 id="Status_line" name="Status_line">ã¹ããŒã¿ã¹è¡</h3> + +<p>HTTP ã¬ã¹ãã³ã¹ã®éå§è¡ã¯<em>ã¹ããŒã¿ã¹è¡</em>ãšåŒã°ãã以äžã®æ
å ±ãæã¡ãŸãã</p> + +<ol> + <li><em>ãããã³ã«ããŒãžã§ã³</em>ãéåžž <code>HTTP/1.1</code> ã§ãã</li> + <li><em>ã¹ããŒã¿ã¹ã³ãŒã</em>ããªã¯ãšã¹ããæåããã倱æãããã瀺ããŸããäžè¬çãªã¹ããŒã¿ã¹ã³ãŒã㯠{{HTTPStatus("200")}}, {{HTTPStatus("404")}}, {{HTTPStatus("302")}} ã§ãã</li> + <li><em>ã¹ããŒã¿ã¹æåå</em>ãæçãªåãªãæ
å ±ã§ããã人éã HTTP ã¡ãã»ãŒãžãç解ããã®ãå©ããããã«ãã¹ããŒã¿ã¹ã³ãŒããããã¹ãã§èª¬æããŸãã</li> +</ol> + +<p>äžè¬çã«ãã¹ããŒã¿ã¹è¡ã¯ <code>HTTP/1.1 404 Not Found.</code> ã®ããã«ãªããŸãã</p> + +<h3 id="Headers_2" name="Headers_2">ããããŒ</h3> + +<p>ã¬ã¹ãã³ã¹ã® <a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a>ã¯ãä»ã®ããããŒãšåæ§ã«äžå®ã®åºæ¬æ§é ã«åŸããŸãã倧æåã»å°æåãåºå¥ããªãæååã®åŸã«ã³ãã³ (<code>':'</code>) ãšãããããŒã®çš®é¡ã«å¿ããæ§é ã®å€ãç¶ããŸããå€ãå«ãããããŒå
šäœã¯ 1 è¡ã§æ§æãããŸãã</p> + +<p>䜿çšã§ããã¬ã¹ãã³ã¹ããããŒã¯å€æ°ãããŸãããããã¯ããã€ãã®ã°ã«ãŒãã«åé¡ãããŸãã</p> + +<ul> + <li><em>äžè¬ããããŒ</em>㯠{{HTTPHeader("Via")}} ãªã©ãã¡ãã»ãŒãžå
šäœã«é©çšããããã®ã§ãã</li> + <li><em>ã¬ã¹ãã³ã¹ããããŒ</em>㯠{{HTTPHeader("Vary")}} ã {{HTTPHeader("Accept-Ranges")}} ãªã©ãã¹ããŒã¿ã¹è¡ã§äŒããããªããµãŒããŒã®è¿œå æ
å ±ãäžããŸãã</li> + <li><em>ãšã³ãã£ãã£ããããŒ</em>㯠{{HTTPHeader("Content-Length")}} ãªã©ãã¬ã¹ãã³ã¹ã®æ¬æã«é©çšãããŸããéåžžãã¬ã¹ãã³ã¹å
ã«æ¬æããªãå Žåã¯ãã®ãããªããããŒã¯éä¿¡ãããŸããã</li> +</ul> + +<p><img alt="Example of headers in an HTTP response" src="https://mdn.mozillademos.org/files/13823/HTTP_Response_Headers2.png" style="height: 344px; width: 805px;"></p> + +<h3 id="Body_2" name="Body_2">æ¬æ</h3> + +<p>ã¬ã¹ãã³ã¹ã®æåŸã®éšåãæ¬æã§ããæ¬æãæããªãã¬ã¹ãã³ã¹ããããŸãã {{HTTPStatus("201")}} <strong><code>Created</code></strong> ã {{HTTPStatus("204")}} <strong><code>No Content</code></strong> ãšãã£ãã¹ããŒã¿ã¹ã³ãŒãã®ã¬ã¹ãã³ã¹ã¯éåžžãæ¬æããããŸããã</p> + +<p>æ¬æã¯ã倧ãã 3 çš®é¡ã«åé¡ãããŸãã</p> + +<ul> + <li>倧ãããå€æããŠãã 1 åã®ãã¡ã€ã«ã§æ§æããããåäžãªãœãŒã¹ã®æ¬æã {{HTTPHeader("Content-Type")}} ãš {{HTTPHeader("Content-Length")}} ã® 2 ã€ã®ããããŒã§å®çŸ©ãããŸãã</li> + <li>倧ãããäžæ㪠1 åã®ãã¡ã€ã«ã§æ§æããããåäžãªãœãŒã¹ã®æ¬æã {{HTTPHeader("Transfer-Encoding")}} ã <code>chunked</code> ã«èšå®ããŠã chunked 圢åŒã§ãšã³ã³ãŒããããŸãã</li> + <li><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types#multipartform-data">è€æ°ãªãœãŒã¹ã®æ¬æ</a>ããã«ãããŒãã®æ¬æã§æ§æããããããããç°ãªãæ
å ±ã®ã»ã¯ã·ã§ã³ãæã¡ãŸããããã¯æ¯èŒçãŸãã§ãã</li> +</ul> + +<h2 id="HTTP2_Frames" name="HTTP2_Frames">HTTP/2 ãã¬ãŒã </h2> + +<p>HTTP/1.x ã®ã¡ãã»ãŒãžã«ã¯ãããã©ãŒãã³ã¹ã®æ¬ ç¹ããããŸãã</p> + +<ul> + <li>ããããŒã¯æ¬æãšç°ãªããå§çž®ãããŸããã</li> + <li>ããã¡ãã»ãŒãžãšæ¬¡ã®ã¡ãã»ãŒãžã§ããããŒãé
·äŒŒããŠããããšããããããŸãããããã§ãè€æ°ã®ã³ãã¯ã·ã§ã³ã«ããã£ãŠç¹°ãè¿ãããŸãã</li> + <li>å€éåããããšãã§ããŸãããåããµãŒããŒã«å¯ŸããŠè€æ°ã®ã³ãã¯ã·ã§ã³ãéããªããã°ãªããŸããããŸãããŠã©ãŒã ç¶æ
ã® TCP ã³ãã¯ã·ã§ã³ã¯ã³ãŒã«ãç¶æ
ã®ã³ãã¯ã·ã§ã³ããå¹ççã§ãã</li> +</ul> + +<p>HTTP/2 ã¯æ¬¡ã®æ®µéã«é²ã¿ãŸããã HTTP/1.x ã®ã¡ãã»ãŒãžããã¹ããªãŒã å
ã«åã蟌ãŸãããã¬ãŒã ã«åå²ããŸããããŒã¿ã®ãã¬ãŒã ãšããããŒã®ãã¬ãŒã ã¯åºå¥ãããããããŒã®å§çž®ãå¯èœã«ãªããŸãã<em>å€éå</em>ãšåŒã°ããåŠçã«ãã£ãŠè€æ°ã®ã¹ããªãŒã ããŸãšããããäžå±€ã® TCP ã³ãã¯ã·ã§ã³ã®å¹çãåäžãããããšãã§ããŸãã</p> + +<p><img alt="HTTP/2 modify the HTTP message to divide them in frames (part of a single stream), allowing for more optimization." src="https://mdn.mozillademos.org/files/13819/Binary_framing2.png" style="height: 735px; width: 810px;"></p> + +<p>HTTP ãã¬ãŒã ã¯ããŠã§ãéçºè
ã«ãã£ãŠééçã«ãªããŸãããã㯠HTTP/2 ã«ãããŠã HTTP/1.1 ã¡ãã»ãŒãžãšåºç€ãšãªããã©ã³ã¹ããŒãå±€ãšã®éã®ãããªãã¹ãããã§ãã HTTP ãã¬ãŒã ãå©çšããããã«ãŠã§ãéçºè
ã䜿çšãã API ãå€æŽããå¿
èŠã¯ãããŸããããã©ãŠã¶ãŒãšãµãŒããŒã®äž¡æ¹ã§å©çšå¯èœã«ãªãã°ã HTTP/2 ãæå¹ã«ãªã䜿çšãããŸãã</p> + +<h2 id="Conclusion" name="Conclusion">ãŸãšã</h2> + +<p>HTTP ã¡ãã»ãŒãžã¯ã HTTP ã䜿çšããéã«éèŠãªãã®ã§ãããã®æ§é ã¯ã·ã³ãã«ã§ãããæ¡åŒµæ§ãé«ããªã£ãŠããŸãã HTTP/2 ã®ãã¬ãŒã åæ©èœã¯ã HTTP/1.x ã®æ§æãšåºç€ãšãªããã©ã³ã¹ããŒããããã³ã«ã®éã®æ°ããªäžéå±€ã§ãããæ ¹åºã¯å€ãããŸãããå®èšŒãããä»çµã¿ã®äžã«æ§ç¯ãããŸããã</p> diff --git a/files/ja/web/http/methods/connect/index.html b/files/ja/web/http/methods/connect/index.html new file mode 100644 index 0000000000..59e7113189 --- /dev/null +++ b/files/ja/web/http/methods/connect/index.html @@ -0,0 +1,88 @@ +--- +title: CONNECT +slug: Web/HTTP/Methods/CONNECT +tags: + - HTTP + - Reference + - ãªã¯ãšã¹ãã¡ãœãã +translation_of: Web/HTTP/Methods/CONNECT +--- +<div>{{HTTPSidebar}}</div> + +<p><strong>HTTP ã® <code>CONNECT</code> ã¡ãœãã</strong>ã¯ããªã¯ãšã¹ããããªãœãŒã¹ãçšããåæ¹åã®ã³ãã¥ãã±ãŒã·ã§ã³ãéå§ããŸããããã¯ãã³ããªã³ã°ãéå§ãããšãã«äœ¿çšãããŸãã</p> + +<p>äŸãã°ã <code>CONNECT</code> ã¡ãœãã㯠{{Glossary("SSL")}} ({{Glossary("HTTPS")}}) ã䜿çšãããŠã§ããµã€ãã«ã¢ã¯ã»ã¹ããéã«äœ¿çšãããŸããã¯ã©ã€ã¢ã³ã㯠HTTP {{Glossary("Proxy server", "ãããã·ãµãŒããŒ")}}ã«åžæããå®å
ãžã® <a href="/ja/docs/Glossary/Transmission_Control_Protocol_(TCP)">TCP</a> ã³ãã¯ã·ã§ã³ããã³ããªã³ã°ããããã«äŸé ŒããŸãããã®å Žåããããã·ãµãŒããŒã¯ã¯ã©ã€ã¢ã³ãã«ä»£ãã£ãŠã³ãã¯ã·ã§ã³ã®äœæãç¶ç¶ããŸããäžåºŠã³ãã¯ã·ã§ã³ããµãŒããŒã«ãã£ãŠç¢ºç«ããããšã{{Glossary("Proxy server", "ãããã·ãµãŒããŒ")}}ã¯ã¯ã©ã€ã¢ã³ãå®ãŠ/ã¯ã©ã€ã¢ã³ãçºã® <a href="/ja/docs/Glossary/Transmission_Control_Protocol_(TCP)">TCP</a> ã¹ããªãŒã ã®ãããã·ãç¶ç¶ããŸãã</p> + +<p><code>CONNECT</code> ã¯ããããã€ããã (hop-by-hop) ã®ã¡ãœããã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ãªã¯ãšã¹ãã®æ¬æ</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">æåæã®ã¬ã¹ãã³ã¹ã®æ¬æ</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Safe", "å®å
šæ§")}}</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Idempotent", "ã¹ãçæ§")}}</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Cacheable", "ãã£ãã·ã¥")}}</th> + <td>äžå¯</td> + </tr> + <tr> + <th scope="row">HTML ãã©ãŒã ã§ã®äœ¿çš</th> + <td>äžå¯</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">CONNECT www.example.com:443 HTTP/1.1 +</pre> + +<h2 id="äŸ">äŸ</h2> + +<p>ãããã·ãµãŒãã®äžã«ã¯ãã³ãã«ã®äœæã«èªèšŒãå¿
èŠãšãããã®ããããŸãã {{HTTPHeader("Proxy-Authorization")}} ããããŒãåç
§ããŠãã ããã</p> + +<pre class="line-numbers language-html">CONNECT server.example.com:80 HTTP/1.1 +Host: server.example.com:80 +Proxy-Authorization: basic aGVsbG86d29ybGQ=</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "CONNECT", "4.3.6")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.methods.CONNECT")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{Glossary("Proxy server")}}</li> + <li>{{HTTPHeader("Proxy-Authorization")}}</li> +</ul> diff --git a/files/ja/web/http/methods/delete/index.html b/files/ja/web/http/methods/delete/index.html new file mode 100644 index 0000000000..a5bf20d4dc --- /dev/null +++ b/files/ja/web/http/methods/delete/index.html @@ -0,0 +1,102 @@ +--- +title: DELETE +slug: Web/HTTP/Methods/DELETE +tags: + - HTTP + - HTTP ãªã¯ãšã¹ãã¡ãœãã + - HTTPã¡ãœãã + - Reference + - ãªã¯ãšã¹ãã¡ãœãã +translation_of: Web/HTTP/Methods/DELETE +--- +<div>{{HTTPSidebar}}</div> + +<p><strong>HTTP ã® <code>DELETE</code> ãªã¯ãšã¹ãã¡ãœãã</strong> ã¯ç¹å®ã®ãªãœãŒã¹ãåé€ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ãªã¯ãšã¹ãã®æ¬æ</th> + <td>å¯</td> + </tr> + <tr> + <th scope="row">æåæã®ã¬ã¹ãã³ã¹ã®æ¬æ</th> + <td>å¯</td> + </tr> + <tr> + <th scope="row">{{Glossary("Safe","å®å
šæ§")}}</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Idempotent","ã¹ãçæ§")}}</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Cacheable","ãã£ãã·ã¥")}}</th> + <td>äžå¯</td> + </tr> + <tr> + <th scope="row"><a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã </a>ã§ã®äœ¿çš</th> + <td>äžå¯</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">DELETE /file.html HTTP/1.1 +</pre> + +<h2 id="Example" name="Example">äŸ</h2> + +<h3 id="Request" name="Request">ãªã¯ãšã¹ã</h3> + +<pre>DELETE /file.html HTTP/1.1</pre> + +<h3 id="Responses" name="Responses">ã¬ã¹ãã³ã¹</h3> + +<p><code>DELETE</code> ã¡ãœãããæ£åžžã«åãä»ããããå Žåãå¯èœæ§ãããã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒããããã€ããããŸãã</p> + +<ul> + <li>{{HTTPStatus("202")}} (<code>Accepted</code>) ã¯ãåŠçãæåããå¯èœæ§ã¯é«ããããŸã æç«ã¯ããŠããªãå Žåã®ã¹ããŒã¿ã¹ã³ãŒãã</li> + <li>{{HTTPStatus("204")}} (<code>No Content</code>) ã¯ãåŠçã¯å®äºããŠãããã€ããããªãæ
å ±ãæäŸãããªãå Žåã®ã¹ããŒã¿ã¹ã³ãŒãã</li> + <li>{{HTTPStatus("200")}} (<code>OK</code>) ã¯ã åŠçã¯å®äºããŠãããã€ãã¬ã¹ãã³ã¹ã¡ãã»ãŒãžã«ã¹ããŒã¿ã¹ãè¡šãè¡šçŸãå«ãã§ããå Žåã®ã¹ããŒã¿ã¹ã³ãŒãã</li> +</ul> + +<pre>HTTP/1.1 200 OK +Date: Wed, 21 Oct 2015 07:28:00 GMT + +<html> + <body> + <h1>File deleted.</h1> + </body> +</html></pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "DELETE", "4.3.5")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.methods.DELETE")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>HTTP ã¹ããŒã¿ã¹: {{HTTPStatus("200")}}, {{HTTPStatus("202")}}, {{HTTPStatus("204")}}</li> +</ul> diff --git a/files/ja/web/http/methods/get/index.html b/files/ja/web/http/methods/get/index.html new file mode 100644 index 0000000000..af3a799447 --- /dev/null +++ b/files/ja/web/http/methods/get/index.html @@ -0,0 +1,80 @@ +--- +title: GET +slug: Web/HTTP/Methods/GET +tags: + - HTTP + - HTTP ãªã¯ãšã¹ãã¡ãœãã + - Reference + - Request method + - ãªã¯ãšã¹ãã¡ãœãã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Methods/GET +--- +<p>{{HTTPSidebar}}</p> + +<p><strong>HTTP ã® <code>GET</code> ã¡ãœãã</strong>ã¯ãç¹å®ã®ãªãœãŒã¹ã®è¡šçŸããªã¯ãšã¹ãããŸãã <code>GET</code> ã䜿çšãããªã¯ãšã¹ãã¯ããŒã¿ãåãåãã ãã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ãªã¯ãšã¹ãã®æ¬æ</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">æåæã®ã¬ã¹ãã³ã¹ã®æ¬æ</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Safe", "å®å
šæ§")}}</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Idempotent", "ã¹ãçæ§")}}</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Cacheable", "ãã£ãã·ã¥")}}</th> + <td>å¯</td> + </tr> + <tr> + <th scope="row">HTML ãã©ãŒã ã§ã®äœ¿çš</th> + <td>å¯</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">GET /index.html +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "GET", "4.3.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.methods.GET")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a></li> + <li>{{HTTPHeader("Range")}}</li> + <li>{{HTTPMethod("POST")}}</li> +</ul> diff --git a/files/ja/web/http/methods/head/index.html b/files/ja/web/http/methods/head/index.html new file mode 100644 index 0000000000..9b42776f26 --- /dev/null +++ b/files/ja/web/http/methods/head/index.html @@ -0,0 +1,80 @@ +--- +title: HEAD +slug: Web/HTTP/Methods/HEAD +tags: + - HTTP + - Reference + - Request method + - ãªã¯ãšã¹ãã¡ãœãã +translation_of: Web/HTTP/Methods/HEAD +--- +<div>{{HTTPSidebar}}</div> + +<p><strong>HTTP ã® <code>HEAD</code> ã¡ãœãã</strong>ã¯ãæå®ããããªãœãŒã¹ã HTTP {{HTTPMethod("GET")}} ã¡ãœããã§ãªã¯ãšã¹ãããæã«è¿ãããããããŒããªã¯ãšã¹ãããŸãããã®ãããªãªã¯ãšã¹ãã«ãã£ãŠãäŸãã°å€§ããªãªãœãŒã¹ãããŠã³ããŒããããã©ãããäºåã«æ±ºå®ããŠã垯åå¹
ãç¯çŽãããããããšãã§ããŸãã</p> + +<p><code>HEAD</code> ã¡ãœãããžã®ã¬ã¹ãã³ã¹ã«ã¯æ¬æãå«ãŸããŠã¯ãããŸããããã£ãå Žåã¯ç¡èŠããªããã°ãªããŸããããã ããæ¬æã®ã³ã³ãã³ããèšè¿°ãã{{glossary("Entity header", "ãšã³ãã£ãã£ããããŒ")}}ãäŸãã° {{HTTPHeader("Content-Length")}} ãªã©ãã¬ã¹ãã³ã¹ã«å«ãŸããå ŽåããããŸãããããã¯ã空ã§ããã¹ã <code>HEAD</code> ã¬ã¹ãã³ã¹ã®æ¬æãšã¯é¢ä¿ãããŸãããã {{HTTPMethod("GET")}} ã¡ãœããã䜿çšããŠåæ§ã®ãªã¯ãšã¹ããè¡ã£ãæã«ã¯ããã®æ¬æãã¬ã¹ãã³ã¹ãšããŠè¿ãããŸãã</p> + +<p><code>HEAD</code> ãªã¯ãšã¹ãã®çµæãã {{HTTPMethod("GET")}} ãªã¯ãšã¹ãã®åŸã§ãã£ãã·ã¥ããããªãœãŒã¹ãå€ããªã£ãŠããããšã瀺ããŠããå Žåã <code>GET</code> ãªã¯ãšã¹ããè¡ãããªããŠããã£ãã·ã¥ãç¡å¹åãããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ãªã¯ãšã¹ãã®æ¬æ</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">æåæã®ã¬ã¹ãã³ã¹ã®æ¬æ</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Safe", "å®å
šæ§")}}</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Idempotent", "ã¹ãçæ§")}}</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Cacheable", "ãã£ãã·ã¥")}}</th> + <td>å¯</td> + </tr> + <tr> + <th scope="row"><a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã </a>ã§ã®äœ¿çš</th> + <td>äžå¯</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">HEAD /index.html +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "HEAD", "4.3.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.methods.HEAD")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPMethod("GET")}}</li> +</ul> diff --git a/files/ja/web/http/methods/index.html b/files/ja/web/http/methods/index.html new file mode 100644 index 0000000000..9b2671807e --- /dev/null +++ b/files/ja/web/http/methods/index.html @@ -0,0 +1,69 @@ +--- +title: HTTP ãªã¯ãšã¹ãã¡ãœãã +slug: Web/HTTP/Methods +tags: + - HTTP + - Methods + - Reference +translation_of: Web/HTTP/Methods +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã§ã¯ããªãœãŒã¹ã«å¯ŸããŠå®è¡ãããã¢ã¯ã·ã§ã³ã瀺ãäžé£ã®<strong>ãªã¯ãšã¹ãã¡ãœãã</strong>ãå®çŸ©ããŠããŸãããªã¯ãšã¹ãã¡ãœããã«ã¯åè©ãååšããŸããã <em>HTTP ã®è¿°èª</em>ãšèšãããããšããããŸããããããã®ã¡ãœãããããŸããŸãªæå³ãæã£ãŠããŸãããããã€ãã®å
±éçãªæ©èœããã¡ãœããã®ã°ã«ãŒãã§å
±æãããŠããŸããäŸãã°ããªã¯ãšã¹ãã¡ãœããã¯{{glossary("safe", "å®å
š")}}ã{{glossary("idempotent", "ã¹ãç")}}ã{{glossary("cacheable", "ãã£ãã·ã¥å¯èœ")}}ã§ããããšããããŸãã</p> + +<dl> + <dt><code><a href="/ja/docs/Web/HTTP/Methods/GET">GET</a></code></dt> + <dd><code>GET</code> ã¡ãœããã¯ãæå®ãããªãœãŒã¹ã®è¡šçŸããªã¯ãšã¹ãããŸãã <code>GET</code> ã䜿çšãããªã¯ãšã¹ãã¯ãããŒã¿ã®åã蟌ã¿ã«éããŸãã</dd> + <dt><code><a href="/ja/docs/Web/HTTP/Methods/HEAD">HEAD</a></code></dt> + <dd><code>HEAD</code> ã¡ãœãã㯠<code>GET</code> ãªã¯ãšã¹ããšåãã¬ã¹ãã³ã¹ãæ±ããŸãããã¬ã¹ãã³ã¹æ¬æã¯ãããŸããã</dd> + <dt><code><a href="/ja/docs/Web/HTTP/Methods/POST">POST</a></code></dt> + <dd><code>POST</code> ã¯æå®ãããªãœãŒã¹ã«å®äœãéä¿¡ããããã«äœ¿çšããã¡ãœããã§ããããµãŒããŒäžã®ç¶æ
ãå€æŽããããå¯äœçšãçºçãããããããšããããããŸãã</dd> + <dt><code><a href="/ja/docs/Web/HTTP/Methods/PUT">PUT</a></code></dt> + <dd><code>PUT</code> ã¡ãœããã¯å¯Ÿè±¡ãªãœãŒã¹ã®çŸåšã®è¡šçŸã®å
šäœãããªã¯ãšã¹ãã®ãã€ããŒãã§çœ®ãæããŸãã</dd> + <dt><code><a href="/ja/docs/Web/HTTP/Methods/DELETE">DELETE</a></code></dt> + <dd><code>DELETE</code> ã¡ãœããã¯ãæå®ãããªãœãŒã¹ãåé€ããŸãã</dd> + <dt><code><a href="/ja/docs/Web/HTTP/Methods/CONNECT">CONNECT</a></code></dt> + <dd><code>CONNECT</code> ã¡ãœããã¯ã察象ãªãœãŒã¹ã§èå¥ããããµãŒããŒãšã®éã«ãã³ãã«ã確ç«ããŸãã</dd> + <dt><code><a href="/ja/docs/Web/HTTP/Methods/OPTIONS">OPTIONS</a></code></dt> + <dd><code>OPTIONS</code> ã¡ãœããã¯ã察象ãªãœãŒã¹ã®éä¿¡ãªãã·ã§ã³ã瀺ãããã«äœ¿çšããŸãã</dd> + <dt><code><a href="/ja/docs/Web/HTTP/Methods/TRACE">TRACE</a></code></dt> + <dd><code>TRACE</code> ã¡ãœããã¯ã察象ãªãœãŒã¹ãžã®ãã¹ã«æ²¿ã£ãŠã¡ãã»ãŒãžã®ã«ãŒãããã¯ãã¹ããå®è¡ããŸãã</dd> + <dt><code><a href="/ja/docs/Web/HTTP/Methods/PATCH">PATCH</a></code></dt> + <dd><code>PATCH</code> ã¡ãœããã¯ããªãœãŒã¹ãéšåçã«å€æŽããããã«äœ¿çšããŸãã</dd> +</dl> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + <th scope="col">åè</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "Request methods", "4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + <td>GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE ãå®çŸ©ã</td> + </tr> + <tr> + <td>{{RFC("5789", "Patch method", "2")}}</td> + <td>PATCH Method for HTTP</td> + <td>PATCH ãå®çŸ©ã</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®äºææ§ããŒã¿ã«ååããã«ã¯ã <a href="https://github.com/mdn/browser-compat-data/blob/master/http/methods.json">https://github.com/mdn/browser-compat-data/blob/master/http/methods.json</a> ã«å¯ŸããŠãã«ãªã¯ãšã¹ããæžããŠãã ããã</div> + +<p>{{Compat("http/methods")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a></li> +</ul> diff --git a/files/ja/web/http/methods/options/index.html b/files/ja/web/http/methods/options/index.html new file mode 100644 index 0000000000..c867fac266 --- /dev/null +++ b/files/ja/web/http/methods/options/index.html @@ -0,0 +1,124 @@ +--- +title: OPTIONS +slug: Web/HTTP/Methods/OPTIONS +tags: + - HTTP + - Reference + - ãªã¯ãšã¹ãã¡ãœãã +translation_of: Web/HTTP/Methods/OPTIONS +--- +<div>{{HTTPSidebar}}</div> + +<p><strong>HTTP ã® <code>OPTIONS</code>ã¡ãœãã</strong>ã¯ã察象ãªãœãŒã¹ã®éä¿¡ãªãã·ã§ã³ãèšè¿°ããããã«äœ¿çšããŸããã¯ã©ã€ã¢ã³ã㯠<code>OPTIONS</code> ã¡ãœããã® URL ãæå®ãããããµãŒããŒå
šäœãåç
§ããã¢ã¹ã¿ãªã¹ã¯ïŒ*ïŒãæå®ããããšãã§ããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ãªã¯ãšã¹ãã®æ¬æ</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">æåæã®ã¬ã¹ãã³ã¹ã®æ¬æ</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Safe", "å®å
šæ§")}}</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Idempotent", "ã¹ãçæ§")}}</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Cacheable", "ãã£ãã·ã¥")}}</th> + <td>äžå¯</td> + </tr> + <tr> + <th scope="row">HTML ãã©ãŒã ã§ã®äœ¿çš</th> + <td>äžå¯</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">OPTIONS /index.html HTTP/1.1 +OPTIONS * HTTP/1.1 +</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<h3 id="Identifying_allowed_request_methods" name="Identifying_allowed_request_methods">èš±å¯ããããªã¯ãšã¹ãã¡ãœããã®èå¥</h3> + +<p>ãµãŒããŒã察å¿ããŠãããªã¯ãšã¹ãã¡ãœããã調ã¹ãã«ã¯ã <code>curl</code> ã䜿çšã㊠<code>OPTIONS</code> ãªã¯ãšã¹ããçºè¡ããŠãã ããã</p> + +<pre class="notranslate">curl -X OPTIONS http://example.org -i</pre> + +<p>ã¬ã¹ãã³ã¹ã«ã¯ãèš±å¯ãããŠããã¡ãœãããå«ãã {{HTTPHeader("Allow")}} ããããŒãå«ãŸããŸãã</p> + +<pre class="notranslate">HTTP/1.1 204 No Content +Allow: OPTIONS, GET, HEAD, POST +Cache-Control: max-age=604800 +Date: Thu, 13 Oct 2016 11:45:00 GMT +Expires: Thu, 20 Oct 2016 11:45:00 GMT +Server: EOS (lax004/2813) +x-ec-custom-error: 1 +</pre> + +<h3 id="Preflighted_requests_in_CORS" name="Preflighted_requests_in_CORS">CORS ã§ã®ããªãã©ã€ããªã¯ãšã¹ã</h3> + +<p><a href="/ja/docs/Web/HTTP/Access_control_CORS">CORS</a> ã§ã¯ã <code>OPTIONS</code> ã¡ãœããã䜿çšããããªãã©ã€ããªã¯ãšã¹ããéä¿¡ãããããããããã®åŒæ°ã䜿çšããŠãªã¯ãšã¹ããéä¿¡ã§ãããã©ããããµãŒããŒãã¬ã¹ãã³ã¹ã§è¿ãããšãã§ããŸãã {{HTTPHeader("Access-Control-Request-Method")}} ããããŒã¯ãããªãã©ã€ããªã¯ãšã¹ãã®äžéšãšããŠãæ¬çªã®ãªã¯ãšã¹ãã<code>POST</code> ãªã¯ãšã¹ãã¡ãœããã§éä¿¡ãããããšããµãŒããŒã«éç¥ããŸãã {{HTTPHeader("Access-Control-Request-Headers")}} ããããŒã¯ãæ¬çªã®ãªã¯ãšã¹ãã <code>X-PINGOTHER</code> ããã³ <code>Content-Type</code> ã«ã¹ã¿ã ããããŒãšå
±ã«éä¿¡ãããããšããµãŒããŒã«éç¥ããŸãããµãŒããŒã¯ããã®ãããªç¶æ³äžã§ãªã¯ãšã¹ããåãå
¥ãããã©ããã決å®ããæ©äŒãæã€ããã«ãªããŸããã</p> + +<pre class="notranslate">OPTIONS /resources/post-here/ HTTP/1.1 +Host: bar.other +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-us,en;q=0.5 +Accept-Encoding: gzip,deflate +Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 +Connection: keep-alive +Origin: http://foo.example +Access-Control-Request-Method: POST +Access-Control-Request-Headers: X-PINGOTHER, Content-Type</pre> + +<p>ãµãŒããŒã¯ {{HTTPHeader("Access-Control-Allow-Methods")}} ã§ã¬ã¹ãã³ã¹ãè¿ãã <code>POST</code>ã <code>GET</code>ãããã³ <code>OPTIONS</code> ã¯åé¡ã®ãªãœãŒã¹ãç
§äŒããå®è¡å¯èœãªã¡ãœããã§ããããšãäŒããŸãã ãã®ããããŒã¯ {{HTTPHeader("Allow")}} ã¬ã¹ãã³ã¹ããããŒã«äŒŒãŠããŸããã {{HTTPHeader("Access-Control-Allow-Methods")}} ã¯CORS ã®ã³ã³ããã¹ãå
ã§å³å¯ã«äœ¿çšãããŸãã</p> + +<pre class="notranslate">HTTP/1.1 204 No Content +Date: Mon, 01 Dec 2008 01:15:39 GMT +Server: Apache/2.0.61 (Unix) +Access-Control-Allow-Origin: http://foo.example +Access-Control-Allow-Methods: POST, GET, OPTIONS +Access-Control-Allow-Headers: X-PINGOTHER, Content-Type +Access-Control-Max-Age: 86400 +Vary: Accept-Encoding, Origin +Keep-Alive: timeout=2, max=100 +Connection: Keep-Alive</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "OPTIONS", "4.3.7")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.methods.OPTIONS")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Allow")}} header</li> + <li><a href="/ja/docs/Web/HTTP/Access_control_CORS">CORS</a></li> +</ul> diff --git a/files/ja/web/http/methods/patch/index.html b/files/ja/web/http/methods/patch/index.html new file mode 100644 index 0000000000..16f60f9a2a --- /dev/null +++ b/files/ja/web/http/methods/patch/index.html @@ -0,0 +1,105 @@ +--- +title: PATCH +slug: Web/HTTP/Methods/PATCH +tags: + - HTTP + - Reference + - ãªã¯ãšã¹ãã¡ãœãã +translation_of: Web/HTTP/Methods/PATCH +--- +<div>{{HTTPSidebar}}</div> + +<p><strong>HTTP ã® <code>PATCH</code> ãªã¯ãšã¹ãã¡ãœãã</strong>ã¯ããªãœãŒã¹ãžã®éšåçãªå€æŽãé©çšããŸãã</p> + +<p><code>PATCH</code> 㯠{{Glossary("CRUD")}} ã«èŠããã "update" ã®æŠå¿µã«ããé¡äŒŒããŠããŸãïŒäžè¬çã«ã HTTP 㯠{{Glossary("CRUD")}} ãšã¯ç°ãªããäž¡è
ã¯æ··åããã¹ãã§ã¯ãããŸããïŒã</p> + +<p><code>PATCH</code> ãªã¯ãšã¹ãã¯ããªãœãŒã¹ãã©ã®ããã«ä¿®æ£ãããã®æ瀺ã®ã»ãããšèããããŸãããã㯠{{HTTPMethod("PUT")}} ããªãœãŒã¹ã®å®å
šãªè¡šçŸãéãã®ãšå¯Ÿç
§çã§ãã</p> + +<p><code>PATCH</code> ã¯ã¹ãçã§ãããšã¯éããŸãããããããªãå¯èœæ§ããããŸãããã®ç¹ã¯ãåžžã«ã¹ãçã§ãã {{HTTPMethod("PUT")}} ãšã¯å¯Ÿç
§çã§ãããã¹ãçããšããèšèã¯ãåããªã¯ãšã¹ããäœåºŠç¹°ãè¿ããŠãããªãœãŒã¹ãåãç¶æ
ã«ãªãããšãæå³ããŸãã äŸãã°ãèªåã€ã³ã¯ãªã¡ã³ãããã«ãŠã³ã¿ãã£ãŒã«ãããªãœãŒã¹ã®äžå¯æ¬ ãªéšåã§ããå Žåã {{HTTPMethod("PUT")}} ã¯èªç¶ã«ãããäžæžãããŸããïŒãã¹ãŠãäžæžãããã®ã§ïŒã <code>PATCH</code> ã¯å¿
ããããããšã¯éããŸããã</p> + +<p><code>PATCH</code> ã¯ïŒ{{HTTPMethod("PUT")}} ã®ããã«ïŒä»ã®ãªãœãŒã¹ã«å¯ŸããŠå¯äœçšãçºçãã<em>å ŽåããããŸã</em>ã</p> + +<p>ãµãŒããŒã <code>PATCH</code> ã«å¯Ÿå¿ããŠãããã©ããã調ã¹ãããã«ããµãŒããŒã¯ {{HTTPHeader("Allow")}} ãŸã㯠{{HTTPHeader("Access-Control-Allow-Methods")}} ïŒ<a href="/ja/docs/Web/HTTP/CORS">CORS</a> ã®å ŽåïŒã¬ã¹ãã³ã¹ããããŒã®ãªã¹ãã«è¿œå ããããšã§å¯Ÿå¿ç¶æ³ãç¥ãããããšãã§ããŸãã</p> + +<p><code>PATCH</code> ãèš±å¯ãããŠããããšã瀺ããã1ã€ã®ïŒæé»ã®ïŒèå¥æ¹æ³ã¯ããµãŒããŒãåãä»ãããããææžã®åœ¢åŒãæå®ãã {{HTTPHeader("Accept-Patch")}} ãããããšã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ãªã¯ãšã¹ãã®æ¬æ</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">æåæã®ã¬ã¹ãã³ã¹ã®æ¬æ</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Safe", "å®å
šæ§")}}</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Idempotent", "ã¹ãçæ§")}}</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Cacheable", "ãã£ãã·ã¥")}}</th> + <td>äžå¯</td> + </tr> + <tr> + <th scope="row"><a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã forms</a>ã§ã®å©çš</th> + <td>äžå¯</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">PATCH /file.txt HTTP/1.1 +</pre> + +<h2 id="Example" name="Example">äŸ</h2> + +<h3 id="Request" name="Request">ãªã¯ãšã¹ã</h3> + +<pre class="line-numbers language-html">PATCH /file.txt HTTP/1.1 +Host: www.example.com +Content-Type: application/example +If-Match: "e0023aa4e" +Content-Length: 100 + +[å€æŽã®èšè¿°]</pre> + +<h3 id="Response" name="Response">ã¬ã¹ãã³ã¹</h3> + +<p>æåå¿çã¯Â <a href="https://tools.ietf.org/html/rfc7231#section-6.3">2xx</a> ã¹ããŒã¿ã¹ã³ãŒãã§ç€ºãããŸãã</p> + +<p>ãã®äŸã®å Žåãæ¬æãå«ãŸããŠããªããã {{HTTPStatus("204")}} ã³ãŒãã§æåå¿çã瀺ãããŸãããã {{HTTPStatus("200")}} ã³ãŒãã§ããã°æ¬æãå«ãŸãå¯èœæ§ããããŸãã </p> + +<pre class="newpage">HTTP/1.1 204 No Content +Content-Location: /file.txt +ETag: "e0023aa4f"</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("5789", "PATCH")}}</td> + <td>PATCH Method for HTTP</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("204")}}</li> + <li>{{HTTPHeader("Allow")}}, {{HTTPHeader("Access-Control-Allow-Methods")}}</li> + <li>{{HTTPHeader("Accept-Patch")}} â ãµãŒããŒãåãå
¥ãã PATCH ããã¥ã¡ã³ãã®åœ¢åŒãæå®ããŸãã</li> +</ul> diff --git a/files/ja/web/http/methods/post/index.html b/files/ja/web/http/methods/post/index.html new file mode 100644 index 0000000000..b81723beab --- /dev/null +++ b/files/ja/web/http/methods/post/index.html @@ -0,0 +1,131 @@ +--- +title: POST +slug: Web/HTTP/Methods/POST +tags: + - HTTP + - HTTP ãªã¯ãšã¹ãã¡ãœãã + - Reference + - Request method + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Methods/POST +--- +<p>{{HTTPSidebar}}</p> + +<p><strong>HTTP ã® <code>POST</code> ã¡ãœãã</strong>ã¯ããµãŒããŒã«ããŒã¿ãéä¿¡ããŸãããªã¯ãšã¹ãã®æ¬æã®ã¿ã€ã㯠{{HTTPHeader("Content-Type")}} ããããŒã§ç€ºãããŸãã</p> + +<p>{{HTTPMethod("PUT")}} ãš <code>POST</code> ãšã®éãã¯ã <code>PUT</code> ãã¹ãçã§ããããšã§ããäžåºŠåŒã³åºããŠãè€æ°ååŒã³åºããŠãæåããã°åãå¹æã«ãªã (<em>å¯</em>äœçšããªã) ã®ã«å¯ŸããŠãåã <code>POST</code> ã«æåãããšãè€æ°åã®æ³šæãè¡ããããªãè¿œå ã®å¹æãåºãŸãã</p> + +<p><code>POST</code> ãªã¯ãšã¹ãã¯ããµã€ã <a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã </a>ãä»ããŠéä¿¡ããããµãŒããŒã«å€åããããããŸãããã®å Žåã {{HTMLElement("form")}} èŠçŽ ã® {{htmlattrxref("enctype", "form")}} å±æ§ãããã¯ã {{HTMLElement("input") }} å㯠{{HTMLElement("button")}} èŠçŽ ã® {{htmlattrxref("formenctype", "input")}} å±æ§ã«é©åãªæååãèšå®ããããšã§ã³ã³ãã³ãã¿ã€ããéžæããŸãã</p> + +<ul> + <li><code>application/x-www-form-urlencoded</code>: ããŒãšå€ã¯ããã®éã« <code>'='</code> ããã圢ã§ããŒãšå€ã®çµã«ãªãã <code>'&'</code> ã§åºåãããŠãšã³ã³ãŒããããŸããããŒãå€ã®è±æ°å以å€ã®æåã¯ã{{glossary("percent-encoding", "ããŒã»ã³ããšã³ã³ãŒãã£ã³ã°")}}ãããŸãããã®ããããã®ã¿ã€ãã¯ãã€ããªããŒã¿ãæ±ãã®ã«ã¯åããŸãã (代ããã« <code>multipart/form-data</code> ã䜿çšããŠãã ãã)</li> + <li><code>multipart/form-data</code>: ããããã®å€ã¯ããŒã¿ã®ããã㯠("body part") ãšããŠéä¿¡ããããŠãŒã¶ãŒãšãŒãžã§ã³ããå®çŸ©ããããªãã¿ãŒ ("boundary") ãããããã®éšåãåºåããŸããããŒã¯ããããã®éšåã® <code>Content-Disposition</code> ããããŒã®äžã§äžããããŸãã</li> + <li><code>text/plain</code></li> +</ul> + +<p><code>POST</code> ãªã¯ãšã¹ãã HTML ãã©ãŒã 以å€ã®æ¹æ³ â {{domxref("XMLHttpRequest")}} ãªã© â ã§éä¿¡ãããå Žåã¯ãæ¬æã¯ããããã¿ã€ããåãããšãã§ããŸãã HTTP 1.1 ä»æ§æžã§èšè¿°ãããŠããéãã <code>POST</code> ã¯ä»¥äžã®ãããªæ©èœãã«ããŒããçµ±äžçãªã¡ãœããã«ãªãããèšèšãããŠããŸãã</p> + +<ul> + <li>æ¢åã®ãªãœãŒã¹ã®æ³šé</li> + <li>æ²ç€ºæ¿ããã¥ãŒã¹ã°ã«ãŒããã¡ãŒãªã³ã°ãªã¹ããåã¯åæ§ã®èšäºã°ã«ãŒããžã®æçš¿</li> + <li>ãµã€ã³ã¢ããã¢ãŒãã«ããã®æ°èŠãŠãŒã¶ãŒã®è¿œå </li> + <li>ãã©ãŒã ã®éä¿¡çµæãªã©ã®çµæãªã©ã«ããããããŒã¿ãæ±ãããã»ã¹ãžã®ããŒã¿ãããã¯ã®åãæž¡ã</li> + <li>è¿œå æäœã«ããããŒã¿ããŒã¹ã®æ¡åŒµ</li> +</ul> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ãªã¯ãšã¹ãã®æ¬æ</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">æåæã®ã¬ã¹ãã³ã¹ã®æ¬æ</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Safe", "å®å
šæ§")}}</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Idempotent", "ã¹ãçæ§")}}</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Cacheable", "ãã£ãã·ã¥")}}</th> + <td>æ°é®®ãªæ
å ±ãå«ãŸããŠããå Žåã®ã¿</td> + </tr> + <tr> + <th scope="row"><a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã </a>ã§ã®äœ¿çš</th> + <td>å¯</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">POST /test +</pre> + +<h2 id="Example" name="Example">äŸ</h2> + +<p>æ¢å®ã® <code>application/x-www-form-urlencoded</code> ã³ã³ãã³ãã¿ã€ãã䜿çšããåçŽãªãã©ãŒã ã§ãã</p> + +<pre class="line-numbers language-html notranslate">POST /test HTTP/1.1 +Host: foo.example +Content-Type: application/x-www-form-urlencoded +Content-Length: 27 + +field1=value1&field2=value2</pre> + +<p><code>multipart/form-data</code> ã³ã³ãã³ãã¿ã€ãã䜿çšãããã©ãŒã ã§ãã</p> + +<pre class="notranslate">POST /test HTTP/1.1 +Host: foo.example +Content-Type: multipart/form-data;boundary="boundary" + +--boundary +Content-Disposition: form-data; name="field1" + +value1 +--boundary +Content-Disposition: form-data; name="field2"; filename="example.txt" + +value2 +--boundary-- +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "POST", "4.3.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + <tr> + <td>{{RFC("2046", "Common Syntax", "5.1.1")}}</td> + <td>Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.methods.POST")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Type")}}</li> + <li>{{HTTPHeader("Content-Disposition")}}</li> + <li>{{HTTPMethod("GET")}}</li> +</ul> diff --git a/files/ja/web/http/methods/put/index.html b/files/ja/web/http/methods/put/index.html new file mode 100644 index 0000000000..354434ecf0 --- /dev/null +++ b/files/ja/web/http/methods/put/index.html @@ -0,0 +1,102 @@ +--- +title: PUT +slug: Web/HTTP/Methods/PUT +tags: + - HTTP + - Reference + - ãªã¯ãšã¹ãã¡ãœãã +translation_of: Web/HTTP/Methods/PUT +--- +<div>{{HTTPSidebar}}</div> + +<p><strong>HTTP ã® <code>PUT</code> ãªã¯ãšã¹ãã¡ãœãã</strong>ã¯ãæ°ãããªãœãŒã¹ãäœæããããæå®ãããªãœãŒã¹ã®è¡šçŸããªã¯ãšã¹ãã®ãã€ããŒãã§çœ®ãæããŸãã</p> + +<p><code>PUT</code> ãš {{HTTPMethod("POST")}} ãšã®éãã¯ã<code>PUT</code> ã¯ã¹ãçã§ãããåŒã³åºãåæ°ã1åã§ãè€æ°åã§ãåãå¹æã«ãªããŸãïŒ<em>å¯</em>äœçšããããŸããïŒããé£ç¶ããŠåã {{HTTPMethod("POST")}} ãå®è¡ãããšã泚æãè€æ°åæž¡ããŠããŸããªã©ã®è¿œå ã®åœ±é¿ãçºçããå¯èœæ§ããããŸãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ãªã¯ãšã¹ãã®æ¬æ</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">æåæã®ã¬ã¹ãã³ã¹ã®æ¬æ</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Safe", "å®å
šæ§")}}</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Idempotent", "ã¹ãçæ§")}}</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Cacheable", "ãã£ãã·ã¥")}}</th> + <td>äžå¯</td> + </tr> + <tr> + <th scope="row"><a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã </a>ã§ã®äœ¿çš</th> + <td>äžå¯</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">PUT /new.html HTTP/1.1 +</pre> + +<h2 id="Example" name="Example">äŸ</h2> + +<h3 id="Request" name="Request">ãªã¯ãšã¹ã</h3> + +<pre class="notranslate">PUT /new.html HTTP/1.1 +Host: example.com +Content-type: text/html +Content-length: 16 + +<p>New File</p></pre> + +<h3 id="Response" name="Response">ã¬ã¹ãã³ã¹</h3> + +<p>察象ãªãœãŒã¹ã«çŸåšã®è¡šçŸãååšããã <code>PUT</code> ãªã¯ãšã¹ãã«ãã£ãŠæ£åžžã«äœæãããå ŽåããµãŒããŒã¯ {{HTTPStatus("201")}} (<code>Created</code>) ã¬ã¹ãã³ã¹ããŠãŒã¶ãŒãšãŒãžã§ã³ãã«éç¥ããŸãã</p> + +<pre class="newpage notranslate">HTTP/1.1 201 Created +Content-Location: /new.html</pre> + +<p>察象ãªãœãŒã¹ã«çŸåšã®è¡šçŸãååšãããã®è¡šçŸãå
容ã®è¡šçŸã®ç¶æ
ã«åŸã£ãŠå€æŽãå®äºããå ŽåããµãŒããŒã¯ {{HTTPStatus("200")}} (<code>OK</code>) ãŸã㯠{{HTTPStatus("204")}} (<code>No Content</code>) ã®äœããã®ã¬ã¹ãã³ã¹ã«ãã£ãŠããªã¯ãšã¹ããæ£åžžã«å®äºããããšã瀺ããŸãã</p> + +<pre class="notranslate">HTTP/1.1 204 No Content +Content-Location: /existing.html +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "PUT", "4.3.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.methods.PUT")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("201")}}</li> + <li>{{HTTPStatus("204")}}</li> +</ul> diff --git a/files/ja/web/http/methods/trace/index.html b/files/ja/web/http/methods/trace/index.html new file mode 100644 index 0000000000..b70cb7e9a4 --- /dev/null +++ b/files/ja/web/http/methods/trace/index.html @@ -0,0 +1,78 @@ +--- +title: TRACE +slug: Web/HTTP/Methods/TRACE +tags: + - HTTP + - HTTP ãªã¯ãšã¹ãã¡ãœãã + - Reference + - trace +translation_of: Web/HTTP/Methods/TRACE +--- +<div>{{HTTPSidebar}}</div> + +<p><strong>HTTP ã® <code>TRACE</code> ã¡ãœãã</strong>ã¯ã察象ãªãœãŒã¹ãŸã§ã®ãã¹ã«æ²¿ã£ãŠã¡ãã»ãŒãžã®ã«ãŒãããã¯ãã¹ããè¡ãã䟿å©ãªãããã°ã®ä»çµã¿ãæäŸããŸãã</p> + +<p>ãªã¯ãšã¹ãã®æçµåä¿¡è
ã¯åä¿¡ããã¡ãã»ãŒãžãã以äžã«ç€ºãããã€ãã®ãã£ãŒã«ããé€ããŠãã¯ã©ã€ã¢ã³ãã« {{httpheader("Content-Type")}} ã <code>message/http</code> ã«èšå®ãã {{HTTPStatus("200")}} (<code>OK</code>) ã¬ã¹ãã³ã¹ã®æ¬æãšããŠè¿éããŸããæçµåä¿¡è
ã¯ãªãªãžã³ã®ãµãŒããŒãããªã¯ãšã¹ã㧠{{HTTPHeader("Max-Forwards")}} ã®å€ã0ã§åãåã£ãæåã®ãµãŒããŒã®ã©ã¡ããã§ãã</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">ãªã¯ãšã¹ãã®æ¬æ</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">æåæã®ã¬ã¹ãã³ã¹ã®æ¬æ</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Safe", "å®å
šæ§")}}</th> + <td>ãªã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Idempotent", "ã¹ãçæ§")}}</th> + <td>ãã</td> + </tr> + <tr> + <th scope="row">{{Glossary("Cacheable", "ãã£ãã·ã¥")}}</th> + <td>äžå¯</td> + </tr> + <tr> + <th scope="row">HTML ãã©ãŒã ã®äœ¿çš</th> + <td>äžå¯</td> + </tr> + </tbody> +</table> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">TRACE /index.html +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "TRACE", "4.3.8")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.methods.TRACE")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Methods">HTTP ã¡ãœãã</a></li> +</ul> diff --git a/files/ja/web/http/overview/index.html b/files/ja/web/http/overview/index.html new file mode 100644 index 0000000000..32bd6b9800 --- /dev/null +++ b/files/ja/web/http/overview/index.html @@ -0,0 +1,179 @@ +--- +title: HTTP ã®æŠèŠ +slug: Web/HTTP/Overview +tags: + - HTML + - HTTP + - Overview + - WebMechanics + - æŠèŠ +translation_of: Web/HTTP/Overview +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><span class="seoSummary"><strong>HTTP</strong> ã¯ã</span> HTML ææžãªã©ã®ãªãœãŒã¹ãåãåºãããšãå¯èœã«ãã{{Glossary("protocol", "ãããã³ã«")}}ã§ããããã¯<span class="seoSummary">ãŠã§ãã«ãããããŒã¿äº€æã®åºç€ããªããã¯ã©ã€ã¢ã³ããµãŒããŒãããã³ã«ã§ããããªã¯ãšã¹ãã¯åãåãè
(äžè¬ã«ã¯ãŠã§ããã©ãŠã¶ãŒ) ãçæããŸããææžå
šäœã¯ãããã¹ããã¬ã€ã¢ãŠãã®å®çŸ©ãç»åãåç»ãã¹ã¯ãªãããªã©ãåã蟌ãŸããããŸããŸãªãµãææžããåæ§æãããŸãã</span></p> + +<p><img alt="ãŠã§ãã®ææžã¯è€æ°ã®ãªãœãŒã¹ã®çµã¿åãã" src="https://mdn.mozillademos.org/files/13677/Fetching_a_page.png" style="height: 319px; width: 545px;"></p> + +<p>ã¯ã©ã€ã¢ã³ããšãµãŒããŒã¯ã (ããŒã¿ã®æµããšã¯å¯Ÿç
§çã«) åã
ã®ã¡ãã»ãŒãžã亀æããããšã«ãã£ãŠéä¿¡ããŸããã¯ã©ã€ã¢ã³ã (éåžžã¯ãŠã§ããã©ãŠã¶ãŒ) ãéä¿¡ããã¡ãã»ãŒãžã¯<em>ãªã¯ãšã¹ã</em>ãšåŒã°ããŸãããŸãããµãŒããŒãåçãšããŠéä¿¡ããã¡ãã»ãŒãžã¯<em>ã¬ã¹ãã³ã¹</em>ãšåŒã°ããŸãã</p> + +<p><img alt="HTTP ã¯ã¢ããªã±ãŒã·ã§ã³å±€ã®ãããã³ã«ã§ããã TCP (ãã©ã³ã¹ããŒãå±€) ã IP (ãããã¯ãŒã¯å±€) ããã¬ãŒã³ããŒã·ã§ã³å±€ä»¥äžã®äžã®éå±€ã«åœãããŸãã" src="https://mdn.mozillademos.org/files/13673/HTTP%20&%20layers.png" style="float: left; height: 299px; padding-bottom: 15px; padding-right: 20px; width: 418px;">1990 幎代åé ã«èšèšããã HTTP ã¯ãæéããããŠé²åããæ¡åŒµå¯èœãªãããã³ã«ã§ãã HTTP ã¯ã {{Glossary("TCP")}} ãŸã㯠{{Glossary("TLS")}} (æå·åããã TCP æ¥ç¶) ã䜿çšããŠéä¿¡ãããã¢ããªã±ãŒã·ã§ã³å±€ã®ãããã³ã«ã§ãããçè«äžã¯ä¿¡é Œæ§ã®ããä»»æã®ãã©ã³ã¹ããŒãå±€ãããã³ã«ã䜿çšã§ããŸããHTTP ã¯æ¡åŒµæ§ãããããããã€ããŒããã¹ãææžã ãã§ãªãç»åãåç»ã®åã蟌ã¿ãã HTML ãã©ãŒã ã®å
¥åçµæãªã©ãã¯ã©ã€ã¢ã³ããããµãŒããŒãžéä¿¡ããããšãã§ããŸãããŸãããªã¯ãšã¹ãã«å¿ããŠãŠã§ãããŒãžãæŽæ°ããããã«ãææžã®äžéšãåã蟌ãããšãã§ããŸãã</p> + +<h2 id="Components_of_HTTP-based_systems" name="Components_of_HTTP-based_systems">HTTP ããŒã¹ã·ã¹ãã ã®æ§æèŠçŽ </h2> + +<p>HTTP ã¯ã¯ã©ã€ã¢ã³ããµãŒããŒãããã³ã«ã§ããããªã¯ãšã¹ãã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ã (ãŸãã¯ä»£çã®ãããã·) ãšããã²ãšã€ã®å®äœããéä¿¡ãããŸããã»ãšãã©ã®å ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãŠã§ããã©ãŠã¶ãŒã§ãããäŸãã°æ€çŽ¢ãšã³ãžã³ã®ã€ã³ããã¯ã¹ãåéããã³ä¿å®ããããã«ãŠã§ããã¯ããŒã«ãããããããªã©ãã©ãã§ãã¯ã©ã€ã¢ã³ãã«ãªãããšãã§ããŸãã</p> + +<p>åã
ã®ãªã¯ãšã¹ãã¯ãµãŒããŒã«éä¿¡ãããåŠçããåŸã«<em>ã¬ã¹ãã³ã¹</em>ãšåŒã°ããåçãæäŸããŸããã¯ã©ã€ã¢ã³ããšãµãŒããŒãšã®éã«ã¯ãäŸãã°ã²ãŒããŠã§ã€ã{{Glossary("Cache", "ãã£ãã·ã¥")}}ãªã©ã®æ§ã
ãªæäœãè¡ãããŸãšããŠ{{Glossary("Proxy_server", "ãããã·ãµãŒããŒ")}}ãšåŒã°ããããã€ãã®å®äœãååšããŠããŸãã</p> + +<p><img alt="ã¯ã©ã€ã¢ã³ããšãµãŒããŒã®é£é" src="https://mdn.mozillademos.org/files/13679/Client-server-chain.png"></p> + +<p>å®éã¯ãã©ãŠã¶ãŒãšãµãŒããŒã®éã«ãã«ãŒã¿ãŒãã¢ãã ãªã©ãªã¯ãšã¹ããæ±ãã³ã³ãã¥ãŒã¿ãŒãããã«ååšããŸãããŠã§ããéå±€æ§é ã§èšèšããããããã§ããããã¯ãããã¯ãŒã¯ããã©ã³ã¹ããŒãå±€ã®äžã«é ãããŠããŸãã HTTP ã¯ã¢ããªã±ãŒã·ã§ã³å±€ã®æäžäœã«ååšããŸãããããã¯ãŒã¯ã®åé¡ã蚺æããããšã¯éèŠã§ããã HTTP ã説æããéã«äžå±€ã®ããšã¯ã»ãšãã©éèŠã§ã¯ãããŸããã</p> + +<h3 id="Client_the_user-agent" name="Client_the_user-agent">ã¯ã©ã€ã¢ã³ã: ãŠãŒã¶ãŒãšãŒãžã§ã³ã</h3> + +<p><em>ãŠãŒã¶ãŒãšãŒãžã§ã³ã</em>ã¯ããŠãŒã¶ã®ããã«åãããŒã«ã§ãããã®åœ¹å²ã¯äž»ã«ããŠã§ããã©ãŠã¶ãŒãæ
ããŸããä»ã«ãããšã³ãžãã¢ããŠã§ãéçºè
ãã¢ããªã±ãŒã·ã§ã³ããããã°ããããã«äœ¿çšããããã°ã©ã ã§ããå¯èœæ§ããããŸãã</p> + +<p>ãã©ãŠã¶ãŒã¯<strong>åžžã«</strong>ããªã¯ãšã¹ããçæããå®äœã§ãããµãŒããŒã«ã¯ãªããŸãã (ãã£ãšãããµãŒããŒãçæããã¡ãã»ãŒãžãã·ãã¥ã¬ãŒãããä»çµã¿ãè¿å¹Žè¿œå ãããŸããã)ã</p> + +<p>ãŠã§ãããŒãžãæäŸããããããã©ãŠã¶ãŒã¯ããŒãžãè¡šã HTML ææžãèªã¿èŸŒãããã®æåã®ãªã¯ãšã¹ããéä¿¡ããŸãããã®ãã¡ã€ã«ã解æããŠãå®è¡ããã¹ã¯ãªããã衚瀺ããã¬ã€ã¢ãŠãã®æ
å ± (CSS)ãããŒãžã«å«ãŸãããµããªãœãŒã¹ (éåžžãç»åãåç») ã«å¯Ÿå¿ããè¿œå ã®ãªã¯ãšã¹ããçºè¡ããŸãããããŠããŠã§ããã©ãŠã¶ãŒã¯ãããã®ãªãœãŒã¹ãæ··ãåãããŠãå®å
šãªææžã§ãããŠã§ãããŒãžããŠãŒã¶ãŒã«æäŸããŸãããã©ãŠã¶ãŒã«ãã£ãŠå®è¡ãããã¹ã¯ãªãããåŸã®æ®µéã§ããã«ãªãœãŒã¹ãåã蟌ãã§ãããã«å¿ããŠãã©ãŠã¶ãŒããŠã§ãããŒãžãæŽæ°ããããšããããŸãã</p> + +<p>ãŠã§ãããŒãžã¯ããã€ããŒããã¹ãææžã§ããããã¯è¡šç€ºãããŠããããã¹ãã®äžéšãæ°ããªãŠã§ãããŒãžã®åã蟌ã¿ã (éåžžãããŠã¹ã®ã¯ãªãã¯ã«ãã£ãŠ) çºçããããªã³ã¯ã§ããããŠãŒã¶ãŒããŠãŒã¶ãŒãšãŒãžã§ã³ããå°ããŠãŠã§ãå
ã移åã§ãããšããããšã§ãããã©ãŠã¶ãŒã¯ãããã®å°ãã HTTP ãªã¯ãšã¹ãã«å€æããŠãããã«ãŠãŒã¶ãŒãžæ確ãªã¬ã¹ãã³ã¹ãè¿ãããã« HTTP ã¬ã¹ãã³ã¹ã解éããŸãã</p> + +<h3 id="The_Web_server" name="The_Web_server">ãŠã§ããµãŒããŒ</h3> + +<p>éä¿¡è·¯ã®å察åŽã¯ãã¯ã©ã€ã¢ã³ãã®ãªã¯ãšã¹ãã«å¿ããŠææžã<em>æäŸãã</em>ãµãŒããŒãããŸãããµãŒããŒã¯ãä»®æ³çã«ã¯ 1 å°ã ãã®ãã·ã³ãšããŠèŠããŸããããã¯ãå®éã¯è€æ°ã®ãµãŒããŒã®éåäœã§ãããããããªãããã§ããããããã¯è² è· (è² è·åæ£)ããããã¯ä»ã®ã³ã³ãã¥ãŒã¿ãŒ (ãã£ãã·ã¥ãããŒã¿ããŒã¹ãµãŒããŒãé»ååååŒãµãŒããŒãªã©) ã«åãåãããè¡ãè€éãªã²ãšãŸãšãŸãã®ãœãããŠã§ã¢ãåãåã£ãŠããªã¯ãšã¹ãã«å¿ããŠå
šé¢çãŸãã¯éšåçã«ææžãçæããŠããŸãã</p> + +<p>ãµãŒããŒã¯ 1 å°ã®ãã·ã³ã§ããå¿
èŠæ§ã¯ãããŸããããè€æ°ã®ãµãŒããŒã®ãœãããŠã§ã¢ã€ã³ã¹ã¿ã³ã¹ãåããã·ã³ã§éçšããããšãã§ããŸãã HTTP/1.1 ãš {{HTTPHeader("Host")}} ããããŒã«ãã£ãŠãåã IP ã¢ãã¬ã¹ãå
±æã§ããŸãã</p> + +<h3 id="Proxies" name="Proxies">ãããã·</h3> + +<p>ãŠã§ããã©ãŠã¶ãŒãšãŠã§ããµãŒããŒã®éã§ã¯ãå€æ°ã®ã³ã³ãã¥ãŒã¿ãŒã端æ«ã HTTP ã¡ãã»ãŒãžãäžç¶ããŸãããŠã§ãã¹ã¿ãã¯ã¯éå±€æ§é ã§ããããããããã®åŠçã®ã»ãšãã©ã¯ãã©ã³ã¹ããŒãå±€ããããã¯ãŒã¯å±€ãç©çå±€ã®ããããã§è¡ããã HTTP å±€ããèŠãã°ééçã§ãããããã©ãŒãã³ã¹ã«ããªãã®åœ±é¿ãäžããŸããã¢ããªã±ãŒã·ã§ã³å±€ã§è¡ãããåŠçã¯ãéåžž<strong>ãããã·</strong>ãšåŒã°ããŸãããããã¯ééçã§ããå Žåãããªãã¡åä¿¡ãããªã¯ãšã¹ãããããªãå Žåãå€æŽããã«è»¢éããå Žåãšãééçã§ã¯ãªãå Žåãããªãã¡ãµãŒããŒãééããåã«äœããã®åœ¢ã§ãªã¯ãšã¹ããå€æŽããå ŽåãšããããŸãããããã·ã¯ããŸããŸãªæ©èœãå®è¡ããããšããããŸãã</p> + +<ul> + <li>ãã£ãã·ã¥ (ãã£ãã·ã¥ã¯å
±çšããããã¯ãã©ãŠã¶ãŒãã£ãã·ã¥ã®ããã«å人çšã«ã§ããŸã)</li> + <li>ãã£ã«ã¿ãªã³ã° (ã¢ã³ããŠã£ã«ã¹ã¹ãã£ã³ããã¢ã¬ã³ã¿ã«ã³ã³ãããŒã«ãªã©)</li> + <li>è² è·åæ£ (è€æ°ã®ãµãŒããŒãå¥ã
ã®ãªã¯ãšã¹ãã«å¯Ÿå¿ã§ããããã«ãã)</li> + <li>èªèšŒ (ããŸããŸãªãªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãå¶åŸ¡ãã)</li> + <li>ãã°èšé² (å±¥æŽæ
å ±ã®ä¿ç®¡ãå¯èœã«ãã)</li> +</ul> + +<h2 id="Basic_aspects_of_HTTP" name="Basic_aspects_of_HTTP">HTTP ã®åºæ¬æ¹é</h2> + +<h3 id="HTTP_is_simple" name="HTTP_is_simple">HTTP ã¯ã·ã³ãã«</h3> + +<p>HTTP/2 㧠HTTP ã¡ãã»ãŒãžããã¬ãŒã ã«ã«ãã»ã«åããããšã«ããè€éããå¢ããŸãããã HTTP ã¯å
šäœçã«ã·ã³ãã«ã§äººéãèªããããã«èšèšãããŠããŸãã HTTP ã¡ãã»ãŒãžã¯äººéãèªãã§ç解ããããšãã§ããéçºè
ã«ãããã¹ãã容æã«ããŠããŸãããŸããåå¿è
ã«å¯Ÿããè€éãã軜æžããŸãã</p> + +<h3 id="HTTP_is_extensible" name="HTTP_is_extensible">HTTP ã¯æ¡åŒµå¯èœ</h3> + +<p>HTTP/1.0 ã§å°å
¥ããã <a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a>ã«ãã£ãŠããããã³ã«ã®æ¡åŒµãå®éšã容æã«ãªã£ãŠããŸããæ°ããæ©èœã§ãã£ãŠããã¯ã©ã€ã¢ã³ããšãµãŒããŒãæ°ããªããããŒã®æå³ã«ã€ããŠåçŽãªåæãããã°å°å
¥ã§ããŸãã</p> + +<h3 id="HTTP_ã¯ã¹ããŒãã¬ã¹ã§ãããã»ãã·ã§ã³ã¬ã¹ã§ã¯ãªã">HTTP ã¯ã¹ããŒãã¬ã¹ã§ãããã»ãã·ã§ã³ã¬ã¹ã§ã¯ãªã</h3> + +<p>HTTP ã¯ã¹ããŒãã¬ã¹ã§ããåãã³ãã¯ã·ã§ã³äžã§ãã£ãŠããé£ç¶çã«å®è¡ããã 2 ã€ã®ãªã¯ãšã¹ãéã«é¢ä¿æ§ã¯ãããŸãããããã¯é»ååååŒã®ã·ã§ããã³ã°ãã¹ã±ãããªã©ã®ããã«ããŠãŒã¶ãŒãäžè²«ããæ¹æ³ã§ç¹å®ã®ããŒãžãšå¯Ÿè©±ããããšãã«çŽæ¥åé¡ã«ãªããŸããããã HTTP ã®æ žå¿ãã¹ããŒãã¬ã¹ã§ãã£ãŠãã HTTP Cookie ã«ãã£ãŠã¹ããŒããã«ãªã»ãã·ã§ã³ãå®çŸã§ããŸããããããŒã®æ¡åŒµæ§ãå©çšããŠãã¯ãŒã¯ãããŒã« HTTP Cookie ãè¿œå ãããã°ãããããã® HTTP ãªã¯ãšã¹ããåãç¶æ³ãåãç¶æ
ãå
±æããããã«ã»ãã·ã§ã³ãäœæã§ããããã«ãªããŸãã</p> + +<h3 id="HTTP_and_connections" name="HTTP_and_connections">HTTP ãšã³ãã¯ã·ã§ã³</h3> + +<p>ã³ãã¯ã·ã§ã³ã¯ãã©ã³ã¹ããŒãå±€ã§å¶åŸ¡ãããŸãã®ã§ã HTTP ã®ç¯å²ããæ ¹æ¬çã«å€ããŠããŸãã HTTP ã¯äžå±€ã®ãããã³ã«ãã³ãã¯ã·ã§ã³ããŒã¹ã§ããããšã«äŸåã¯ããã<em>ä¿¡é Œæ§ããã</em>ãã€ãŸãã¡ãã»ãŒãžã倱ããªãããš (å°ãªããšããšã©ãŒã衚瀺ããããš) ã ãããªã¯ãšã¹ãããŸããã€ã³ã¿ãŒãããã§ãã£ãšãäžè¬ç㪠2 ã€ã®ãã©ã³ã¹ããŒããããã³ã«ã§ã¯ã TCP ã«ã¯ä¿¡é Œæ§ãããã UDP ã«ã¯ä¿¡é Œæ§ããããŸããããããã£ãŠ HTTP ã¯ãã³ãã¯ã·ã§ã³ããŒã¹ã§ãã TCP æšæºã«äŸåããŠããŸãã</p> + +<p>ã¯ã©ã€ã¢ã³ããšãµãŒããŒã HTTP ã®ãªã¯ãšã¹ã/ã¬ã¹ãã³ã¹ã®ãã¢ã亀æããåã« TCP ã³ãã¯ã·ã§ã³ã®ç¢ºç«ãå¿
èŠã§ãããã¯è€æ°ã®ããåããå¿
èŠãšããŸãã HTTP/1.0 ã®æ¢å®ã®åäœã¯ãããããã®ãªã¯ãšã¹ã/ã¬ã¹ãã³ã¹ã®ãã¢ã«å¯ŸããŠåå¥ã« TCP ã³ãã¯ã·ã§ã³ãéããã®ã§ããããã¯ãè€æ°ã®ãªã¯ãšã¹ããè¿ãé£ç¶ããŠéä¿¡ããããšãã«åäžã® TCP ã³ãã¯ã·ã§ã³ãå
±æããããšãããéå¹çã§ãã</p> + +<p>ãã®æ¬ ç¹ã軜æžããããã HTTP/1.1 ã§<em>ãã€ãã©ã€ã³</em> (å®è£
ãé£ããããšãç«èšŒãããŸãã) ã<em>æç¶çæ¥ç¶</em>ãå°å
¥ããŸããã {{HTTPHeader("Connection")}} ããããŒã䜿çšããŠãäžå±€ã® TCP ã³ãã¯ã·ã§ã³ãéšåçã«å¶åŸ¡ã§ããŸãã HTTP/2 ã¯ã²ãšã€ã®ã³ãã¯ã·ã§ã³ã§è€æ°ã®ã¡ãã»ãŒãžãå€éåããããã«é²åããŸãããã³ãã¯ã·ã§ã³ãããŠã©ãŒã ç¶æ
ã«ä¿ã€ã®ã«åœ¹ç«ã¡ãå¹çãåäžããŸãã</p> + +<p>ãã HTTP ã«é©ãããã©ã³ã¹ããŒããããã³ã«ãèšèšããå®éšãé²ãã§ããŸããããšãã° Google ã¯ãããä¿¡é Œæ§ãããå¹ççãªãã©ã³ã¹ããŒãå±€ãããã³ã«ãæäŸããããã UDP äžã«æ§ç¯ãã <a href="https://ja.wikipedia.org/wiki/QUIC">QUIC</a> ã®å®éšãè¡ã£ãŠããŸãã</p> + +<h2 id="What_can_be_controlled_by_HTTP" name="What_can_be_controlled_by_HTTP">HTTP ãå¶åŸ¡ã§ããããš</h2> + +<p>HTTP ã®æ¡åŒµæ§ã«ããæéããããŠããŠã§ãã®å¶åŸ¡æ§ãæ©èœæ§ãåäžã§ããŸããããã£ãã·ã¥ãèªèšŒã®æ¹æ³ã¯ã HTTP ã®èåµæããåãæ±ãããŠããæ©èœã§ãã察ç
§çã«ã<em>ãªãªãžã³å¶çŽ</em>ãç·©åããæ©èœã¯2010幎代ã«ããããè¿œå ãããŸããã</p> + +<p>HTTP ã§å¶åŸ¡ã§ããäžè¬çãªæ©èœã¯ä»¥äžã®ãšããã§ãã</p> + +<ul> + <li><em><a href="/ja/docs/Web/HTTP/Caching">ãã£ãã·ã¥</a></em><br> + ææžãã©ã®ããã«ãã£ãã·ã¥ããããã HTTP ã§å¶åŸ¡ã§ããŸãããµãŒããŒã¯ãããã·ãã¯ã©ã€ã¢ã³ãã«å¯ŸããŠãäœãã©ãã ãã®éãã£ãã·ã¥ããããæ瀺ã§ããŸããã¯ã©ã€ã¢ã³ãã¯äžéã®ãã£ãã·ã¥ãããã·ã«å¯ŸããŠãä¿åãããŠããææžãç¡èŠããããæ瀺ã§ããŸãã</li> + <li><em>ãªãªãžã³å¶çŽã®ç·©å</em><br> + ã®ããèŠãä»ã®ãã©ã€ãã·ãŒäŸµå®³ãé¿ããããããŠã§ããã©ãŠã¶ãŒã¯ãŠã§ããµã€ãéãå³å¯ã«åå²ãããã匷å¶ããŠããŸãã<strong>åäžãªãªãžã³</strong>ã®ããŒãžã ããããŠã§ãããŒãžã®æ
å ±ãã¹ãŠã«ã¢ã¯ã»ã¹ã§ããŸãããã®å¶çŽã¯ãµãŒããŒã«ãšã£ãŠè² æ
ã«ãªããŸããã HTTP ããããŒã§ãµãŒããŒåŽã®å³å¯ãªåå²ãç·©åã§ããŸããããã«ãããããŸããŸãªãã¡ã€ã³ãæ
å ±æºãšããæ
å ±ã®å¯ãéãã®ææžãäœæã§ããŸãããã ãããã®ããã«ããã»ãã¥ãªãã£äžã®çç±ããããŸãã</li> + <li><em>èªèšŒ</em><br> + ç¹å®ã®ãŠãŒã¶ãŒããã¢ã¯ã»ã¹ã§ããªãããã«ä¿è·ãããããŒãžãããã§ããããåºæ¬çãªèªèšŒã¯ HTTP ãæäŸããŠããã {{HTTPHeader("WWW-Authenticate")}} ãªã©ã®ããããŒã䜿çšãããã <a href="/ja/docs/Web/HTTP/Cookies">HTTP Cookie</a> ã䜿çšããç¹å¥ãªã»ãã·ã§ã³ãèšå®ãããããŸãã</li> + <li><em><a href="/ja/docs/Web/HTTP/Proxy_servers_and_tunneling">ãããã·ãšãããªã³ã°</a></em><br> + ãµãŒããŒãã¯ã©ã€ã¢ã³ããã€ã³ãã©ãããå
ã«é
眮ãããŠãä»ã®ã³ã³ãã¥ãŒã¿ãŒããæ¬åœã® IP ã¢ãã¬ã¹ãèŠããªããªã£ãŠããããšããããããŸãããã®ãããã¯ãŒã¯å¢çãæž¡ãããã HTTP ãªã¯ãšã¹ãã¯ãããã·ãééããŸãããã¹ãŠã®ãããã·ã HTTP ãããã·ã§ãããšã¯éããŸãããããšãã°ã SOCKS ãããã³ã«ã¯ããäœãå±€ã§åäœããŸããã»ãã«ã FTP ãªã©ããããã®ãããã·ã§åŠçãããããšããããŸãã</li> + <li><em>ã»ãã·ã§ã³</em><br> + HTTP Cookie ã䜿çšããŠããªã¯ãšã¹ããšãµãŒããŒã®ã»ãã·ã§ã³ãé¢é£ä»ãã§ããŸããããã«ãã HTTP ãã¹ããŒãã¬ã¹ãããã³ã«ã§ããã«ãããããããã»ãã·ã§ã³ãäœæã§ããŸããããã¯é»ååååŒã®ã·ã§ããã³ã°ãã¹ã±ããã ãã§ãªããåºåå
容ã«ãŠãŒã¶ãŒèšå®ãé©çšã§ãããµã€ãã§ãæçšã§ãã</li> +</ul> + +<h2 id="HTTP_flow" name="HTTP_flow">HTTP ã®ãããŒ</h2> + +<p>ã¯ã©ã€ã¢ã³ãããµãŒã㌠(æçµç®çå°ã®ãµãŒããŒãŸãã¯äžéã®ãããã·) ãšéä¿¡ããããšããã¯ã©ã€ã¢ã³ãã¯ä»¥äžã®æ®µéãèžã¿ãŸãã</p> + +<ol> + <li>TCP ã³ãã¯ã·ã§ã³ãéã: TCP ã³ãã¯ã·ã§ã³ã¯ã²ãšã€ãŸãã¯è€æ°ã®ãªã¯ãšã¹ããéä¿¡ããããåçãåãåã£ããããããã«äœ¿çšããŸããã¯ã©ã€ã¢ã³ãã¯æ°ããã³ãã¯ã·ã§ã³ãéããæ¢åã®ã³ãã¯ã·ã§ã³ãå䜿çšããããããã¯ãµãŒããŒã«å¯ŸããŠè€æ°ã® TCP ã³ãã¯ã·ã§ã³ãéãããšãã§ããŸãã</li> + <li>HTTP ã¡ãã»ãŒãžãéä¿¡ãã: HTTP ã¡ãã»ãŒãžã (HTTP/2 ããå) ã¯äººéãèªãããšãã§ããŸãã HTTP/2 ã§ã¯åçŽãªã¡ãã»ãŒãžããã¬ãŒã å
ã«ã«ãã»ã«åãããŠãããçŽæ¥èªãããšãäžå¯èœã«ãªããŸããããåçã¯å€ãã£ãŠããŸããã + <pre class="line-numbers language-html"><code class="language-html">GET / HTTP/1.1 +Host: developer.mozilla.org +Accept-Language: fr</code></pre> + </li> + <li>ãµãŒããŒããéä¿¡ãããã¬ã¹ãã³ã¹ãèªã¿åã: + <pre class="line-numbers language-html"><code class="language-html">HTTP/1.1 200 OK +Date: Sat, 09 Oct 2010 14:28:02 GMT +Server: Apache +Last-Modified: Tue, 01 Dec 2009 20:18:22 GMT +ETag: "51142bc1-7449-479b075b2891b" +Accept-Ranges: bytes +Content-Length: 29769 +Content-Type: text/html + +<!DOCTYPE html... (ããã«ããªã¯ãšã¹ããã 29769 ãã€ãã®ãŠã§ãããŒãžããã)</code></pre> + </li> + <li>次ã®ãªã¯ãšã¹ãã®ããã«ãã³ãã¯ã·ã§ã³ãéãããå䜿çšãã</li> +</ol> + +<p>HTTP ãã€ãã©ã€ã³ãæå¹ã§ããå Žåã¯ãæåã®ã¬ã¹ãã³ã¹ãå®å
šã«è¿ãã®ãåŸ
ããã«è€æ°ã®ãªã¯ãšã¹ããéä¿¡ã§ããŸãã HTTP ãã€ãã©ã€ã³ã¯æ¢åã®ãããã¯ãŒã¯ã§å®è£
ããã®ãé£ããããšãç«èšŒãããŠãããå€ããœãããŠã§ã¢ãšææ°ããŒãžã§ã³ã®ãœãããŠã§ã¢ãå
±åããŠããŸãã HTTP ãã€ãã©ã€ã³ã¯ã HTTP/2 ã§ãã¬ãŒã å
ã«ãªã¯ãšã¹ãã匷åã«å€éåããæ©èœã«ãã£ãŠçœ®ãæããããŸããã</p> + +<h2 id="HTTP_Messages" name="HTTP_Messages">HTTP ã¡ãã»ãŒãž</h2> + +<p>HTTP/1.1 以åã® HTTP ã¡ãã»ãŒãžã¯ã人éãèªãããšãã§ããŸãã HTTP/2 ã§ã¯ãããã®ã¡ãã»ãŒãžããã€ããªæ§é ã®<em>ãã¬ãŒã </em>ã«åã蟌ãŸããŠãããããããŒã®å§çž®ãå€éåãšãã£ãæé©åãå¯èœã«ãªããŸãããæ¬æ¥ã® HTTP ã¡ãã»ãŒãžã®éšåã ãããã®ããŒãžã§ã³ã® HTTP ã§éä¿¡ãããŠããŠããåã¡ãã»ãŒãžã®æå³ã¯å€ãã£ãŠããããã¯ã©ã€ã¢ã³ãã¯æ¬æ¥ã® HTTP/1.1 ã¡ãã»ãŒãžã (äºå®äž) åæ§æããŸãããããã£ãŠã HTTP/2 ã¡ãã»ãŒãžã HTTP/1.1 圢åŒã§ç解ããããšã¯åœ¹ã«ç«ã¡ãŸãã</p> + +<p>HTTP ã¡ãã»ãŒãžã¯ãªã¯ãšã¹ããšã¬ã¹ãã³ã¹ã® 2 çš®é¡ãããããããåºæã®åœ¢åŒã«ãªã£ãŠããŸãã</p> + +<h3 id="Requests" name="Requests">ãªã¯ãšã¹ã</h3> + +<p>HTTP ãªã¯ãšã¹ãã®äŸã§ãã</p> + +<p><img alt="åºæ¬ç㪠HTTP ãªã¯ãšã¹ã" src="https://mdn.mozillademos.org/files/13687/HTTP_Request.png" style="height: 336px; width: 693px;"></p> + +<p>ãªã¯ãšã¹ãã¯ä»¥äžã®èŠçŽ ã§æ§æãããŸãã</p> + +<ul> + <li>HTTP <a href="/ja/docs/Web/HTTP/Methods">ã¡ãœãã</a>ãéåžžãã¯ã©ã€ã¢ã³ããå®è¡ãããæäœãå®çŸ©ãã {{HTTPMethod("GET")}} ã {{HTTPMethod("POST")}} ã®ãããªåè©ãã{{HTTPMethod("OPTIONS")}} ã {{HTTPMethod("HEAD")}} ã®ãããªåè©ã§ããäžè¬çã«ã¯ã©ã€ã¢ã³ãã¯ãªãœãŒã¹ãåã蟌ã (<code>GET</code> ã䜿çš) ã <a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã </a> ã®å€ãéä¿¡ãã (<code>POST</code> ã䜿çš) ããšãæã¿ãŸãããå Žåã«ãã£ãŠã¯ã»ãã®æäœãå¿
èŠã«ãªããŸãã</li> + <li>åã蟌ããªãœãŒã¹ã®ãã¹ãç¶æ³ããæããã§ããã°ãªãœãŒã¹ã® URL ã¯ãã®èŠçŽ ããåãé€ãããŸããããšãã°{{Glossary("protocol","ãããã³ã«")}} (<code>http://</code>)ã{{Glossary("domain","ãã¡ã€ã³")}} (ããã§ã¯ <code>developer.mozilla.org</code>)ãTCP {{Glossary("port","ããŒã")}} (ããã§ã¯ <code>80</code>) ãåãé€ãããŸãã</li> + <li>HTTP ãããã³ã«ã®ããŒãžã§ã³ã</li> + <li>ãµãŒããŒã«è¿œå ã®æ
å ±ãäžããä»»æã® <a href="/ja/docs/Web/HTTP/Headers">ããããŒ</a>ã</li> + <li><code>POST</code> ã®ãããªã¡ãœããã§ã¯ã¬ã¹ãã³ã¹ãšåæ§ã«ãéä¿¡ãããªãœãŒã¹ãå
å«ããããã£ããããŸãã</li> +</ul> + +<h3 id="Responses" name="Responses">ã¬ã¹ãã³ã¹</h3> + +<p>ã¬ã¹ãã³ã¹ã®äŸã§ãã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13691/HTTP_Response.png" style="height: 494px; width: 758px;"></p> + +<p>ã¬ã¹ãã³ã¹ã¯ä»¥äžã®èŠçŽ ã§æ§æãããŸãã</p> + +<ul> + <li>æºæ ãã HTTP ãããã³ã«ã®ããŒãžã§ã³ã</li> + <li><a href="/ja/docs/Web/HTTP/Status">ã¹ããŒã¿ã¹ã³ãŒã</a>ããªã¯ãšã¹ããæåãããåŠããããã³ãã®çç±ã瀺ããŸãã</li> + <li>ã¹ããŒã¿ã¹ã¡ãã»ãŒãžãã¹ããŒã¿ã¹ã³ãŒãã®ç°¡åãªèª¬æã§ãããæš©åšã¯ãããŸããã</li> + <li>ãªã¯ãšã¹ããšåæ§ã® HTTP <a href="/ja/docs/Web/HTTP/Headers">ããããŒ</a>ã</li> + <li>(çç¥å¯) ãªãœãŒã¹ãå«ãæ¬æã</li> +</ul> + +<h2 id="APIs_based_on_HTTP" name="APIs_based_on_HTTP">HTTP ã«åºã¥ã API</h2> + +<p>æããã䜿ãããŠãã HTTP ã«åºã¥ã API 㯠{{domxref("XMLHttpRequest")}} API ã§ã{{Glossary("user agent", "ãŠãŒã¶ãŒãšãŒãžã§ã³ã")}}ãšãµãŒããŒã®éã§ããŒã¿ã亀æããããã«äœ¿çšããããšãã§ããŸããæ°ãã {{domxref("Fetch API")}} ã¯ãåãæ©èœããã匷åã§æè»ãªäžé£ã®æ©èœã§æäŸããŸãã</p> + +<p>ä»ã® APIã <a href="/ja/docs/Web/API/Server-sent_events">server-sent event</a> ã¯ããµãŒããŒãã¯ã©ã€ã¢ã³ãã«ã€ãã³ããéä¿¡ããããšãã§ããäžæ¹éè¡ã®ãµãŒãã¹ã§ã HTTP ããã©ã³ã¹ããŒãã®ä»çµã¿ãšããŠå©çšããŠããŸããã¯ã©ã€ã¢ã³ãã®ãã©ãŠã¶ãŒã¯ HTTP ã¹ããªãŒã ã«å±ãã¡ãã»ãŒãžãèªåçã«é©å㪠{{domxref("Event")}} ãªããžã§ã¯ãã«å€æããããã€ãã³ãã®{{domxref("Event.type", "å")}}ãåããã°ãã®åã«ç»é²ãããŠããã€ãã³ããã³ãã©ãŒã«é
ä¿¡ããåã«å¯ŸããŠã€ãã³ããã³ãã©ãŒãèšå®ãããŠããªãå Žåã¯ã {{domxref("EventSource.onmessage", "onmessage")}} ã€ãã³ããã³ãã©ãŒã«é
ä¿¡ããŸãã</p> + +<h2 id="Conclusion" name="Conclusion">ãŸãšã</h2> + +<p>HTTP ã¯å®¹æã«äœ¿çšã§ãããæ¡åŒµå¯èœãªãããã³ã«ã§ããã¯ã©ã€ã¢ã³ããµãŒããŒæ§é ãšåçŽã«ããããŒãè¿œå ã§ããæ©èœæ§ãçµã¿åãããŠã HTTP ã¯ãŠã§ãã®æ©èœæ¡åŒµã«åãããŠé²åã§ããŸãã</p> + +<p>HTTP/2 ã§ããã©ãŒãã³ã¹ãåäžããããããã¬ãŒã å
ã« HTTP ã¡ãã»ãŒãžãåã蟌ãããšã«ããè€éããããããå¢ããŸããããã¡ãã»ãŒãžã®åºæ¬çãªæ§é 㯠HTTP/1.0 ããåããŸãŸã§ããã»ãã·ã§ã³ã®ãããŒã¯äŸç¶ãšããŠåçŽã§ããããããŒã®èª¿æ»ãã·ã³ãã«ãª <a href="/ja/docs/Tools/Network_Monitor">HTTP ã¡ãã»ãŒãžã¢ãã¿ãŒ</a>ã§ãããã°ããããšãã§ããŸãã</p> diff --git a/files/ja/web/http/protocol_upgrade_mechanism/index.html b/files/ja/web/http/protocol_upgrade_mechanism/index.html new file mode 100644 index 0000000000..a1962b3931 --- /dev/null +++ b/files/ja/web/http/protocol_upgrade_mechanism/index.html @@ -0,0 +1,158 @@ +--- +title: ãããã³ã«ã®ã¢ããã°ã¬ãŒãã¡ã«ããºã +slug: Web/HTTP/Protocol_upgrade_mechanism +tags: + - HTTP + - HTTP/2 + - TLS + - WebSocket + - WebSockets + - ã¢ããã°ã¬ãŒã + - ã¬ã€ã + - ãããã¯ãŒãã³ã° + - ãããã³ã« +translation_of: Web/HTTP/Protocol_upgrade_mechanism +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary"><a href="/ja/docs/Web/HTTP">HTTP/1.1 ãããã³ã«</a>ã¯ããã§ã«ç¢ºç«ãããæ¥ç¶ãã {{HTTPHeader("Upgrade")}} ããããŒãã£ãŒã«ãã䜿çšããŠç°ãªããããã³ã«ã«ã¢ããã°ã¬ãŒãããããã«äœ¿çšããããšãã§ããç¹æ®ãªä»çµã¿ãæäŸããŸãã</span></p> + +<p>This mechanism is optional; it cannot be used to insist on a protocol change. Implementations can choose not to take advantage of an upgrade even if they support the new protocol, and in practice, this mechanism is used mostly to bootstrap a WebSockets connection.</p> + +<p>Note also that HTTP/2 explicitly disallows the use of this mechanism; it is specific to HTTP/1.1.</p> + +<h2 id="Upgrading_HTTP1.1_Connections" name="Upgrading_HTTP1.1_Connections">HTTP/1.1 æ¥ç¶ã®ã¢ããã°ã¬ãŒã</h2> + +<p>The {{HTTPHeader("Upgrade")}} header field is used by clients to invite the server to switch to one of the listed protocols, in descending preference order.</p> + +<p>Because <code>Upgrade</code> is a hop-by-hop header, it also needs to be listed in the {{HTTPHeader("Connection")}} header field. This means that a typical request that includes Upgrade would look something like:</p> + +<pre class="syntaxbox">GET /index.html HTTP/1.1 +Host: www.example.com +Connection: upgrade +Upgrade: example/1, foo/2</pre> + +<p>Other headers may be required depending on the requested protocol; for example, <a href="/ja/docs/Web/API/WebSocket">WebSocket</a> upgrades allow additional headers to configure details about the WebSocket connection as well as to offer a degree of security in opening the connection. See {{anch("Upgrading to a WebSocket connection")}} for more details.</p> + +<p>If the server decides to upgrade the connection, it sends back a {{HTTPStatus(101, "101 Switching Protocols")}} response status with an Upgrade header that specifies the protocol(s) being switched to. If it does not (or cannot) upgrade the connection, it ignores the <code>Upgrade</code> header and sends back a regular response (for example, a {{HTTPStatus(200, "200 OK")}}).</p> + +<p>Right after sending the <code>101</code> status code, the server can begin speaking the new protocol, performing any additional protocol-specific handshakes as necessary. Effectively, the connection becomes a two-way pipe as soon as the upgraded response is complete, and the request that initiated the upgrade can be completed over the new protocol.</p> + +<h2 id="Common_uses_for_this_mechanism" name="Common_uses_for_this_mechanism">ãã®ã¡ã«ããºã ã®äžè¬çãªäœ¿çšæ³</h2> + +<p>Here we look at the most common use cases for the {{HTTPHeader("Upgrade")}} header.</p> + +<h3 id="Upgrading_to_a_WebSocket_connection">Upgrading to a WebSocket connection</h3> + +<p>By far, the most common use case for upgrading an HTTP connection is to use WebSockets, which are always implemented by upgrading an HTTP or HTTPS connection. Keep in mind that if you're opening a new connection using the <a href="/ja/docs/Web/API/WebSocket">WebSocket API</a>, or any library that does WebSockets, most or all of this is done for you. For example, opening a WebSocket connection is as simple as:</p> + +<pre class="brush: js">webSocket = new WebSocket("ws://destination.server.ext", "optionalProtocol");</pre> + +<p>The {{domxref("WebSocket.WebSocket", "WebSocket()")}} constructor does all the work of creating an initial HTTP/1.1 connection then handling the handshaking and upgrade process for you.</p> + +<div class="note"> +<p>You can also use the <code>"wss://"</code> URL scheme to open a secure WebSocket connection.</p> +</div> + +<p>If you need to create a WebSocket connection from scratch, you'll have to handle the handshaking process yourself. After creating the initial HTTP/1.1 session, you need to request the upgrade by adding to a standard request the {{HTTPHeader("Upgrade")}} and {{HTTPHeader("Connection")}} headers, as follows:</p> + +<pre>Connection: Upgrade +Upgrade: websocket</pre> + +<h3 id="WebSocket-specific_headers">WebSocket-specific headers</h3> + +<p>The following headers are involved in the WebSocket upgrade process. Other than the {{HTTPHeader("Upgrade")}} and {{HTTPHeader("Connection")}} headers, the rest are generally optional or handled for you by the browser and server when they're talking to each other.</p> + +<h4 id="HTTPHeader(Sec-WebSocket-Extensions)">{{HTTPHeader("Sec-WebSocket-Extensions")}}</h4> + +<p>Specifies one or more protocol-level WebSocket extensions to ask the server to use. Using more than one <code>Sec-WebSocket-Extension</code> header in a request is permitted; the result is the same as if you included all of the listed extensions in one such header.</p> + +<pre class="syntaxbox">Sec-WebSocket-Extensions: <var>extensions</var></pre> + +<dl> + <dt><code><var>extensions</var></code></dt> + <dd>A comma-separated list of extensions to request (or agree to support). These should be selected from the <a href="https://www.iana.org/assignments/websocket/websocket.xml#extension-name">IANA WebSocket Extension Name Registry</a>. Extensions which take parameters do so by using semicolon delineation.</dd> +</dl> + +<p>For example:</p> + +<pre>Sec-WebSocket-Extensions: superspeed, colormode; depth=16</pre> + +<h4 id="HTTPHeader(Sec-WebSocket-Key)">{{HTTPHeader("Sec-WebSocket-Key")}}</h4> + +<p>Provides information to the server which is needed in order to confirm that the client is entitled to request an upgrade to WebSocket. This header can be used when insecure (HTTP) clients wish to upgrade, in order to offer some degree of protection against abuse. The value of the key is computed using an algorithm defined in the WebSocket specification, so this <em>does not provide security</em>. Instead, it helps to prevent non-WebSocket clients from inadvertently, or through misuse, requesting a WebSocket connection. In essence, then, this key simply confirms that "Yes, I really mean to open a WebSocket connection."</p> + +<p>This header is automatically added by clients that choose to use it; it cannot be added using the {{domxref("XMLHttpRequest.setRequestHeader()")}} method.</p> + +<pre class="syntaxbox">Sec-WebSocket-Key: <var>key</var></pre> + +<dl> + <dt><code><var>key</var></code></dt> + <dd>The key for this request to upgrade. The client adds this if it wishes to do so, and the server will include in the response a key of its own, which the client will validate before delivering the upgrade response to you.</dd> +</dl> + +<p>The server's response's {{HTTPHeader("Sec-WebSocket-Accept")}} header will have a value computed based upon the specified <code><var>key</var></code>.</p> + +<h4 id="HTTPHeader(Sec-WebSocket-Protocol)">{{HTTPHeader("Sec-WebSocket-Protocol")}}</h4> + +<p>The <code>Sec-WebSocket-Protocol</code> header specifies one or more WebSocket protocols that you wish to use, in order of preference. The first one that is supported by the server will be selected and returned by the server in a <code>Sec-WebSocket-Protocol</code> header included in the response. You can use this more than once in the header, as well; the result is the same as if you used a comma-delineated list of subprotocol identifiers in a single header.</p> + +<pre class="syntaxbox">Sec-WebSocket-Protocol: <var>subprotocols</var></pre> + +<dl> + <dt><code><var>subprotocols</var></code></dt> + <dd>A comma-separated list of subprotocol names, in the order of preference. The subprotocols may be selected from the <a href="https://www.iana.org/assignments/websocket/websocket.xml#subprotocol-name">IANA WebSocket Subprotocol Name Registry</a> or may be a custom name jointly understood by the client and the server.</dd> +</dl> + +<h4 id="HTTPHeader(Sec-WebSocket-Version)">{{HTTPHeader("Sec-WebSocket-Version")}}</h4> + +<h5 id="Request_header" name="Request_header">ãªã¯ãšã¹ãããããŒ</h5> + +<p>Specifies the WebSocket protocol version the client wishes to use, so the server can confirm whether or not that version is supported on its end.</p> + +<pre class="syntaxbox">Sec-WebSocket-Version: <var>version</var></pre> + +<dl> + <dt><code><var>version</var></code></dt> + <dd>The WebSocket protocol version the client wishes to use when communicating with the server. This number should be the most recent version possible listed in the <a href="https://www.iana.org/assignments/websocket/websocket.xml#version-number">IANA WebSocket Version Number Registry</a>. The most recent final version of the WebSocket protocol is version 13.</dd> +</dl> + +<h5 id="ã¬ã¹ãã³ã¹ããããŒ">ã¬ã¹ãã³ã¹ããããŒ</h5> + +<p>If the server can't communicate using the specified version of the WebSocket protocol, it will respond with an error (such as 426 Upgrade Required) that includes in its headers a <code>Sec-WebSocket-Version</code> header with a comma-separated list of the supported protocol versions. If the server does support the requested protocol version, no <code>Sec-WebSocket-Version</code> header is included in the response.</p> + +<pre class="syntaxbox">Sec-WebSocket-Version: <var>supportedVersions</var></pre> + +<dl> + <dt><code><var>supportedVersions</var></code></dt> + <dd>A comma-delineated list of the WebSocket protocol versions supported by the server.</dd> +</dl> + +<h3 id="Response-only_headers" name="Response-only_headers">ã¬ã¹ãã³ã¹æã®ã¿ã®ããããŒ</h3> + +<p>The response from the server may include these.</p> + +<h4 id="HTTPHeader(Sec-WebSocket-Accept)">{{HTTPHeader("Sec-WebSocket-Accept")}}</h4> + +<p>Included in the response message from the server during the opening handshake process when the server is willing to initiate a WebSocket connection. It will appear no more than once in the response headers.</p> + +<pre class="syntaxbox">Sec-WebSocket-Accept: <var>hash</var></pre> + +<dl> + <dt><code><var>hash</var></code></dt> + <dd>If a {{HTTPHeader("Sec-WebSocket-Key")}} header was provided, the value of this header is computed by taking the value of the key, concatenating the string "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" to it, taking the {{interwiki("wikipedia", "SHA-1")}} hash of that concatenated string, resulting in a 20-byte value. That value is then <a href="/ja/docs/Web/API/WindowBase64/Base64_encoding_and_decoding">base64</a> encoded to obtain the value of this property.</dd> +</dl> + +<h2 id="References" name="References">ãªãã¡ã¬ã³ã¹</h2> + +<ul> + <li><a href="/ja/docs/Web/API/WebSocket">WebSocket API</a></li> + <li><a href="/ja/docs/Web/HTTP">HTTP</a></li> + <li>ä»æ§æžãš RFC: + <ul> + <li>{{RFC(7230)}}</li> + <li>{{RFC(6455)}}</li> + <li>{{RFC(7540)}}</li> + </ul> + </li> +</ul> diff --git a/files/ja/web/http/proxy_servers_and_tunneling/index.html b/files/ja/web/http/proxy_servers_and_tunneling/index.html new file mode 100644 index 0000000000..2d26fd7e17 --- /dev/null +++ b/files/ja/web/http/proxy_servers_and_tunneling/index.html @@ -0,0 +1,98 @@ +--- +title: ãããã·ãµãŒããŒãšãã³ããªã³ã° +slug: Web/HTTP/Proxy_servers_and_tunneling +tags: + - HTTP + - HTTP Tunneling + - Proxies + - Proxy +translation_of: Web/HTTP/Proxy_servers_and_tunneling +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary">ã€ã³ã¿ãŒãããã®ããŸããŸãªãããã¯ãŒã¯ã移åãããšãã«ããããã·ãµãŒããŒãš HTTP ãã³ãã«ã¯ã World Wide Web äžã®ã³ã³ãã³ããžã®ã¢ã¯ã»ã¹ã容æã«ããŠããŸãããããã·ã¯ãŠãŒã¶ãŒã®ããŒã«ã«ã³ã³ãã¥ãŒã¿ããŸãã¯ãŠãŒã¶ãŒã®ã³ã³ãã¥ãŒã¿ãšã€ã³ã¿ãŒãããäžã®éä¿¡å
ãµãŒããŒã®éã®ä»»æã®å Žæã«é
眮ã§ããŸãããã®ããŒãžã§ã¯ãããã·ã«é¢ããããã€ãã®åºæ¬ãæŠèª¬ããããã€ãã®èšå®ãªãã·ã§ã³ã玹ä»ããŸãã</p> + +<p>ãããã·ã«ã¯ã<strong>ãã©ã¯ãŒããããã·</strong> (ãŸãã¯ãã³ãã«ãŸãã¯ã²ãŒããŠã§ã€) ãš<strong>ãªããŒã¹ãããã·</strong> (è² è·åæ£ãèªèšŒã埩å·åãŸãã¯ãã£ãã·ã¥çšã®ãµãŒããŒãžã®ã¢ã¯ã»ã¹ãå¶åŸ¡ããã³ä¿è·ããããã«äœ¿çšããã) ã®2çš®é¡ããããŸãã</p> + +<h2 id="Forward_proxies" name="Forward_proxies">ãã©ã¯ãŒããããã·</h2> + +<p>ãã©ã¯ãŒããããã·ããŸãã¯ã²ãŒããŠã§ã€ããŸãã¯åã«ããããã·ãã¯ãã¯ã©ã€ã¢ã³ããŸãã¯ã¯ã©ã€ã¢ã³ãã°ã«ãŒãã«ãããã·ãµãŒãã¹ãæäŸããŸããã€ã³ã¿ãŒãããã«ã¯æ°åäžãã®å
¬éãããã·ãååšããå¯èœæ§ããããŸããã°ã«ãŒãã«ãã£ãŠäœ¿çšããã垯åå¹
ãæžãããŠå¶åŸ¡ããããã«ãã€ã³ã¿ãŒããããµãŒãã¹ (DNS ã Web ããŒãžãªã©) ãæ ŒçŽããŠè»¢éããŸãã</p> + +<p>ãã©ã¯ãŒããããã·ã¯å¿åãããã·ã«ããããšãã§ãããŠãŒã¶ãŒã¯ Web ããã©ãŠãºãããä»ã®ã€ã³ã¿ãŒããããµãŒãã¹ã䜿çšããŠããéã«èªåã® IP ã¢ãã¬ã¹ãé ãããšãã§ããŸãã<a href="https://www.torproject.org/">TOR</a> (The Onion Router) ã¯ãå¿åæ§ã®ããã«è€æ°ã®ãããã·ãä»ããŠã€ã³ã¿ãŒããããã©ãã£ãã¯ãã«ãŒãã£ã³ã°ããŸãã</p> + +<h2 id="Reverse_proxies" name="Reverse_proxies">ãªããŒã¹ãããã·</h2> + +<p>ãã®ååã瀺ãããã«ããªããŒã¹ãããã·ã¯ãã©ã¯ãŒããããã·ãšã¯éã®åäœãè¡ããŸãããã©ã¯ãŒããããã·ã¯ã¯ã©ã€ã¢ã³ã (ãŸãã¯ãªã¯ãšã¹ããã¹ã) ã«ä»£ãã£ãŠåäœãããªããŒã¹ãããã·ã¯ãµãŒããŒã«ä»£ãã£ãŠåäœããŸãããã©ã¯ãŒããããã·ã¯ã¯ã©ã€ã¢ã³ãã® ID ãé ãããšãã§ããŸããããªããŒã¹ãããã·ã¯ãµãŒãã® ID ãé ãããšãã§ããŸãããªããŒã¹ãããã·ã«ã¯ããã€ãã®å©çšæ³ããããŸãããäžéšã玹ä»ããŸãã</p> + +<ul> + <li>ããŒããã©ã³ã·ã³ã°: è€æ°ã®ãŠã§ããµãŒããŒã«è² è·ãåæ£ããããš</li> + <li>éçãªã³ã³ãã³ãã®ãã£ãã·ã¥: åçã®ãããªéçã³ã³ãã³ãããã£ãã·ã¥ããããšã«ãã£ãŠãŠã§ããµãŒããŒã®è² è·ã軜æžããããš</li> + <li>å§çž®: ã³ã³ãã³ããå§çž®ããŠæé©åããèªã¿èŸŒã¿æéãççž®ããããš</li> +</ul> + +<h2 id="Forwarding_client_information_through_proxies" name="Forwarding_client_information_through_proxies">ãããã·ãä»ããŠã¯ã©ã€ã¢ã³ãæ
å ±ã転éãã</h2> + +<p>ãããã·ã¯ããããã·ã® IP ã¢ãã¬ã¹ããçºä¿¡ãããããã«ãªã¯ãšã¹ãã衚瀺ãããããšãã§ããŸãã ããã¯ã¯ã©ã€ã¢ã³ãã®å¿åæ§ãæäŸããããã«ãããã·ã䜿çšããå Žåã«äŸ¿å©ã§ããããã以å€ã®å Žåã¯å
ã®ãªã¯ãšã¹ãã®æ
å ±ã倱ãããŸãã å
ã®ã¯ã©ã€ã¢ã³ãã® IP ã¢ãã¬ã¹ã¯ããããã°ãçµ±èšããŸãã¯ãã±ãŒã·ã§ã³äŸåã®ã³ã³ãã³ãã®çæã«ãã䜿çšãããŸãã ãã®æ
å ±ãå
¬éããäžè¬çãªæ¹æ³ã¯ã次㮠HTTP ããããŒã䜿çšããããšã§ãã</p> + +<p>æšæºåãããããããŒ:</p> + +<dl> + <dt>{{HTTPHeader("Forwarded")}}</dt> + <dd>ãããã·ããªã¯ãšã¹ãã®ãã¹ã«å«ãŸããŠãããšãã«ãå€æŽãŸãã¯å€±ãããã¯ã©ã€ã¢ã³ãåŽã®ãããã·ãµãŒããŒåŽããã®æ
å ±ãå«ãŸããŸãã</dd> +</dl> + +<p>ãããã¯äºå®äžã®æšæºããŒãžã§ã³:</p> + +<dl> + <dt>{{HTTPHeader("X-Forwarded-For")}} {{non-standard_inline}}</dt> + <dd>HTTP ãããã·ãŸãã¯ããŒããã©ã³ãµãŒãä»ããŠãŠã§ããµãŒããŒã«æ¥ç¶ããŠããã¯ã©ã€ã¢ã³ãã®çºä¿¡å
IP ã¢ãã¬ã¹ãèå¥ããŸãã</dd> + <dt>{{HTTPHeader("X-Forwarded-Host")}} {{non-standard_inline}}</dt> + <dd>ã¯ã©ã€ã¢ã³ãããããã·ãŸãã¯ããŒããã©ã³ãµãŒãžã®æ¥ç¶ã«äœ¿çšããå
ã®ãã¹ããèå¥ããŸãã</dd> + <dt>{{HTTPHeader("X-Forwarded-Proto")}} {{non-standard_inline}}</dt> + <dd>ã¯ã©ã€ã¢ã³ãããããã·ãŸãã¯ããŒããã©ã³ãµãŒãžã®æ¥ç¶ã«äœ¿çšãããããã³ã« (HTTP ãŸã㯠HTTPS) ãèå¥ããŸãã</dd> +</dl> + +<p>(ã¯ã©ã€ã¢ã³ããžã®æ¥ç¶ã§ã¯ãªã) ãããã·èªäœã«é¢ããæ
å ±ãæäŸããã«ã¯ã<code>Via</code> ããããŒã䜿çšã§ããŸãã</p> + +<dl> + <dt>{{HTTPHeader("Via")}}</dt> + <dd>ãããã·ã«ãã£ãŠããã©ã¯ãŒããšãªããŒã¹ã®äž¡æ¹ã®ãããã·ãè¿œå ããããªã¯ãšã¹ãããããŒãšã¬ã¹ãã³ã¹ããããŒã«è¡šç€ºãããŸãã</dd> +</dl> + +<h2 id="HTTP_tunneling" name="HTTP_tunneling">HTTP ãã³ããªã³ã°</h2> + +<p>ãã³ããªã³ã°ã¯ããŒã¿ãã«ãã»ã«åããããšã«ãã£ãŠããããªãã¯ãããã¯ãŒã¯ãä»ããŠãã©ã€ããŒããããã¯ãŒã¯ããŒã¿ããã³ãããã³ã«æ
å ±ãéä¿¡ããŸãã HTTP ãã³ããªã³ã°ã¯ãããäœãã¬ãã«ã®ãããã³ã« (TCP) ãäŒéããããã«ãããé«ãã¬ãã« (HTTP) ã®ãããã³ã«ã䜿çšããŠããŸãã</p> + +<p>HTTP ãããã³ã«ã¯ {{HTTPMethod("CONNECT")}} ãšåŒã°ãããªã¯ãšã¹ãã¡ãœãããæå®ããŸãããªã¯ãšã¹ãããããªãœãŒã¹ãšã®åæ¹åéä¿¡ãéå§ãããã³ãã«ãéãããã«äœ¿çšããããšãã§ããŸããããã¯ãHTTP ãããã·ã®èåŸã«ããã¯ã©ã€ã¢ã³ãã SSL (ã€ãŸã HTTPSã443çªããŒã) ã䜿çšããŠãŠã§ããµã€ãã«ã¢ã¯ã»ã¹ããæ¹æ³ã§ãããã ãããã¹ãŠã®ãããã·ãµãŒããŒã <code>CONNECT</code> ã¡ãœããã«å¯Ÿå¿ããŠãããã443çªããŒãã®ã¿ã«éå®ãããããŠããããã§ã¯ãªãããšã«æ³šæããŠãã ããã</p> + +<p><a href="https://en.wikipedia.org/wiki/HTTP_tunnel">Wikipedia ã® HTTP ãã³ãã«ã®èšäº</a>ãåç
§ããŠãã ããã</p> + +<h2 id="Proxy_Auto-Configuration_PAC" name="Proxy_Auto-Configuration_PAC">ãããã·ã®èªåèšå® (PAC)</h2> + +<p><a href="/ja/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file">ãããã·èªåèšå® (PAC) ãã¡ã€ã«</a>ã¯ããŠã§ããã©ãŠã¶ãŒã®ãªã¯ãšã¹ã (HTTPãHTTPSãããã³ FTP) ãçŽæ¥å®å
ã«éä¿¡ãããããŠã§ããããã·ãµãŒããŒã«è»¢éãããã決å®ãã <a href="/ja/docs/Web/JavaScript">JavaScript</a> é¢æ°ã§ããPAC ãã¡ã€ã«ã«å«ãŸãã JavaScript é¢æ°ã¯ã次ã®é¢æ°ãå®çŸ©ããŸãã</p> + +<p id="Saving_the_Auto-Config_File_Setting_the_MIME_Type">auto-configãã¡ã€ã«ã¯æ¡åŒµåã <code>.pac</code> ã®ãã¡ã€ã«ã«ä¿åããå¿
èŠããããŸãã</p> + +<pre class="syntaxbox notranslate">proxy.pac</pre> + +<p>MIME ã¿ã€ãã¯æ¬¡ã®ããã«èšå®ãããŠããŸãã</p> + +<pre class="syntaxbox notranslate">application/x-ns-proxy-autoconfig</pre> + +<p>ãã®ãã¡ã€ã«ã¯ <code>FindProxyForURL</code> ãšããé¢æ°ã§æ§æãããŠããŸãã以äžã®äŸã¯ãå
éš DNS ãµãŒããŒãå
éšãã¹ãåã®ã¿ã解決ã§ããããã«èšå®ãããŠããç°å¢ã§åäœãã解決ã§ããªããã¹ãã«å¯ŸããŠã®ã¿ãããã·ã䜿çšããããšãç®æšãšããŠããŸãã</p> + +<pre class="brush: js notranslate">function FindProxyForURL(url, host) { + if (isResolvable(host)) + return "DIRECT"; + else + return "PROXY proxy.mydomain.com:8080"; +}</pre> + +<p>ä»ã®äŸã«ã€ããŠã¯<a href="/ja/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file">ãããã·èªåèšå® (PAC)</a> ãåç
§ããŠãã ããã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPMethod("CONNECT")}}</li> + <li><a href="https://en.wikipedia.org/wiki/Proxy_server">Proxy server on Wikipedia</a></li> +</ul> diff --git a/files/ja/web/http/proxy_servers_and_tunneling/proxy_auto-configuration_(pac)_file/index.html b/files/ja/web/http/proxy_servers_and_tunneling/proxy_auto-configuration_(pac)_file/index.html new file mode 100644 index 0000000000..ccd6c1125f --- /dev/null +++ b/files/ja/web/http/proxy_servers_and_tunneling/proxy_auto-configuration_(pac)_file/index.html @@ -0,0 +1,731 @@ +--- +title: ãããã·èªåèšå®ãã¡ã€ã« +slug: Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file +tags: + - Necko + - Networking + - PAC + - Proxy +translation_of: Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file +--- +<div>{{HTTPSidebar}}</div> + +<div><strong>ãããã·èªåèšå® (Proxy Auto-Configuration, PAC) ãã¡ã€ã«</strong>ã¯ããŠã§ããã©ãŠã¶ãŒã®ãªã¯ãšã¹ã (HTTP, HTTPS, FTP ç) ãçŽæ¥å®å
ã«éããããŠã§ããããã·ãµãŒããŒã«è»¢éããã決ãã JavaScript ã®é¢æ°ã§ãã次㮠JavaScript é¢æ°ã PAC ãã¡ã€ã«å
ã«èšè¿°ããŸãã</div> + +<pre class="brush: js notranslate">function FindProxyForURL(url, host) { + // ... +}</pre> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox notranslate">function FindProxyForURL(<var>url</var>, <var>host</var>)</pre> + +<h3 id="Parameters" name="Parameters">åŒæ°</h3> + +<dl> + <dt><code><var>url</var></code></dt> + <dd>ã¢ã¯ã»ã¹ãã URL ã§ãã <code>https://</code> ã® URL ã§ã¯ãã¹ãšã¯ãšãªã®éšåãåé€ãããŸãã Chrome (ããŒãžã§ã³52ïœ73) ã§ã¯ããªã·ãŒã§ <code>PacHttpsUrlStrippingEnabled</code> ã <code>false</code> ã«èšå®ããããã³ãã³ãã©ã€ã³ã§ <code>--unsafe-pac-url</code> ãã©ã°ãæå®ããããšã§ç¡å¹ã«ããããšãã§ããŸã (Chrome 74ã§ã¯ããã©ã°ã®ã¿ãåäœããŸãã75以éã§ã¯ããã¹ã®åé€ãç¡å¹ã«ããæ¹æ³ã¯ãããŸããã Chrome 81 ã§ã¯ããã¹ã®åé€ã¯ HTTP ã® URL ã§ã¯é©çšãããŸãããã HTTPS ã«åãããŠå€æŽãããäºå®ã§ãã)ã Firefox ã§ã¯ãèšå®å€ã¯ <code>network.proxy.autoconfig_url.include_path</code> ã§ãã</dd> + <dt><code><var>host</var></code></dt> + <dd>URL ããæœåºãããã¹ãåã§ããããã¯å©äŸ¿æ§ã®ã¿ã®ããã®ãã®ã§ãã <code>://</code> ãšãã®ããšã«æåã«çŸãã <code>:</code> ãŸã㯠<code>/</code> ãšåãæååã§ãããã®åŒæ°ã«ã¯ããŒãçªå·ã¯å«ãŸããŸãããå¿
èŠãªãã° URL ããåãåºããŠãã ããã</dd> +</dl> + +<h2 id="Description" name="Description">解説</h2> + +<p>æ§æãè¡šãæååãè¿ããŸãããã®æååã®æžåŒã¯åŸè¿°ã®<strong>è¿å€ã®åœ¢åŒ</strong>ã§å®çŸ©ãããŠããŸãã</p> + +<h3 id="Return_value_format" name="Return_value_format">è¿å€ã®åœ¢åŒ</h3> + +<ul> + <li>ãã® JavaScript ã®é¢æ°ã¯1ã€ã®æååãè¿ã</li> + <li>æååã null ã§ããå Žåããããã·ã¯äœ¿çšãããªã</li> + <li>æååã«ã¯ã»ãã³ãã³åºåãã§ã以äžã®æ§æãããã¯ãä»»æã®æ°ã ãå«ãããšãã§ãã</li> +</ul> + +<dl> + <dt><code>DIRECT</code></dt> + <dd>æ¥ç¶ã¯ãããã·ã䜿çšããã«ãçŽæ¥è¡ããã</dd> + <dt><code>PROXY <em>host:port</em></code></dt> + <dd>æå®ããããããã·ã䜿çšãã</dd> + <dt><code>SOCKS <em>host:port</em></code></dt> + <dd>æå®ããã SOCKS ãµãŒããŒã䜿çšãã</dd> +</dl> + +<p>æè¿ã® Firefox ã®ããŒãžã§ã³ã§ã¯æ¬¡ã®æžãæ¹ã«ã察å¿ããŠããŸãã</p> + +<dl> + <dt><code>HTTP <em>host:port</em></code></dt> + <dd>æå®ããããããã·ã䜿çšãã</dd> + <dt><code>HTTPS <em>host:port</em></code></dt> + <dd>æå®ããã HTTPS ãããã·ã䜿çšãã</dd> + <dt><code>SOCKS4 <em>host:port</em></code></dt> + <dt><code>SOCKS5 <em>host:port</em></code></dt> + <dd>æå®ããã SOCKS ãµãŒããŒã (æå®ããã SOCK ããŒãžã§ã³ã§) 䜿çšãã</dd> +</dl> + +<p>ã»ãã³ãã³åºåãã§è€æ°ã®èšå®ããã£ãå Žåã æãå·Šã®èšå®ãã Firefox ããããã·ãžã®æ¥ç¶ã®ç¢ºç«ã«å€±æããªãéã䜿çšãããŸãããã®å Žåã¯ããã®æ¬¡ã®èšå®ã䜿çšãããŸãã</p> + +<p>ãã©ãŠã¶ãŒã¯å¿çããªãã£ããããã·ã«å¯ŸããŠã30ååŸã«åæ¥ç¶ãè©Šã¿ãŸãããã®æ¬¡ã¯ïŒæéåŸã«è©Šè¡ããè©Šè¡ã®ãã³ã«ééã30åè¿œå ããŸãã</p> + +<p>ãã¹ãŠã®ãããã·ã䜿çšã§ããã DIRECT ãªãã·ã§ã³ãèšå®ãããŠããªãå Žåããã©ãŠã¶ãŒã¯äžæçã«ãããã·ãç¡èŠããŠçŽæ¥æ¥ç¶ãããå°ããŸãã20ååŸãã©ãŠã¶ãŒã¯ãããã·ã䜿ãããå確èªããããå°ãããã®40ååŸã«å床å°ããŸãããã®åäœã¯ééã20åãã€é·ãããŠç¶ããŸãã</p> + +<h4 id="Examples" name="Examples">äŸ</h4> + +<dl> + <dt><code>PROXY w3proxy.netscape.com:8080; PROXY mozilla.netscape.com:8081</code></dt> + <dd>1çªç®ã®ãããã·ã¯ w3proxy:8080 ã§ãã1çªç®ã®ãããã·ã䜿çšã§ããªãå Žåã¯å床䜿çšã§ããããã«ãªããŸã§ mozilla:8081 ã䜿çšããŸãã</dd> + <dt><code>PROXY w3proxy.netscape.com:8080; PROXY mozilla.netscape.com:8081; DIRECT</code></dt> + <dd>äžãšåãã§ãããäž¡æ¹äœ¿çšã§ããªãå Žåã«èªåçã«çŽæ¥æ¥ç¶ããŸãã (äžèšã®æåã®äŸã§ã¯ã Netscape ã¯ãŠãŒã¶ãŒã«çŽæ¥æ¥ç¶ããã確èªããŸããããã®äŸã§ã¯ç¢ºèªãããŸããã)</dd> + <dt><code>PROXY w3proxy.netscape.com:8080; SOCKS socks:1080</code></dt> + <dd>1çªç®ã®ãããã·ã䜿çšã§ããªãå Žå SOCKS ãµãŒãã䜿ããŸãã</dd> +</dl> + +<p id="Saving_the_Auto-Config_File_Setting_the_MIME_Type">èªåèšå®ãã¡ã€ã«ã¯ .pac ã®æ¡åŒµåã§ä¿åããªããã°ãªããŸããã</p> + +<pre class="syntaxbox notranslate">proxy.pac</pre> + +<p>MIME ã¿ã€ãã¯ä»¥äžã®ããã«èšå®ããŠãã ããã</p> + +<pre class="syntaxbox notranslate">application/x-ns-proxy-autoconfig</pre> + +<p>次ã«ã .pac æ¡åŒµåããã® MIME ã¿ã€ãã«çµã³ä»ãããããµãŒããŒãèšå®ããŠãã ããã</p> + +<div class="note"> +<p><strong>泚: </strong></p> + +<ul> + <li>JavaScript é¢æ°ã¯åžžã«åäœã®ãã¡ã€ã«ã§ä¿åãã HTML ãã¡ã€ã«ããã®ä»ã®ãã¡ã€ã«ã«åã蟌ãŸãªãã§ãã ããã</li> + <li>ãã®ææžã®æåŸã«ããäŸã¯å®å
šãªãã®ã§ãããã¡ã€ã«ãä¿åããŠäœ¿çšããã®ã«è¿œå ããå¿
èŠãããæ§æã¯ãããŸããã (ãã¡ããã JavaScript ãç·šéããŠèªåã®ãµã€ãã®ãã¡ã€ã³åããµãããããã¹ã¯ã«åãããå¿
èŠããããŸãã)</li> +</ul> +</div> + +<h2 id="Predefined_functions_and_environment" name="Predefined_functions_and_environment">å®çŸ©æžã¿ã®é¢æ°ãšç°å¢</h2> + +<p>PAC ãã¡ã€ã«ãäœæããããã«ã以äžã®é¢æ°ã䜿çšã§ããŸãã</p> + +<ul> + <li>ãã¹ãåã«åºã¥ãæ¡ä»¶ + <ul> + <li><code><a href="#isPlainHostName">isPlainHostName()</a></code></li> + <li><code><a href="#dnsDomainIs">dnsDomainIs()</a></code></li> + <li><code><a href="#localHostOrDomainIs">localHostOrDomainIs()</a></code></li> + <li><code><a href="#isResolvable">isResolvable()</a></code></li> + <li><code><a href="#isInNet">isInNet()</a></code></li> + </ul> + </li> + <li>é¢é£ãããŠãŒãã£ãªãã£ãŒé¢æ° + <ul> + <li><code><a href="#dnsResolve">dnsResolve()</a></code></li> + <li><code><a href="#convert_addr">convert_addr()</a></code></li> + <li><code><a href="#myIpAddress">myIpAddress()</a></code></li> + <li><code><a href="#dnsDomainLevels">dnsDomainLevels()</a></code></li> + </ul> + </li> + <li>URL/ãã¹ãåã«åºã¥ãæ¡ä»¶ + <ul> + <li><code><a href="#shExpMatch(str, shexp)">shExpMatch()</a></code></li> + </ul> + </li> + <li>æå»ã«åºã¥ãæ¡ä»¶ + <ul> + <li><code><a href="#weekdayRange">weekdayRange()</a></code></li> + <li><code><a href="#dateRange">dateRange()</a></code></li> + <li><code><a href="#timeRange">timeRange()</a></code></li> + </ul> + </li> + <li>ãã°çšãŠãŒãã£ãªã㣠+ <ul> + <li>{{domxref("Window/alert", "alert()")}}</li> + </ul> + </li> + <li>以å㯠JavaScript ã³ãŒããèªåèªèº«ã§å®çŸ©ããããšãã§ããªãã£ããããå®çŸ©æžã¿ã®é£æ³é
å (ãªããžã§ã¯ã) ãäžã€çšæãããŠããŸããã + <ul> + <li><code>ProxyConfig.bindings</code> {{obsolete_inline}}</li> + </ul> + </li> +</ul> + +<div class="note"> +<p><strong>泚:</strong> 以äžã®äŸããã¹ãããããã«ã pactester (<a href="https://github.com/pacparser/pacparser">pacparser</a>ããã±ãŒãžã®äžéš) ã䜿çšããŸããã</p> + +<ul> + <li>PAC ãã¡ã€ã«ã¯ <code>proxy.pac</code> ãšããååã§ã</li> + <li>ã³ãã³ãã©ã€ã³: <code>pactester -p ~/pacparser-master/tests/proxy.pac -u http://www.mozilla.org</code> (åŒæ° <code>host</code> ã« <code>www.mozilla.org</code> ããåŒæ° <code>url</code> ã« <code>http://www.mozilla.org</code> ãæž¡ããŸã)</li> +</ul> +</div> + +<h3 id="isPlainHostName">isPlainHostName()</h3> + +<h4 id="Syntax_2" name="Syntax_2">æ§æ</h4> + +<pre class="syntaxbox notranslate">isPlainHostName(<var>host</var>)</pre> + +<h4 id="Parameters_2" name="Parameters_2">åŒæ°</h4> + +<dl> + <dt>host</dt> + <dd>URLããåãåºãããã¹ãå (ããŒãçªå·ãé€ãããã®)</dd> +</dl> + +<h4 id="解説">解説</h4> + +<p>ãã¹ãåã«ãã¡ã€ã³åãå«ãŸããŠããªã (=ããããå«ãŸãªã) å Žå㯠true ã«ãªããŸãã</p> + +<h4 id="Examples_2" name="Examples_2">äŸ</h4> + +<pre class="brush: js notranslate">isPlainHostName("www.mozilla.org") // false +isPlainHostName("www") // true +</pre> + +<h3 id="dnsDomainIshost_domain" name="dnsDomainIs(host, domain)">dnsDomainIs()</h3> + +<h4 id="Syntax_3" name="Syntax_3">æ§æ</h4> + +<pre class="syntaxbox notranslate">dnsDomainIs(<var>host</var>, <var>domain</var>)</pre> + +<h4 id="Parameters_3" name="Parameters_3">åŒæ°</h4> + +<dl> + <dt>host</dt> + <dd>URL ããåãåºãããã¹ãå</dd> + <dt>domain</dt> + <dd>ãã¹ããæå±ããŠããã確èªããããã¡ã€ã³å</dd> +</dl> + +<h4 id="Description_3" name="Description_3">解説</h4> + +<p>ãã¹ãåã®ãã¡ã€ã³ãäžèŽããå Žåã«ã®ã¿ true ãè¿ããŸãã</p> + +<h4 id="Examples_3" name="Examples_3">äŸ</h4> + +<pre class="brush: js notranslate">dnsDomainIs("www.mozilla.org", ".mozilla.org") // true +dnsDomainIs("www", ".mozilla.org") // false +</pre> + +<h3 id="localHostOrDomainIs">localHostOrDomainIs()</h3> + +<h4 id="Syntax_4" name="Syntax_4">æ§æ</h4> + +<pre class="syntaxbox notranslate">localHostOrDomainIs(<var>host</var>, <var>hostdom</var>)</pre> + +<h4 id="Parameters_4" name="Parameters_4">åŒæ°</h4> + +<dl> + <dt>host</dt> + <dd>URLããåãåºãããã¹ãåã§ãã</dd> + <dt>hostdom</dt> + <dd>æ¯èŒå¯Ÿè±¡ã®å®å
šä¿®é£Ÿãã¹ãåã§ãã</dd> +</dl> + +<h4 id="Description_4" name="Description_4">解説</h4> + +<p>ãã¹ãåã<em>å®å
šã«</em>æå®ããããã¹ãåãšäžèŽããå ŽåããŸãã¯ãã¹ãåã«ãã¡ã€ã³åã®éšåããªãã修食ãããŠããªããã¹ãåãäžèŽããå Žåã« true ãè¿ããŸãã</p> + +<h4 id="Examples_4" name="Examples_4">äŸ</h4> + +<pre class="brush: js notranslate">localHostOrDomainIs("www.mozilla.org" , "www.mozilla.org") // true (exact match) +localHostOrDomainIs("www" , "www.mozilla.org") // true (hostname match, domain not specified) +localHostOrDomainIs("www.google.com" , "www.mozilla.org") // false (domain name mismatch) +localHostOrDomainIs("home.mozilla.org", "www.mozilla.org") // false (hostname mismatch)</pre> + +<h3 id="isResolvable">isResolvable()</h3> + +<h4 id="Syntax_5" name="Syntax_5">æ§æ</h4> + +<pre class="syntaxbox notranslate">isResolvable(<var>host</var>)</pre> + +<h4 id="Parameters_5" name="Parameters_5">åŒæ°</h4> + +<dl> + <dt>host</dt> + <dd>URLããåãåºãããã¹ãåã§ãã</dd> +</dl> + +<p>ãã¹ãåã®è§£æ±ºãè©Šã¿ãŸããæåããã° true ãè¿ããŸãã</p> + +<h4 id="Examples_5" name="Examples_5">äŸ:</h4> + +<pre class="brush: js notranslate">isResolvable("www.mozilla.org") // true +</pre> + +<h3 id="isInNet">isInNet()</h3> + +<h4 id="Syntax_6" name="Syntax_6">æ§æ</h4> + +<pre class="syntaxbox notranslate">isInNet(<var>host</var>, <var>pattern</var>, <var>mask</var>)</pre> + +<h4 id="Parameters_6">Parameters</h4> + +<dl> + <dt>host</dt> + <dd>a DNS hostname, or IP address. If a hostname is passed, it will be resolved into an IP address by this function.</dd> + <dt>pattern</dt> + <dd>an IP address pattern in the dot-separated format.</dd> + <dt>mask</dt> + <dd>mask for the IP address pattern informing which parts of the IP address should be matched against. 0 means ignore, 255 means match.</dd> +</dl> + +<p>True if and only if the IP address of the host matches the specified IP address pattern.</p> + +<p>Pattern and mask specification is done the same way as for SOCKS configuration.</p> + +<h4 id="Examples_6">Examples:</h4> + +<pre class="brush: js notranslate">function alert_eval(str) { alert(str + ' is ' + eval(str)) } +function FindProxyForURL(url, host) { + alert_eval('isInNet(host, "63.245.213.24", "255.255.255.255")') + // "PAC-alert: isInNet(host, "63.245.213.24", "255.255.255.255") is true" +} +</pre> + +<h3 id="dnsResolve">dnsResolve()</h3> + +<pre class="syntaxbox notranslate">dnsResolve(<em>host</em>)</pre> + +<h4 id="Parameters_7">Parameters</h4> + +<dl> + <dt>host</dt> + <dd>hostname to resolve.</dd> +</dl> + +<p>Resolves the given DNS hostname into an IP address, and returns it in the dot-separated format as a string.</p> + +<h4 id="Example">Example</h4> + +<pre class="brush: js notranslate">dnsResolve("www.mozilla.org"); // returns the string "104.16.41.2"</pre> + +<h3 id="convert_addr">convert_addr()</h3> + +<h4 id="Syntax_7">Syntax</h4> + +<pre class="syntaxbox notranslate">convert_addr(ipaddr)</pre> + +<h4 id="Parameters_8">Parameters</h4> + +<dl> + <dt>ipaddr</dt> + <dd>Any dotted address such as an IP address or mask.</dd> +</dl> + +<p>Concatenates the four dot-separated bytes into one 4-byte word and converts it to decimal.</p> + +<h4 id="Example_2">Example</h4> + +<pre class="brush: js notranslate">convert_addr("104.16.41.2"); // returns the decimal number 1745889538</pre> + +<h3 id="myIpAddress">myIpAddress()</h3> + +<h4 id="Syntax_8">Syntax</h4> + +<pre class="syntaxbox notranslate">myIpAddress()</pre> + +<h4 id="Parameters_9">Parameters</h4> + +<p><strong>(none)</strong></p> + +<p>Returns the server IP address of the machine Firefox is running on, as a string in the dot-separated integer format.</p> + +<div class="warning"> +<p>myIpAddress() returns the same IP address as the server address returned by <strong><code>nslookup localhost</code> </strong>on a Linux machine. It does not return the public IP address.</p> +</div> + +<h4 id="Example_3">Example</h4> + +<pre class="brush: js notranslate">myIpAddress() //returns the string "127.0.1.1" if you were running Firefox on that localhost</pre> + +<h3 id="dnsDomainLevels">dnsDomainLevels()</h3> + +<h4 id="Syntax_9">Syntax</h4> + +<pre class="syntaxbox notranslate">dnsDomainLevels(<var>host</var>)</pre> + +<h4 id="Parameters_10">Parameters</h4> + +<dl> + <dt>host</dt> + <dd>is the hostname from the URL.</dd> +</dl> + +<p>Returns the number (integer) of DNS domain levels (number of dots) in the hostname.</p> + +<h4 id="Examples_7">Examples:</h4> + +<pre class="brush: js notranslate">dnsDomainLevels("www"); // 0 +dnsDomainLevels("mozilla.org"); // 1 +dnsDomainLevels("www.mozilla.org"); // 2 +</pre> + +<h3 id="shExpMatch">shExpMatch()</h3> + +<h4 id="Syntax_10">Syntax</h4> + +<pre class="syntaxbox notranslate">shExpMatch(<var>str</var>, <var>shexp</var>)</pre> + +<h4 id="Parameters_11">Parameters</h4> + +<dl> + <dt>str</dt> + <dd>is any string to compare (e.g. the URL, or the hostname).</dd> + <dt>shexp</dt> + <dd>is a shell expression to compare against.</dd> +</dl> + +<p>Returns true if the string matches the specified shell expression.</p> + +<p><strong>Note that the patterns are <em>shell</em> glob <em>expressions</em>, not regular expressions. </strong><code>*</code> and <code>?</code> are always supported, while <code>[characters]</code> and <code>[^characters]</code> are supported by some implmentations including Firefox. This is mainly because the expression is translated to a RegExp via subsitution of <code>[.*?]</code>. For a reliable way to use these RegExp syntaxes, just use RegExp instead.</p> + +<h4 id="Examples_8">Examples</h4> + +<pre class="brush: js notranslate">shExpMatch("http://home.netscape.com/people/ari/index.html" , "*/ari/*"); // returns true +shExpMatch("http://home.netscape.com/people/montulli/index.html", "*/ari/*"); // returns false</pre> + +<h3 id="weekdayRange">weekdayRange()</h3> + +<h4 id="Syntax_11">Syntax</h4> + +<pre class="syntaxbox notranslate">weekdayRange(<var>wd1</var>, <var>wd2</var>, [<var>gmt</var>])</pre> + +<div class="note"> +<p><strong>Note:</strong> (Before Firefox 49) wd1 must be less than wd2 if you want the function to evaluate these parameters as a range. See the warning below.</p> +</div> + +<h4 id="Parameters_12">Parameters</h4> + +<dl> + <dt>wd1 and wd2</dt> + <dd>One of the ordered weekday strings:</dd> + <dt> + <pre class="syntaxbox notranslate">"SUN"|"MON"|"TUE"|"WED"|"THU"|"FRI"|"SAT"</pre> + </dt> + <dt>gmt</dt> + <dd>Is either the string "GMT" or is left out.</dd> +</dl> + +<p>Only the first parameter is mandatory. Either the second, the third, or both may be left out.</p> + +<p>If only one parameter is present, the function returns a value of true on the weekday that the parameter represents. If the string "GMT" is specified as a second parameter, times are taken to be in GMT. Otherwise, they are assumed to be in the local timezone.</p> + +<p>If both <strong>wd1 </strong>and <strong>wd1 </strong>are defined, the condition is true if the current weekday is in between those two <em>ordered </em>weekdays. Bounds are inclusive, <em>but the bounds are ordered</em>. If the "GMT" parameter is specified, times are taken to be in GMT. Otherwise, the local timezone is used.</p> + +<div class="warning"> +<p><strong>The order of the days matters</strong>; Before Firefox 49, <code>weekdayRange("<em>SUN", "SAT"</em>)</code> will always evaluate to true. Now <code>weekdayRange("<em>WED", "SUN"</em>)</code> will only evaluate true if the current day is Wednesday or Sunday.</p> +</div> + +<h4 id="Examples_9">Examples</h4> + +<pre class="brush: js notranslate">weekdayRange("MON", "FRI"); // returns true Monday through Friday (local timezone) +weekdayRange("MON", "FRI", "GMT"); // returns true Monday through Friday (GMT timezone) +weekdayRange("SAT"); // returns true on Saturdays local time +weekdayRange("SAT", "GMT"); // returns true on Saturdays GMT time +weekdayRange("FRI", "MON"); // returns true Friday and Monday only (note, order does matter!)</pre> + +<h3 id="dateRange">dateRange()</h3> + +<h4 id="Syntax_12">Syntax</h4> + +<pre class="syntaxbox notranslate">dateRange(<day> | <month> | <year>, [gmt]) // ambiguity is resolved by assuming year is greater than 31 +dateRange(<day1>, <day2>, [gmt]) +dateRange(<month1>, <month2>, [gmt]) +dateRange(<year1>, <year2>, [gmt]) +dateRange(<day1>, <month1>, <day2>, <month2>, [gmt]) +dateRange(<month1>, <year1>, <month2>, <year2>, [gmt]) +dateRange(<day1>, <month1>, <year1>, <day2>, <month2>, <year2>, [gmt])</pre> + +<div class="note"> +<p><strong>Note:</strong> (Before Firefox 49) day1 must be less than day2, month1 must be less than month2, and year1 must be less than year2 if you want the function to evaluate these parameters as a range. See the warning below.</p> +</div> + +<h4 id="Parameters_13">Parameters</h4> + +<dl> + <dt>day</dt> + <dd>Is the ordered day of the month between 1 and 31 (as an integer).</dd> +</dl> + +<pre class="syntaxbox notranslate">1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31</pre> + +<dl> + <dt>month</dt> + <dd>Is one of the ordered month strings below.</dd> +</dl> + +<pre class="syntaxbox notranslate">"JAN"|"FEB"|"MAR"|"APR"|"MAY"|"JUN"|"JUL"|"AUG"|"SEP"|"OCT"|"NOV"|"DEC"</pre> + +<dl> + <dt>year</dt> + <dd>Is the ordered full year integer number. For example, 2016 (<strong>not</strong> 16).</dd> + <dt>gmt</dt> + <dd>Is either the string "GMT", which makes time comparison occur in GMT timezone, or is left out. If left unspecified, times are taken to be in the local timezone.</dd> +</dl> + +<p>If only a single value is specified (from each category: day, month, year), the function returns a true value only on days that match that specification. If both values are specified, the result is true between those times, including bounds, <em>but the bounds are ordered</em>.</p> + +<div class="warning"> +<p><strong>The order of the days, months, and years matter</strong>; Before Firefox 49, <code>dateRange("<em>JAN", "DEC"</em>)</code> will always evaluate to <code>true</code>. Now <code>dateRange("<em>DEC", "JAN"</em>)</code> will only evaluate true if the current month is December or January.</p> +</div> + +<h4 id="Examples_10">Examples</h4> + +<pre class="brush: js notranslate">dateRange(1); // returns true on the first day of each month, local timezone +dateRange(1, "GMT") // returns true on the first day of each month, GMT timezone +dateRange(1, 15); // returns true on the first half of each month +dateRange(24, "DEC"); // returns true on 24th of December each year +dateRange("JAN", "MAR"); // returns true on the first quarter of the year + +dateRange(1, "JUN", 15, "AUG"); +// returns true from June 1st until August 15th, each year +// (including June 1st and August 15th) + +dateRange(1, "JUN", 1995, 15, "AUG", 1995); +// returns true from June 1st, 1995, until August 15th, same year + +dateRange("OCT", 1995, "MAR", 1996); +// returns true from October 1995 until March 1996 +// (including the entire month of October 1995 and March 1996) + +dateRange(1995); +// returns true during the entire year of 1995 + +dateRange(1995, 1997); +// returns true from beginning of year 1995 until the end of year 1997</pre> + +<h3 id="timeRange">timeRange()</h3> + +<h4 id="Syntax_13">Syntax</h4> + +<pre class="syntaxbox notranslate">// The full range of expansions is analogous to dateRange. +timeRange(<hour1>, <min1>, <sec1>, <hour2>, <min2>, <sec2>, [gmt])</pre> + +<div class="note"> +<p><strong>Note:</strong> (Before Firefox 49) the category hour1, min1, sec1 must be less than the category hour2, min2, sec2 if you want the function to evaluate these parameters as a range. See the warning below.</p> +</div> + +<h4 id="Parameters_14">Parameters</h4> + +<dl> + <dt>hour</dt> + <dd>Is the hour from 0 to 23. (0 is midnight, 23 is 11 pm.)</dd> + <dt>min</dt> + <dd>Minutes from 0 to 59.</dd> + <dt>sec</dt> + <dd>Seconds from 0 to 59.</dd> + <dt>gmt</dt> + <dd>Either the string "GMT" for GMT timezone, or not specified, for local timezone.</dd> +</dl> + +<p>If only a single value is specified (from each category: hour, minute, second), the function returns a true value only at times that match that specification. If both values are specified, the result is true between those times, including bounds, <em>but the bounds are ordered</em>.</p> + +<div class="warning"> +<p><strong>The order of the hour, minute, second matter</strong>; Before Firefox 49, <code>timeRange(<em>0, 23</em>)</code> will always evaluate to true. Now <code>timeRange(<em>23, 0</em>)</code> will only evaluate true if the current hour is 23:00 or midnight.</p> +</div> + +<h4 id="Examples_11">Examples</h4> + +<pre class="brush: js notranslate">timerange(12); // returns true from noon to 1pm +timerange(12, 13); // returns true from noon to 1pm +timerange(12, "GMT"); // returns true from noon to 1pm, in GMT timezone +timerange(9, 17); // returns true from 9am to 5pm +timerange(8, 30, 17, 00); // returns true from 8:30am to 5:00pm +timerange(0, 0, 0, 0, 0, 30); // returns true between midnight and 30 seconds past midnight</pre> + +<h2 id="Example_1">Example 1</h2> + +<h3 id="Use_proxy_for_everything_except_local_hosts">Use proxy for everything except local hosts</h3> + +<div class="note"> +<p><strong>Note:</strong> Since all of the examples that follow are very specific, they have not been tested.</p> +</div> + +<p>All hosts which aren't fully qualified, or the ones that are in local domain, will be connected to directly. Everything else will go through <code>w3proxy.mozilla.org:8080</code>. If the proxy goes down, connections become direct automatically:</p> + +<pre class="brush: js notranslate">function FindProxyForURL(url, host) { + if (isPlainHostName(host) || dnsDomainIs(host, ".mozilla.org")) { + return "DIRECT"; + } else { + return "PROXY w3proxy.mozilla.org:8080; DIRECT"; + } +}</pre> + +<div class="note"> +<p><strong>Note:</strong> This is the simplest and most efficient autoconfig file for cases where there's only one proxy.</p> +</div> + +<h2 id="Example_2_2">Example 2</h2> + +<h3 id="As_above_but_use_proxy_for_local_servers_which_are_outside_the_firewall">As above, but use proxy for local servers which are outside the firewall</h3> + +<p>If there are hosts (such as the main Web server) that belong to the local domain but are outside the firewall and are only reachable through the proxy server, those exceptions can be handled using the <code>localHostOrDomainIs()</code> function:</p> + +<pre class="brush: js notranslate">function FindProxyForURL(url, host) { + if ( + (isPlainHostName(host) || dnsDomainIs(host, ".mozilla.org")) && + !localHostOrDomainIs(host, "www.mozilla.org") && + !localHostOrDoaminIs(host, "merchant.mozilla.org") + ) { + return "DIRECT"; + } else { + return "PROXY w3proxy.mozilla.org:8080; DIRECT"; + } +}</pre> + +<p>The above example will use the proxy for everything except local hosts in the mozilla.org domain, with the further exception that hosts <code>www.mozilla.org</code> and <code>merchant.mozilla.org</code> will go through the proxy.</p> + +<div class="note"> +<p><strong>Note</strong> the order of the above exceptions for efficiency: localHostOrDomainIs() functions only get executed for URLs that are in local domain, not for every URL. Be careful to note the parentheses around the<em> or</em> expression before the <em>and</em> expression to achieve the above-mentioned efficient behaviour.</p> +</div> + +<h2 id="Example_3_2">Example 3</h2> + +<h3 id="Use_proxy_only_if_cannot_resolve_host">Use proxy only if cannot resolve host</h3> + +<p>This example will work in an environment where the internal DNS server is set up so that it can only resolve internal host names, and the goal is to use a proxy only for hosts that aren't resolvable:</p> + +<pre class="brush: js notranslate">function FindProxyForURL(url, host) { + if (isResolvable(host)) + return "DIRECT"; + else + return "PROXY proxy.mydomain.com:8080"; +}</pre> + +<p>The above requires consulting the DNS every time; it can be grouped intelligently with other rules so that DNS is consulted only if other rules do not yield a result:</p> + +<pre class="brush: js notranslate">function FindProxyForURL(url, host) { + if ( + isPlainHostName(host) || + dnsDomainIs(host, ".mydomain.com") || + isResolvable(host) + ) { + return "DIRECT"; + } else { + return "PROXY proxy.mydomain.com:8080"; + } +}</pre> + +<h2 id="Example_4">Example 4</h2> + +<h3 id="Subnet_based_decisions">Subnet based decisions</h3> + +<p>In this example all of the hosts in a given subnet are connected-to directly, others are connected through the proxy:</p> + +<pre class="brush: js notranslate">function FindProxyForURL(url, host) { + if (isInNet(host, "198.95.0.0", "255.255.0.0")) + return "DIRECT"; + else + return "PROXY proxy.mydomain.com:8080"; +}</pre> + +<p>Again, use of the DNS server in the above can be minimized by adding redundant rules in the beginning:</p> + +<pre class="brush: js notranslate">function FindProxyForURL(url, host) { + if ( + isPlainHostName(host) || + dnsDomainIs(host, ".mydomain.com") || + isInNet(host, "198.95.0.0", "255.255.0.0") + ) { + return "DIRECT"; + } else { + return "PROXY proxy.mydomain.com:8080"; + } +}</pre> + +<h2 id="Example_5">Example 5</h2> + +<h3 id="Load_balancingrouting_based_on_URL_patterns">Load balancing/routing based on URL patterns</h3> + +<p>This example is more sophisticated. There are four (4) proxy servers; one of them is a hot stand-by for all of the other ones, so if any of the remaining three goes down the fourth one will take over. Furthermore, the three remaining proxy servers share the load based on URL patterns, which makes their caching more effective (there is only one copy of any document on the three servers - as opposed to one copy on each of them). The load is distributed like this:</p> + +<table> + <tbody> + <tr> + <th>Proxy</th> + <th>Purpose</th> + </tr> + <tr> + <td>#1</td> + <td>.com domain</td> + </tr> + <tr> + <td>#2</td> + <td>.edu domain</td> + </tr> + <tr> + <td>#3</td> + <td>all other domains</td> + </tr> + <tr> + <td>#4</td> + <td>hot stand-by</td> + </tr> + </tbody> +</table> + +<p>All local accesses are desired to be direct. All proxy servers run on the port 8080 (they don't need to, you can just change your port but remember to modify your configuations on both side). Note how strings can be concatenated with the <code><strong>+</strong></code> operator in JavaScript.</p> + +<pre class="brush: js notranslate">function FindProxyForURL(url, host) { + + if (isPlainHostName(host) || dnsDomainIs(host, ".mydomain.com")) + return "DIRECT"; + + else if (shExpMatch(host, "*.com")) + return "PROXY proxy1.mydomain.com:8080; " + + "PROXY proxy4.mydomain.com:8080"; + + else if (shExpMatch(host, "*.edu")) + return "PROXY proxy2.mydomain.com:8080; " + + "PROXY proxy4.mydomain.com:8080"; + + else + return "PROXY proxy3.mydomain.com:8080; " + + "PROXY proxy4.mydomain.com:8080"; +}</pre> + +<h2 id="Example_6">Example 6</h2> + +<h3 id="Setting_a_proxy_for_a_specific_protocol">Setting a proxy for a specific protocol</h3> + +<p>Most of the standard JavaScript functionality is available for use in the <code>FindProxyForURL()</code> function. As an example, to set different proxies based on the protocol the {{jsxref("String.prototype.startsWith()", "startsWith()")}} function can be used:</p> + +<pre class="brush: js notranslate">function FindProxyForURL(url, host) { + + if (url.startsWith("http:")) + return "PROXY http-proxy.mydomain.com:8080"; + + else if (url.startsWith("ftp:")) + return "PROXY ftp-proxy.mydomain.com:8080"; + + else if (url.startsWith(âgopher:")) + return "PROXY gopher-proxy.mydomain.com:8080"; + + else if (url.startsWith("https:") || url.startsWith("snews:")) + return "PROXY security-proxy.mydomain.com:8080"; + + else + return "DIRECT"; + +}</pre> + +<div class="note"> +<p><strong>Note:</strong> The same can be accomplished using the <code><a href="#shExpMatch">shExpMatch()</a></code> function described earlier.</p> +</div> + +<p>For example:</p> + +<pre class="brush: js notranslate">// ... +if (shExpMatch(url, "http:*")) { + return "PROXY http-proxy.mydomain.com:8080"; +} +// ...</pre> + +<div class="note"> +<p>The autoconfig file can be output by a CGI script. This is useful, for example, when making the autoconfig file act differently based on the client IP address (the <code>REMOTE_ADDR</code> environment variable in CGI).</p> + +<p>Usage of <code>isInNet()</code>, <code>isResolvable()</code> and <code>dnsResolve()</code> functions should be carefully considered, as they require the DNS server to be consulted. All the other autoconfig-related functions are mere string-matching functions that don't require the use of a DNS server. If a proxy is used, the proxy will perform its DNS lookup which would double the impact on the DNS server. Most of the time these functions are not necessary to achieve the desired result.</p> +</div> + +<h2 id="History_and_implementation">History and implementation</h2> + +<p>Proxy auto-config was introduced into Netscape Navigator 2.0 in the late 1990s, at the same time when JavaScript was introduced. Open-sourcing Netscape eventually lead to Firefox itself.</p> + +<p>The most "original" implementation of PAC and its JavaScript libraries is, therefore, <code>nsProxyAutoConfig.js</code> found in early versions of Firefox. These utilities are found in many other open-source systems including <a href="https://cs.chromium.org/chromium/src/services/proxy_resolver/pac_js_library.h">Chromium</a>. Firefox later integrated the file into <code><a href="https://dxr.mozilla.org/mozilla-central/source/netwerk/base/ProxyAutoConfig.cpp">ProxyAutoConfig.cpp</a></code> as a C++ string literal. To extract it into its own file, it suffices to copy the chunk into JavaScript with a <code>console.log</code> directive to print it.</p> + +<p>Microsoft in general made its own implementation. There used to be <a href="https://en.wikipedia.org/wiki/Proxy_auto-config#Old_Microsoft_problems">some problems with their libraries</a>, but most are resolved by now. They have defined <a href="https://docs.microsoft.com/en-us/windows/win32/winhttp/ipv6-extensions-to-navigator-auto-config-file-format">some new "Ex" suffixed functions</a> around the address handling parts to support IPv6. The feature is supported by Chromium, but not yet by Firefox (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=558253">bugzilla #558253</a>).</p> diff --git a/files/ja/web/http/range_requests/index.html b/files/ja/web/http/range_requests/index.html new file mode 100644 index 0000000000..ab579bfb3f --- /dev/null +++ b/files/ja/web/http/range_requests/index.html @@ -0,0 +1,119 @@ +--- +title: HTTP ç¯å²ãªã¯ãšã¹ã +slug: Web/HTTP/Range_requests +tags: + - HTTP + - HTTP ç¯å²ãªã¯ãšã¹ã + - ã¬ã€ã +translation_of: Web/HTTP/Range_requests +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary">HTTP ç¯å²ãªã¯ãšã¹ãã§ã¯ããµãŒããŒããã¯ã©ã€ã¢ã³ãã« HTTP ã¡ãã»ãŒãžã®äžéšã®ã¿ãéä¿¡ã§ããŸããéšåãªã¯ãšã¹ãã¯ãããšãã°ã倧ããªã¡ãã£ã¢ããäžæåæ¢ãåéæ©èœãæã€ãã¡ã€ã«ã®ããŠã³ããŒãã«åœ¹ç«ã¡ãŸãã</p> + +<h2 id="Checking_if_a_server_supports_partial_requests" name="Checking_if_a_server_supports_partial_requests">ãµãŒããŒãéšåãªã¯ãšã¹ãã«å¯Ÿå¿ããŠãããã©ããã®ç¢ºèª</h2> + +<p>{{HTTPHeader("Accept-Ranges")}} ã HTTP ã¬ã¹ãã³ã¹ã«ååšããå Žå (ãããŠå€ã "<code>none</code>" ã§ã¯ãªãå Žå)ããµãŒããŒã¯ç¯å²ãªã¯ãšã¹ãã«å¯Ÿå¿ããŠããŸããããã¯äŸãã°ã {{HTTPMethod("HEAD")}} ãªã¯ãšã¹ãã cURL ã§çºè¡ããããšã§ç¢ºèªããããšãã§ããŸãã</p> + +<pre class="notranslate">curl -I http://i.imgur.com/z4d4kWk.jpg + +HTTP/1.1 200 OK +... +Accept-Ranges: bytes +Content-Length: 146515 +</pre> + +<p>ãã®ã¬ã¹ãã³ã¹ã®äžã§ã <code>Accept-Ranges: bytes</code> ã¯ç¯å²ãå®çŸ©ããåäœãšããŠãã€ãæ°ã䜿ããããšã瀺ããŠããŸãããã㧠{{HTTPHeader("Content-Length")}} ããããŒãåãåãç»åã®å
šäœã®é·ãã瀺ãã®ã§æçšã§ãã</p> + +<p>ãµã€ãã <code>Accept-Ranges</code> ããããŒãçç¥ããå Žåã¯ãããããéšåãªã¯ãšã¹ãã«å¯Ÿå¿ããŠããŸããããµã€ãã«ãã£ãŠã¯å€ãšããŠæ瀺çã« "<code>none</code>" ãéä¿¡ããŠã察å¿ããªãããšã瀺ãããšããããŸããã¢ããªã«ãã£ãŠã¯ããã®ãããªå Žåã«ããŠã³ããŒããããŒãžã£ãŒãäžæåæ¢ãã¿ã³ãç¡å¹åããŸãã</p> + +<pre class="notranslate">curl -I https://www.youtube.com/watch?v=EwTZ2xpQwpA + +HTTP/1.1 200 OK +... +Accept-Ranges: none +</pre> + +<h2 id="Requesting_a_specific_range_from_a_server" name="Requesting_a_specific_range_from_a_server">ãµãŒããŒããã®ç¹å®ã®ç¯å²ã®ãªã¯ãšã¹ã</h2> + +<p>ãµãŒããŒãç¯å²ãªã¯ãšã¹ãããµããŒãããŠããå Žåããã®ãªã¯ãšã¹ãã{{HTTPHeader("Range")}}ã§çºè¡ããããšãã§ããããã¯ãµãŒããŒãè¿ãã¹ãããã¥ã¡ã³ãã®äžéšåãæã瀺ããŠããŸãã</p> + +<h3 id="Single_part_ranges" name="Single_part_ranges">åäžéšåã®ãªã¯ãšã¹ã</h3> + +<p>ãªãœãŒã¹ããåäžã®ç¯å²ãèŠæ±ããããšãå¯èœã§ããããã§åã³ãcURL ãçšããŠãããæ€èšŒããããšãã§ããŸãã"<code>-H</code>"ãªãã·ã§ã³ã¯ãªã¯ãšã¹ãã«å¯ŸããŠããã®å Žåãæåã®1024ãã€ããèŠæ±ãã<code>Range</code> ããããŒã©ã€ã³ãä»ãå ããããšãã§ããŸãã</p> + +<pre class="notranslate">curl http://i.imgur.com/z4d4kWk.jpg -i -H "Range: bytes=0-1023"</pre> + +<p>çºè¡ããããªã¯ãšã¹ãã¯æ¬¡ã®ããã«ãªããŸã:</p> + +<pre class="notranslate">GET /z4d4kWk.jpg HTTP/1.1 +Host: i.imgur.com +Range: bytes=0-1023</pre> + +<p>ãµãŒããŒã¯ {{HTTPStatus("206")}} <code>Partial Content</code> ã¹ããŒã¿ã¹ã³ãŒããšãšãã«ä»¥äžã®ã¬ã¹ãã³ã¹ãè¿ããŸã:</p> + +<pre class="notranslate">HTTP/1.1 206 Partial Content +Content-Range: bytes 0-1023/146515 +Content-Length: 1024 +... +(binary content) +</pre> + +<p>{{HTTPHeader("Content-Length")}} ã¯ããã§ã®å ŽåãèŠæ±ãããç¯å²ã®å€§ãããè¿ããŸã(ç»åå
šäœã®å€§ããã§ã¯ãããŸãã)ã {{HTTPHeader("Content-Range")}} ã¬ã¹ãã³ã¹ããããŒã¯ãã®éšåçãªã¡ãã»ãŒãžãå
šäœã®ãªãœãŒã¹ã®ãã¡ã®ã©ã®éšåã«å±ããŠããã®ããæã瀺ããŠããŸãã</p> + +<h3 id="Multipart_ranges" name="Multipart_ranges">è€æ°éšåã®ãªã¯ãšã¹ã</h3> + +<p>{{HTTPHeader("Range")}} ããããŒã¯ãŸããããã¥ã¡ã³ãã®è€æ°ã®ç¯å²ãäžåºŠã«ååŸããæ段ãæäŸããŠããŸãããããè€æ°ã®ç¯å²ã¯ã«ã³ãã§åºåãããšã§æå®ã§ããŸãã</p> + +<pre class="notranslate">curl http://www.example.com -i -H "Range: bytes=0-50, 100-150"</pre> + +<p>ãµãŒããŒã¯ {{HTTPStatus("206")}} <code>Partial Content</code> ã¹ããŒã¿ã¹ã³ãŒããš {{HTTPHeader("Content-Type")}}<code>: multipart/byteranges; boundary=3d6b6a416f9b5</code> ãããã䌎ã£ãŠã¬ã¹ãã³ã¹ãè¿ããããã§ã¯æå®ããè€æ°ã®ãã€ãç¯å²ã«é¢ããããŒã¿ãåŸãã«ç¶ããŠããããšãããããŸãã åã
ã®ãã€ãç¯å²ã«ãããŠå¯Ÿå¿ãã <code>Content-Type</code> ãšÂ <code>Content-Range</code> ããããŒãã£ãŒã«ããå«ãŸããŠãããããããã®ããã£éšåãåºåãããã®å¢çæååãå¢çãã©ã¡ãŒã¿ãŒã«ãã£ãŠæå®ãããŠããŸãã</p> + +<pre class="notranslate">HTTP/1.1 206 Partial Content +Content-Type: multipart/byteranges; boundary=3d6b6a416f9b5 +Content-Length: 282 + +--3d6b6a416f9b5 +Content-Type: text/html +Content-Range: bytes 0-50/1270 + +<!doctype html> +<html> +<head> + <title>Example Do +--3d6b6a416f9b5 +Content-Type: text/html +Content-Range: bytes 100-150/1270 + +eta http-equiv="Content-type" content="text/html; c +--3d6b6a416f9b5--</pre> + +<h3 id="Conditional_range_requests" name="Conditional_range_requests">æ¡ä»¶ä»ãç¯å²ãªã¯ãšã¹ã</h3> + +<p>ãªãœãŒã¹ã®ãããªãéšåã«å¯ŸããŠãªã¯ãšã¹ããåéããéãæåŸã«ãã€ãç¯å²ã®æçãåãåã£ããšãããããµãŒããŒåŽã§æ ŒçŽãããŠãããªãœãŒã¹ãå€æŽãããŠããªãããšãä¿èšŒããå¿
èŠããããŸãã</p> + +<p>{{HTTPHeader("If-Range")}} HTTPãªã¯ãšã¹ããããã¯ç¯å²ãªã¯ãšã¹ãã«å¯ŸããŠæ¡ä»¶ä»ããä»äžããããšãã§ããŸããæ¡ä»¶ãæºããããå Žåãç¯å²ãªã¯ãšã¹ããçºè¡ããããµãŒããŒã¯é©åãªããã£ãšãšãã« {{HTTPStatus("206")}} <code>Partial Content</code> ã¹ããŒã¿ã¹ãè¿ããŸããããæ¡ä»¶ãæºããããªãã£ãå Žåãå
šãŠã®ãªãœãŒã¹ã {{HTTPStatus("200")}} <code>OK</code> ã¹ããŒã¿ã¹ãšãšãã«è¿ãããŸãããã®ããã㯠{{HTTPHeader("Last-Modified")}} validatorããã㯠{{HTTPHeader("ETag")}} ã䌎ã£ãŠçšããããŸããäž¡æ¹ãåæã«äœ¿ãããšã¯ãããŸããã</p> + +<pre class="notranslate">If-Range: Wed, 21 Oct 2015 07:28:00 GMT </pre> + +<h2 id="Partial_request_responses" name="Partial_request_responses">éšåçãªãªã¯ãšã¹ãã®ã¬ã¹ãã³ã¹</h2> + +<p>ç¯å²ãªã¯ãšã¹ããçšããéãããã«é¢é£ããïŒã€ã®ã¹ããŒã¿ã¹ã³ãŒããååšããŸãã</p> + +<ul> + <li>ç¯å²ãªã¯ãšã¹ããæåããé {{HTTPStatus("206")}} <code>Partial Content</code> ã¹ããŒã¿ã¹ã³ãŒãããµãŒããŒããè¿ãããŸãã</li> + <li>ç¯å²ãªã¯ãšã¹ããå
ã®ãªãœãŒã¹ã®å¢çãè¶ãåºãå Žå (ã€ãŸãç¯å²ã瀺ãå€ããªãœãŒã¹ããå€ã«ã¯ã¿åºãå Žå) ããµãŒããŒã¯ {{HTTPStatus("416")}} <code>Requested Range Not Satisfiable</code> ã¹ããŒã¿ã¹ã³ãŒããè¿ããŸãã</li> + <li>ç¯å²ãªã¯ãšã¹ãããµããŒããããŠããªãå ŽåããµãŒããŒãã {{HTTPStatus("200")}} <code>OK</code> ã¹ããŒã¿ã¹ã³ãŒããè¿ãããŸãã</li> +</ul> + +<h2 id="Comparison_to_chunked_Transfer-Encoding" name="Comparison_to_chunked_Transfer-Encoding">ãã£ã³ã¯ <code>Transfer-Encoding</code> ãšã®æ¯èŒ</h2> + +<p>{{HTTPHeader("Transfer-Encoding")}} ããããŒãçšããããšã§ãã£ã³ã¯ããšã®ãšã³ã³ãŒãã£ã³ã°ãå¯èœã«ãªããŸããããã¯å€§ãããµã€ãºã®ããŒã¿ãã¯ã©ã€ã¢ã³ãã«éããããªã¯ãšã¹ããå®å
šã«åŠçããããŸã§ã¬ã¹ãã³ã¹å
šäœã®ãµã€ãºãå€æããªãå Žåã«æçšã§ãããµãŒããŒã¯ã¯ã©ã€ã¢ã³ãã«å¯ŸããŠããããã¡ãªã³ã°ãå®éã®å€§ããã確ãããããšãªããå³åº§ã«ããŒã¿ãéããŸããããã¯ã¬ã€ãã³ã·ãŒã®åäžã«å°ããŸããç¯å²ãªã¯ãšã¹ããšãã£ã³ã¯ã®äœ¿çšã¯å
±çšå¯èœã§ãããäºãã«æå®ãããŠããããšããªããããšæ°ã«ãã䜿çšããããšãå¯èœã§ãã</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>é¢é£ããã¹ããŒã¿ã¹ã³ãŒã {{HTTPStatus("200")}}, {{HTTPStatus("206")}}, {{HTTPStatus("416")}}.</li> + <li>é¢é£ããããããŒ: {{HTTPHeader("Accept-Ranges")}}, {{HTTPHeader("Range")}}, {{HTTPHeader("Content-Range")}}, {{HTTPHeader("If-Range")}}, {{HTTPHeader("Transfer-Encoding")}}.</li> + <li><a href="https://blogs.msdn.microsoft.com/ieinternals/2011/06/03/download-resumption-in-internet-explorer/">Download resumption in Internet Explorer</a></li> +</ul> diff --git a/files/ja/web/http/redirections/index.html b/files/ja/web/http/redirections/index.html new file mode 100644 index 0000000000..03f6562862 --- /dev/null +++ b/files/ja/web/http/redirections/index.html @@ -0,0 +1,288 @@ +--- +title: HTTP ã®ãªãã€ã¬ã¯ã +slug: Web/HTTP/Redirections +tags: + - Guide + - HTTP + - redirects +translation_of: Web/HTTP/Redirections +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><span class="seoSummary"><em>URL ãªãã€ã¬ã¯ã</em>ã¯ã <em>URL 転é</em>ãšãåŒã°ããããŒãžããã©ãŒã ããŠã§ãã¢ããªã±ãŒã·ã§ã³å
šäœãªã©ã«äºã€ä»¥äžã® URL ã®ã¢ãã¬ã¹ãäžããæè¡ã§ãã HTTP ã§ã¯ãã®æäœã®ããã«ãç¹å¥ãªçš®é¡ã®ã¬ã¹ãã³ã¹ã§ãã <em><strong>HTTP ãªãã€ã¬ã¯ã</strong></em>ãæäŸããŠããŸãã</span></p> + +<p>ãªãã€ã¬ã¯ãã«ã¯å€ãã®ç®çããããŸãã</p> + +<ul> + <li>ãµã€ããã¡ã³ããã³ã¹ããŠããéã®äžæçãªãªãã€ã¬ã¯ã</li> + <li>ãµã€ãã®æ§æãå€æŽããåŸãå€éšã®ãªã³ã¯ãæ©èœãããããã®æä¹
çãªãªãã€ã¬ã¯ãããã¡ã€ã«ãã¢ããããŒãããŠãããšãã®é²æã瀺ãããŒãžãªã©</li> +</ul> + +<h2 id="Principle" name="Principle">åç</h2> + +<p>HTTP ã§ã¯ããªãã€ã¬ã¯ãã¯ãªã¯ãšã¹ãã«å¯ŸããŠããµãŒããŒãç¹å¥ãª<em>ãªãã€ã¬ã¯ã</em>ã¬ã¹ãã³ã¹ããšããç¹å¥ãªã¬ã¹ãã³ã¹ãéä¿¡ããããšã«ãã£ãŠããµãŒããŒããªãã€ã¬ã¯ããçºçãããŸãããªãã€ã¬ã¯ãã¬ã¹ãã³ã¹ã¯<a href="/ja/docs/Web/HTTP/Status">ã¹ããŒã¿ã¹ã³ãŒã</a>ã <code>3</code> ã§å§ãŸãã {{ httpheader("Location") }} ããããŒããªãã€ã¬ã¯ãå
ã® URL ãä¿æããŠããŸãã</p> + +<p>ãã©ãŠã¶ãŒããªãã€ã¬ã¯ããåãåããšã <code>Location</code> ããããŒã§æäŸãããæ°ã㪠URL ã䜿çšããŠçŽã¡ã«èªã¿èŸŒã¿ãè¡ããŸããè¿œå ã®åŸåŸ©ã«ããããã©ãŒãã³ã¹ã®äœäžã®ä»ã«ããŠãŒã¶ãŒããªãã€ã¬ã¯ãã«æ°ã¥ãããšã¯ã»ãšãã©ãããŸããã</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13785/HTTPRedirect.png"></p> + +<p>ãªãã€ã¬ã¯ãã«ã¯äœçš®é¡ãããããŸããã3ã€ã®ã«ããŽãªã«åé¡ããããšãã§ããŸãã</p> + +<ol> + <li><a href="#Permanent_redirections">æä¹
çãªãã€ã¬ã¯ã</a></li> + <li><a href="#Temporary_redirections">äžæçãªãã€ã¬ã¯ã</a></li> + <li><a href="#Special_redirections">ç¹æ®ãªãã€ã¬ã¯ã</a></li> +</ol> + +<h3 id="Permanent_redirections" name="Permanent_redirections">æä¹
çãªãã€ã¬ã¯ã</h3> + +<p>ãããã®ãªãã€ã¬ã¯ãã¯æ°žé ã«ç¶ãããšãæå³ããŸãããããã®ãªãã€ã¬ã¯ãã¯ãå
ã® URL ã¯ãã䜿çšããããæ°ãããã®ã«çœ®ãæããã¹ãã§ããããšã瀺ããŠããŸããæ€çŽ¢ãšã³ãžã³ã®ããããã RSS ãªãŒããŒãããã³ä»ã®ã¯ããŒã©ãŒã¯ããªãœãŒã¹ã®å
ã® URL ãæŽæ°ããŸãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="row">ã³ãŒã</th> + <th scope="col">ããã¹ã</th> + <th scope="col">ã¡ãœããã®æ±ã</th> + <th scope="col">äž»ãªäœ¿çšäŸ</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row"><code>301</code></th> + <td><code>Moved Permanently</code></td> + <td>{{HTTPMethod("GET")}} ã¡ãœããã¯å€æŽããŸããã<br> + ä»ã®ã¡ãœãã㯠{{HTTPMethod("GET")}} ã«å€æŽããããããããŸããã<sup><a href="#attr1">[1]</a></sup></td> + <td>ãŠã§ããµã€ãã®åç·šã</td> + </tr> + <tr> + <th scope="row"><code>308</code></th> + <td><code>Permanent Redirect</code></td> + <td>ã¡ãœãããæ¬æã¯å€æŽããŸããã</td> + <td>GET 以å€ã®ãªã³ã¯ãæäœãå«ããŠã§ããµã€ãã®åç·šã</td> + </tr> + </tbody> +</table> + +<p id="attr1">[1] ä»æ§æžã§ã¯ã¡ãœããã®å€æŽãæå³ããŠããŸããããã¡ãœãããå€æŽãããŠãŒã¶ãŒãšãŒãžã§ã³ããååšããŸãã {{HTTPStatus("308")}} ãå®çŸ©ãããã®ã¯ã <code>GET</code> 以å€ã®ã¡ãœããã䜿çšãããšãã®åäœã®ãããŸããããªããããã§ãã</p> + +<h3 id="Temporary_redirections" name="Temporary_redirections">äžæçãªãã€ã¬ã¯ã</h3> + +<p>æ£èŠã®å Žæã§ã¬ã¹ãã³ã¹ãããªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããšã¯ã§ããŸããããå¥ã®å Žæã§ã¢ã¯ã»ã¹ã§ããå ŽåããããŸãããã®ãããªå Žåã«ãäžæçãªãªãã€ã¬ã¯ãã䜿çšã§ããŸãã</p> + +<p>æ€çŽ¢ãšã³ãžã³ã®ããããã¯ãæ°ããªäžæç URL ãèšé²ããŸãããäžæçãªãã€ã¬ã¯ãã¯ããªãœãŒã¹ãäœæãæŽæ°ãåé€ããŠãããšãã«äžæçãªé²æããŒãžãæäŸããããã«ãå©çšãããŸãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="row">ã³ãŒã</th> + <th scope="col">ããã¹ã</th> + <th scope="col">ã¡ãœããã®æ±ã</th> + <th scope="col">äž»ãªäœ¿çšäŸ</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row"><code>302</code></th> + <td><code>Found</code></td> + <td>{{HTTPMethod("GET")}} ã¡ãœããã¯å€æŽããŸããã<br> + ä»ã®ã¡ãœãã㯠{{HTTPMethod("GET")}} ã«å€æŽããããããããŸããã<sup><a href="#attr2">[2]</a></sup></td> + <td>ãŠã§ãããŒãžã¯äžæž¬ã®çç±ã«ãããäžæçã«å©çšã§ããªãç¶æ
ã§ãã</td> + </tr> + <tr> + <th scope="row"><code>303</code></th> + <td><code>See Other</code></td> + <td>{{HTTPMethod("GET")}} ã¡ãœããã¯å€æŽããŸããã<br> + ä»ã®ã¡ãœãã㯠<code>GET</code> ã«<em>å€æŽããŸã</em> (æ¬æã¯å€±ãããŸã)ã</td> + <td>ããŒãžã®åèªã¿èŸŒã¿ã«ãã£ãŠæäœãå床å®æœãããããšãé²ãããã«ã{{HTTPMethod("PUT")}} ã {{HTTPMethod("POST")}} ã®åŸã®ãªãã€ã¬ã¯ãã§äœ¿çšããŸãã</td> + </tr> + <tr> + <th scope="row"><code>307</code></th> + <td><code>Temporary Redirect</code></td> + <td>ã¡ãœãããšæ¬æã¯å€æŽããŸããã</td> + <td>ãŠã§ãããŒãžã¯äžæž¬ã®çç±ã«ãããäžæçã«äœ¿çšã§ããªãç¶æ
ã§ãããæ€çŽ¢ãšã³ãžã³ã¯èªèº«ã®ãªã³ã¯ãæŽæ°ããŸããã <code>302</code> ãšæ¯èŒããŠããµã€ã㧠<code>GET</code> 以å€ã®æäœã䜿çšã§ããå Žåã«æšå¥šãããŸãã</td> + </tr> + </tbody> +</table> + +<p id="attr2">[2] ä»æ§æžã§ã¯ã¡ãœããã®å€æŽãæå³ããŠããŸããããå®éã¯ã¡ãœãããå€æŽãããŠãŒã¶ãŒãšãŒãžã§ã³ããååšããŸãã<code>GET</code> 以å€ã®ã¡ãœããã䜿çšãããšãã®åäœã®ãããŸããããªããããã«ã {{HTTPStatus("307")}} ãå®çŸ©ãããŸããã</p> + +<h3 id="Special_redirections" name="Special_redirections">ç¹æ®ãªãã€ã¬ã¯ã</h3> + +<p>{{HTTPStatus("304")}} (Not Modified) ã¯ãããŒãžãããŒã«ã«ã«ãã£ãã·ã¥ãã (é³è
åãã) è€è£œãžãªãã€ã¬ã¯ãããŸãããŸã {{HTTPStatus("300")}} (Multiple Choice) ã¯ãæåãªãã€ã¬ã¯ãã§ãããã©ãŠã¶ãŒããŠã§ãããŒãžãšããŠè¡šç€ºããæ¬æã«ã¯äœ¿çšå¯èœãªãªãã€ã¬ã¯ãã®ãªã¹ããããããŠãŒã¶ãŒã¯ã²ãšã€éžæããŠã¯ãªãã¯ããŸãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="row">ã³ãŒã</th> + <th scope="col">ããã¹ã</th> + <th scope="col">äž»ãªäœ¿çšäŸ</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row"><code>300</code></th> + <td><code>Multiple Choice</code></td> + <td>å€ãã¯ãããŸãããæ¬æå
ã® HTML ããŒãžã«éžæè¢ã®äžèŠ§ããããŸãã {{HTTPHeader("Link")}} ããããŒã« <code>rel=alternate</code> ãããå Žåã¯ãæ©æ¢°å¯èªãªéžæè¢ãæäŸããããšãæšå¥šãããŸãã</td> + </tr> + <tr> + <th scope="row"><code>304</code></th> + <td><code>Not Modified</code></td> + <td>åæ€èšŒãããæ¡ä»¶ä»ããªã¯ãšã¹ãã®ããã«éä¿¡ãããŸãããã£ãã·ã¥ãããã¬ã¹ãã³ã¹ããŸã æ°é®®ã§äœ¿çšå¯èœã§ããããšã瀺ããŸãã</td> + </tr> + </tbody> +</table> + +<h2 id="Alternative_way_of_specifying_redirections" name="Alternative_way_of_specifying_redirections">ãªãã€ã¬ã¯ããæå®ãã代æ¿æ段</h2> + +<p>HTTP ãªãã€ã¬ã¯ãã¯ããªãã€ã¬ã¯ããå®çŸ©ããå¯äžã®æ段ã§ã¯ãããŸãããä»ã«ãäºã€ã®æ¹æ³ããããŸãã</p> + +<ol> + <li>{{HTMLElement("meta")}} èŠçŽ ã䜿çšãã HTML ãªãã€ã¬ã¯ã</li> + <li><a href="/ja/docs/Web/API/Document_Object_Model">DOM</a> ã«ãã JavaScript ãªãã€ã¬ã¯ã</li> +</ol> + +<h3 id="HTML_redirections" name="HTML_redirections">HTML ãªãã€ã¬ã¯ã</h3> + +<p>HTTP ãªãã€ã¬ã¯ãã¯ãªãã€ã¬ã¯ããäœæããããã®æè¯ã®æ¹æ³ã§ããããµãŒããŒã®å¶åŸ¡æš©ãæã£ãŠããªãå ŽåããããŸãããã®ãããªå Žåã¯ããã®ããŒãžã® {{HTMLElement("head")}} å
ã« {{htmlattrxref("http-equiv", "meta")}} å±æ§ã« <code>Refresh</code> ãèšå®ãã {{HTMLElement("meta")}} èŠçŽ ãèšè¿°ããŠã¿ãŠãã ãããããŒãžã衚瀺ãããšããã©ãŠã¶ãŒã¯ç€ºãããããŒãžãžç§»åããŸãã</p> + +<pre class="brush: html notranslate"><head> + <meta http-equiv="Refresh" content="0; URL=https://example.com/"> +</head> +</pre> + +<p>{{htmlattrxref("content")}} å±æ§ã¯ãæå®ãã URL ãžãªãã€ã¬ã¯ãããåã«ãã©ãŠã¶ãŒãäœç§åŸ
ã€ã¹ããã瀺ãå€ããå§ãŸããŸããã¢ã¯ã»ã·ããªãã£ãé«ãããããåžžã« <code>0</code> ãèšå®ããŸãããã</p> + +<p>åœç¶ãªãããã®æ¹æ³ã¯ HTML ã§ããåäœãããç»åãªã©ã®ã³ã³ãã³ãã§ã¯äœ¿çšã§ããŸããã</p> + +<h3 id="JavaScript_redirections" name="JavaScript_redirections">JavaScript ãªãã€ã¬ã¯ã</h3> + +<p>JavaScript ã®ãªãã€ã¬ã¯ã㯠{{domxref("window.location")}} ããããã£ã« URL æååãèšå®ããããšã§å®è¡ãããæ°ããªããŒãžãèªã¿èŸŒãŸããŸãã</p> + +<pre class="brush: js notranslate">window.location = "https://example.com/";</pre> + +<p>HTML ãªãã€ã¬ã¯ããšåæ§ã«ãã¹ãŠã®ãªãœãŒã¹ã§ã¯åäœã§ããããŸã JavaScript ãå®è¡ããã¯ã©ã€ã¢ã³ãã§ããåäœããªãããšã¯æããã§ããäžæ¹ãäŸãã°ç¹å®ã®æ¡ä»¶ã«äžèŽããå Žåã«ã®ã¿ãªãã€ã¬ã¯ããè¡ããªã©ãããŸããŸãªå¯èœæ§ããããŸãã</p> + +<h3 id="Order_of_precedence" name="Order_of_precedence">åªå
é äœ</h3> + +<p>ãªãã€ã¬ã¯ããèµ·åããæ¹æ³ã 3 çš®é¡ãããåæã«è€æ°ã®æ¹æ³ãæå®ã§ããŸãããã©ã®ãªãã€ã¬ã¯ããæåã«é©çšãããã®ã§ããããïŒ</p> + +<ol> + <li>HTTP ãªãã€ã¬ã¯ããåžžã«æåã«åäœããŸãã â 転éãããããŒãžããªãå Žåã§ãååšããããã§ãã</li> + <li>HTTP ãªãã€ã¬ã¯ããååšããªããã°ãHTML ãªãã€ã¬ã¯ã ({{HTMLElement("meta")}}) ãåäœããŸãã</li> + <li>JavaScript ãªãã€ã¬ã¯ããæåŸã«ã JavaScript ãæå¹ã§ããã°å®è¡ãããŸãã</li> +</ol> + +<p>å¯èœã§ããã°åžžã« HTTP ãªãã€ã¬ã¯ãã䜿çšããŠã{{HTMLElement("meta")}} ã¯è¿œå ããªãããã«ããŸãããã誰ãã HTTP ãªãã€ã¬ã¯ããå€æŽã㊠HTML ãªãã€ã¬ã¯ããå€æŽãå¿ãããšããªãã€ã¬ã¯ããåäžã§ã¯ãªããªã£ãããç¡éã«ãŒãã«ãªã£ããããã®ä»ã®åé¡ãçºçãããããŸãã</p> + +<h2 id="Use_cases" name="Use_cases">䜿çšäŸ</h2> + +<p>ãªãã€ã¬ã¯ãã®äœ¿çšäŸã¯å€æ°ãããŸãããã©ã®ãªãã€ã¬ã¯ããããã©ãŒãã³ã¹ãžã®åœ±é¿ããããŸãã®ã§ã䜿çšã¯æå°éã«ãšã©ããã¹ãã§ãã</p> + +<h3 id="Domain_aliasing" name="Domain_aliasing">ãã¡ã€ã³ã®å¥å</h3> + +<p>çæ³çãªã®ã¯ãã²ãšã€ã®ãªãœãŒã¹ã«å¯ŸããŠã²ãšã€ã®å ŽæããããŠã²ãšã€ã® URL ãååšããããšã§ãããããããªãœãŒã¹ã«å¥åãèšå®ããçç±ã¯ããã€ããããŸãã</p> + +<dl> + <dt>ãµã€ããžã®å°éæ¹æ³ãæ¡å€§ãããã</dt> + <dd>ããããäºäŸã¯ããµã€ãã <code>www.example.com</code> ãã¡ã€ã³é
äžã«ååšããŠãããšãã<code>example.com</code> ãããã¢ã¯ã»ã¹ã§ããããã«ãããå Žåã§ãããã®å Žåã¯ã<code>example.com</code> ãã <code>www.example.com</code> ãžã®ãªãã€ã¬ã¯ããèšå®ããŸãããŸããäžè¬çã«äœ¿çšãããå矩èªãããã¡ã€ã³åã®æã¡ééãã§é »åºŠãå€ããã®ãæäŸããŠãããã§ãããã</dd> + <dt>å¥ã®ãã¡ã€ã³ã«ç§»åãããã</dt> + <dd>äŸãã°ãäŒç€Ÿåãå€ãã£ãŠããæ¢åã®ãªã³ã¯ãããã¯ããŒã¯ãããæ°ããäŒç€ŸåãèŠã€ããããããã«ãããã§ãããã</dd> + <dt><a href="/ja/docs/Glossary/https">HTTPS</a> ã匷å¶ãããã</dt> + <dd><code>http://</code> çã®ãµã€ããžã®ãªã¯ãšã¹ãã <code>https://</code> çã®ãµã€ãã«ãªãã€ã¬ã¯ãããŸãã</dd> +</dl> + +<h3 id="Keeping_links_alive" name="Keeping_links_alive">ãªã³ã¯ã®åç¶</h3> + +<p>ãŠã§ããµã€ããåæ§ç¯ãããš URL ãå€ãããŸãããµã€ãã®ãªã³ã¯ãæ°ãã URL ã«åãããæŽæ°ããŠããå€éšãªãœãŒã¹ããã®ãªã³ã¯ã§äœ¿çšãããŠãã URL ãå¶åŸ¡ããããšã¯ã§ããŸããã</p> + +<p>å€éšã®ãªã³ã¯ã¯è²ŽéãªãŠãŒã¶ãŒãé£ããŠããŠããããã SEO ã«ã圹ç«ã€ããããªã³ã¯ãå£ãããã¯ãããŸããããã£ãŠãå€ã URL ããæ°ãã URL ãžã®ãªãã€ã¬ã¯ããèšå®ããŸãã</p> + +<div class="note"> +<p>ãã®ææ³ã¯å
éšã®ãªã³ã¯ã«ãæå¹ã§ãããå
éšã®ãªãã€ã¬ã¯ãã¯é¿ããããã«ããŠãã ããããªãã€ã¬ã¯ã㯠(è¿œå ã® HTTP ãªã¯ãšã¹ããè¡ããã) æ§èœã®è² æ
ãããªããããŸããå
éšã®ãªã³ã¯ãä¿®æ£ããããšã§ãããé¿ããããã®ã§ããã°ããªã³ã¯ãä¿®æ£ããŠãã ããã</p> +</div> + +<h3 id="Temporary_responses_to_unsafe_requests" name="Temporary_responses_to_unsafe_requests">å®å
šã§ãªããªã¯ãšã¹ããžã®äžæçãªã¬ã¹ãã³ã¹</h3> + +<p>{{Glossary("safe", "å®å
šã§ãªã")}}ãªã¯ãšã¹ãã¯ãµãŒããŒã®ç¶æ
ãå€æŽãããã®ã§ããããŠãŒã¶ãŒããã£ããåå®è¡ããã¹ãã§ã¯ãããŸããã</p> + +<p>äžè¬çã«ããŠãŒã¶ãŒã¯ {{HTTPMethod("PUT")}}ã{{HTTPMethod("POST")}}ã{{HTTPMethod("DELETE")}} ã®ãªã¯ãšã¹ããåéä¿¡ããããšã¯æã¿ãŸããããªã¯ãšã¹ãã®çµæãšããŠã¬ã¹ãã³ã¹ãè¿ãã ãã§ããå Žåã¯ãåã«åèªã¿èŸŒã¿ãã¿ã³ãæŒãããšã§ (ãããã確èªã¡ãã»ãŒãžã®åŸã«)ããªã¯ãšã¹ããåéä¿¡ããŸãã</p> + +<p>ãã®å ŽåããµãŒããŒã¯æ£ããæ
å ±ãæ〠{{HTTPStatus("303")}} (See Other) ã¬ã¹ãã³ã¹ãè¿ãããšãã§ããŸããäžæ¹ãåèªã¿èŸŒã¿ãã¿ã³ãæŒãããå Žåã¯ããŒãžãå衚瀺ããã ãã§ãããå®å
šã§ãªããªã¯ãšã¹ããåå®è¡ããŸããã</p> + +<h3 id="Temporary_responses_to_long_requests" name="Temporary_responses_to_long_requests">é·ããªã¯ãšã¹ãã«å¯Ÿããäžæçãªã¬ã¹ãã³ã¹</h3> + +<p>{{HTTPHeader("DELETE")}} ãªã¯ãšã¹ããåŸã§åŠçããããã«äºå®ãããªã©ããªã¯ãšã¹ãã«ãã£ãŠã¯ãµãŒããŒåŽã§é·ãæéãå¿
èŠã«ãªãå ŽåããããŸãããã®å Žåãã¬ã¹ãã³ã¹ã {{HTTPStatus("303")}} (See Other) ãšããŠæäœãå®è¡äºå®ã«è¿œå ãããããšã瀺ãããŒãžã«ãªã³ã¯ããæçµçã«é²æã確èªãããããã£ã³ã»ã«ã§ããããã«ãããããããã«ããŸãã</p> + +<h2 id="Configuring_redirects_in_common_servers" name="Configuring_redirects_in_common_servers">äžè¬çãªãµãŒããŒã«ããããªãã€ã¬ã¯ãã®èšå®</h2> + +<h3 id="Apache" name="Apache">Apache</h3> + +<p>ãªãã€ã¬ã¯ãã¯ãµãŒããŒã®èšå®ãã¡ã€ã«ããåãã£ã¬ã¯ããªã® <code>.htaccess</code> ã§èšå®ã§ããŸãã</p> + +<p><code><a href="https://httpd.apache.org/docs/current/mod/mod_alias.html">mod_alias</a></code> ã¢ãžã¥ãŒã«ã«ã (æ¢å®ã§) {{HTTPStatus("302")}} ã¬ã¹ãã³ã¹ãèšå®ããããã® <code>Redirect</code> ããã³ <code>RedirectMatch</code> ãã£ã¬ã¯ãã£ãããããŸãã</p> + +<pre class="notranslate"><VirtualHost *:443> + ServerName example.com + Redirect / https://www.example.com +</VirtualHost> +</pre> + +<p>URL <code>https://example.com/</code> 㯠<code>https://www.example.com/</code> ã«ãªãã€ã¬ã¯ãããããã®äžã®ãã¡ã€ã«ããã£ã¬ã¯ããªãåæ§ã§ã (<code>https://example.com/some-page</code> 㯠<code>https://www.example.com/some-page</code> ã«ãªãã€ã¬ã¯ããããŸã)ã</p> + +<p><code>RedirectMatch</code> ãåãã§ããã察象㮠URL ã®éåãå®çŸ©ããããã«{{glossary("regular expression", "æ£èŠè¡šçŸ")}}ã䜿çšããŸãã</p> + +<pre class="notranslate">RedirectMatch ^/images/(.*)$ https://images.example.com/$1</pre> + +<p><code>images/</code> ãã©ã«ããŒå
ã®ãã¹ãŠã®ææžããå¥ã®ãã¡ã€ã³ã«ãªãã€ã¬ã¯ããããŸãã</p> + +<p>äžæçãªãªãã€ã¬ã¯ããèšå®ããããªãå Žåã¯ãå¥ã®çš®é¡ã®ãªãã€ã¬ã¯ããèšå®ããããã«è¿œå åŒæ° (䜿çšãã HTTP ã¹ããŒã¿ã¹ã³ãŒããŸã㯠<code>permanent</code> ããŒã¯ãŒã) ã䜿çšã§ããŸãã</p> + +<pre class="notranslate">Redirect permanent / https://www.example.com +# âŠacts the same as: +Redirect 301 / https://www.example.com +</pre> + +<p><code><a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html">mod_rewrite</a></code> ã¢ãžã¥ãŒã«ã§ãªãã€ã¬ã¯ããäœæããããšãã§ããŸãããã¡ãã¯ããã«æè»æ§ããããŸãããè¥å¹²è€éã§ãã</p> + +<h3 id="Nginx" name="Nginx">Nginx</h3> + +<p>Nginx ã§ã¯ããªãã€ã¬ã¯ããããã³ã³ãã³ãçšã® server ãããã¯ãäœæããŸãã</p> + +<pre class="notranslate">server { + listen 80; + server_name example.com; + return 301 $scheme://www.example.com$request_uri; +}</pre> + +<p>ãã£ã¬ã¯ããªãŸãã¯ç¹å®ã®ããŒãžã«ã®ã¿ãªãã€ã¬ã¯ããé©çšããã«ã¯ã<code>rewrite</code> ãã£ã¬ã¯ãã£ãã䜿çšããŸãã</p> + +<pre class="notranslate">rewrite ^/images/(.*)$ https://images.example.com/$1 redirect; +rewrite ^/images/(.*)$ https://images.example.com/$1 permanent; +</pre> + +<h3 id="IIS" name="IIS">IIS</h3> + +<p>IIS ã§ã¯ã<code><a href="https://www.iis.net/configreference/system.webserver/httpredirect"><httpRedirect></a></code> èŠçŽ ã䜿çšããŠãªãã€ã¬ã¯ããèšå®ããŸãã</p> + +<h2 id="Avoiding_redirection_loops" name="Avoiding_redirection_loops">ãªãã€ã¬ã¯ãã«ãŒã</h2> + +<p>è¿œå ã®ãªãã€ã¬ã¯ããããã§ã«éã£ãŠããçµè·¯ããã©ããšãªãã€ã¬ã¯ãã«ãŒããçºçããŸããèšãæãããšçµãããªãã«ãŒããååšããŠãããæçµçã«èŠã€ããããŒãžã¯ãããŸããã</p> + +<p>ã»ãšãã©ã®å Žåã¯ãµãŒããŒã®åé¡ã§ããããµãŒããŒãæ€åºã§ããªãå Žå㯠{{HTTPStatus("500")}} <code>Internal Server Error</code> ãè¿ãã§ãããããµãŒããŒã®èšå®ãå€æŽããçŽåŸã«ãã®ãããªãšã©ãŒãçºçããå Žåã¯ããªãã€ã¬ã¯ãã«ãŒããçºçããŠãããããããŸããã</p> + +<p>æã
ããµãŒããŒããªãã€ã¬ã¯ãã«ãŒããæ€åºããªãããšããããŸããããããã®ãµãŒããŒã§ã¯å
šè²ãææ¡ã§ããªããè€æ°ã®ãµãŒããŒã«ããããªãã€ã¬ã¯ãã«ãŒããããåŸãŸããããã®å Žåã¯ãã©ãŠã¶ãŒãã«ãŒããæ€åºããŠããšã©ãŒã¡ãã»ãŒãžã衚瀺ããã§ããããFirefox ã§ã¯ä»¥äžã®ã¡ãã»ãŒãžã衚瀺ããŸãã</p> + +<blockquote> +<p class="bz_comment_text" id="comment_text_0">ãã®ã¢ãã¬ã¹ãžã®èŠæ±ã«å¯ŸãããµãŒãã®èªå転éèšå®ãã«ãŒãããŠããŸãã</p> +</blockquote> + +<p>Chrome ã§ã¯ä»¥äžã®ããã«è¡šç€ºãããŸãã</p> + +<blockquote> +<p>ãã®ãŠã§ãããŒãžã«ã¯ãªãã€ã¬ã¯ã ã«ãŒããå«ãŸããŠããŸã</p> +</blockquote> + +<p>ã©ã¡ãã®å ŽåãããŠãŒã¶ãŒãã§ããããšã¯ã»ãšãã©ãããŸãã (ãã£ãã·ã¥ã Cookie ã®äžäžèŽãªã©ããŠãŒã¶ãŒåŽã§åé¡ãçºçããŠããå Žåãé€ããŸã)ã</p> + +<p>ãªãã€ã¬ã¯ãã«ãŒãã¯ãŠãŒã¶ãŒäœéšãå®å
šã«æãªããŸãã®ã§ãé¿ããããšãéèŠã§ãã</p> diff --git a/files/ja/web/http/resources_and_specifications/index.html b/files/ja/web/http/resources_and_specifications/index.html new file mode 100644 index 0000000000..306f203628 --- /dev/null +++ b/files/ja/web/http/resources_and_specifications/index.html @@ -0,0 +1,268 @@ +--- +title: HTTP ã®ãªãœãŒã¹ãšä»æ§æž +slug: Web/HTTP/Resources_and_specifications +tags: + - Guide + - HTTP +translation_of: Web/HTTP/Resources_and_specifications +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ãæåã«èŠå®ãããã®ã¯ 1990 幎代åé ã®ããšã§ããæ¡åŒµæ§ã念é ã«çœ®ããŠèšèšãããŠããŸãããäœå¹Žã«ãããã£ãŠäœåºŠãè¿œå ãããŠããŸããããã®ããããã®ä»æ§ã¯å€ãã®ä»æ§æžã«æ£åšããŠããŸã (å®éšçã«æŸæ£ãããæ¡åŒµã®äžã«åãããŠããŸã)ããã®ããŒãžã§ã¯ãHTTP ã«é¢é£ãããªãœãŒã¹ããªã¹ãã¢ããããŠããŸãã</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">è¡šé¡</th> + <th scope="col">ç¶æ
</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{rfc(7230)}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(7231)}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(7232)}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(7233)}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(7234)}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Caching</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(5861)}}</td> + <td>HTTP Cache-Control Extensions for Stale Content</td> + <td>æ
å ±æäŸ</td> + </tr> + <tr> + <td>{{rfc(8246)}}</td> + <td>HTTP Immutable Responses</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(7235)}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Authentication</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(6265)}}</td> + <td>HTTP State Management Mechanism<br> + <em>Defines Cookies</em></td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td><a href="https://tools.ietf.org/html/draft-ietf-httpbis-cookie-prefixes-00">èçš¿ä»æ§</a></td> + <td>Cookie Prefixes</td> + <td>IETF èçš¿</td> + </tr> + <tr> + <td><a href="https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00">èçš¿ä»æ§</a></td> + <td>Same-Site Cookies</td> + <td>IETF èçš¿</td> + </tr> + <tr> + <td><a href="https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01">èçš¿ä»æ§</a></td> + <td>Deprecate modification of 'secure' cookies from non-secure origins</td> + <td>IETF èçš¿</td> + </tr> + <tr> + <td>{{rfc(2145)}}</td> + <td>Use and Interpretation of HTTP Version Numbers</td> + <td>æ
å ±æäŸ</td> + </tr> + <tr> + <td>{{rfc(6585)}}</td> + <td>Additional HTTP Status Codes</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(7538)}}</td> + <td>The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(7725)}}</td> + <td>An HTTP Status Code to Report Legal Obstacles</td> + <td>æšæºåéçš</td> + </tr> + <tr> + <td>{{rfc(2397)}}</td> + <td>The "data" URL scheme</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(3986)}}</td> + <td>Uniform Resource Identifier (URI): Generic Syntax</td> + <td>ã€ã³ã¿ãŒãããæšæº</td> + </tr> + <tr> + <td>{{rfc(5988)}}</td> + <td>Web Linking<br> + <em>Defines the {{HTTPHeader("Link")}} header</em></td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td><a href="https://tools.ietf.org/id/draft-thomson-hybi-http-timeout-01.html">å®éšçä»æ§</a></td> + <td>Hypertext Transfer Protocol (HTTP) Keep-Alive Header</td> + <td>æ
å ±æäŸ (æå¹æéåã)</td> + </tr> + <tr> + <td><a href="http://httpwg.org/http-extensions/client-hints.html">èçš¿ä»æ§</a></td> + <td>HTTP Client Hints</td> + <td>IETF èçš¿</td> + </tr> + <tr> + <td>{{rfc(7578)}}</td> + <td>Returning Values from Forms: multipart/form-data</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(6266)}}</td> + <td>Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(2183)}}</td> + <td>Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field<br> + <em>{{HTTPHeader("Content-Disposition")}} ããããŒã®æ§æã®ãµãã»ããã®ã¿ã HTTP ã¡ãã»ãŒãžã®ã³ã³ããã¹ãã§å©çšã§ããŸãã</em></td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(7239)}}</td> + <td>Forwarded HTTP Extension</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(6455)}}</td> + <td>The WebSocket Protocol</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(5246)}}</td> + <td>The Transport Layer Security (TLS) Protocol Version 1.2<br> + <em>ãã®ä»æ§ã¯åŸç¶ã® RFC ã«ãã£ãŠä¿®æ£ãããŠããŸããããããã®ä¿®æ£ã¯ HTTP ãããã³ã«ã«åœ±é¿ãäžããŠããŸããã</em></td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(8446)}}</td> + <td>The Transport Layer Security (TLS) Protocol Version 1.3<br> + <em>TLS 1.2 ã眮ãæã</em></td> + <td>IETF èçš¿</td> + </tr> + <tr> + <td>{{rfc(2817)}}</td> + <td>Upgrading to TLS Within HTTP/1.1</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(7540)}}</td> + <td>Hypertext Transfer Protocol Version 2 (HTTP/2)</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(7541)}}</td> + <td>HPACK: Header Compression for HTTP/2</td> + <td>æšæºåéçš</td> + </tr> + <tr> + <td>{{rfc(7838)}}</td> + <td>HTTP Alternative Services</td> + <td>æšæºåéçš</td> + </tr> + <tr> + <td>{{rfc(7301)}}</td> + <td>Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension<br> + <em>äœåãªãªã¯ãšã¹ã/ã¬ã¹ãã³ã¹ã®ã©ãŠã³ãããªãããç¯çŽããããã«ããã©ã³ã¹ããŒã㧠HTTP/2 ãããŽã·ãšãŒãããããã«äœ¿çšãããŸãã</em></td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(6454)}}</td> + <td>The Web Origin Concept</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{SpecName('Fetch', '#cors-protocol', 'CORS')}}</td> + <td>Cross-Origin Resource Sharing</td> + <td>{{Spec2("Fetch")}}</td> + </tr> + <tr> + <td>{{rfc(7034)}}</td> + <td>HTTP Header Field X-Frame-Options</td> + <td>æ
å ±æäŸ</td> + </tr> + <tr> + <td>{{rfc(6797)}}</td> + <td>HTTP Strict Transport Security (HSTS)</td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{SpecName("Upgrade Insecure Requests")}}</td> + <td>Upgrade Insecure Requests</td> + <td>{{Spec2("Upgrade Insecure Requests")}}</td> + </tr> + <tr> + <td>{{SpecName("CSP 1.0")}}</td> + <td>Content Security Policy 1.0<br> + <em>CSP 1.1 ããã³ CSP 3.0 㯠HTTP æšæºãæ¡åŒµãããã®ã§ã¯ãããŸãã</em></td> + <td>{{Spec2("CSP 1.0")}}</td> + </tr> + <tr> + <td><a href="https://msdn.microsoft.com/en-us/library/jj676915(v=vs.85).aspx">ãã€ã¯ããœããæç« </a></td> + <td>Specifying legacy document modes*<br> + <em>X-UA-Compatible ã®å®çŸ©</em></td> + <td>Note</td> + </tr> + <tr> + <td>{{rfc(5689)}}</td> + <td>HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)<br> + <em>ãããã®ãŠã§ãã®æ¡åŒµæ©èœã¯ã CardDAV ã CalDAV ãšåæ§ããŠã§ãäžã® HTTP ã®å¯Ÿè±¡å€ã§ããæè¿ã®ã¢ããªã±ãŒã·ã§ã³ã® API ã¯ã RESTful ãã¿ãŒã³ã䜿ã£ãŠå®çŸ©ãããŠããŸãã</em></td> + <td>æšæºåãžã®æå±</td> + </tr> + <tr> + <td>{{rfc(2324)}}</td> + <td>Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)</td> + <td>ãšã€ããªã«ããŒã«åè«ä»æ§</td> + </tr> + <tr> + <td>{{rfc(7168)}}</td> + <td>The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)</td> + <td>ãšã€ããªã«ããŒã«åè«ä»æ§</td> + </tr> + <tr> + <td>{{SpecName("HTML WHATWG")}}</td> + <td>HTML<br> + <em>Server-Sent Event ã®ããã® HTTP æ¡åŒµãå®çŸ©</em></td> + <td>{{Spec2("HTML WHATWG")}}</td> + </tr> + <tr> + <td><a href="https://www.w3.org/2011/tracking-protection/drafts/tracking-dnt.html">Tracking Preference Expression</a></td> + <td>DNT header</td> + <td>ç·šéè
èçš¿ / å§ååè£</td> + </tr> + <tr> + <td><a href="http://wicg.github.io/reporting/">Reporting API</a></td> + <td><code>Report-To</code> header</td> + <td>èçš¿</td> + </tr> + <tr> + <td><a href="https://tools.ietf.org/html/draft-ietf-httpbis-expect-ct-01">èçš¿ä»æ§</a></td> + <td>Expect-CT Extension for HTTP</td> + <td>IETF èçš¿</td> + </tr> + </tbody> +</table> diff --git a/files/ja/web/http/resources_and_uris/index.html b/files/ja/web/http/resources_and_uris/index.html new file mode 100644 index 0000000000..52c517dbea --- /dev/null +++ b/files/ja/web/http/resources_and_uris/index.html @@ -0,0 +1,31 @@ +--- +title: ãªãœãŒã¹ãš URI +slug: Web/HTTP/Resources_and_URIs +tags: + - HTTP + - MIME + - MIME ã¿ã€ã + - URI + - URL + - ãªãœãŒã¹ + - æŠèŠ +translation_of: Web/HTTP/Resources_and_URIs +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã«ããããã©ãŠã¶ãŒããã®ä»ã®{{Glossary("user agent", "ãŠãŒã¶ãŒãšãŒãžã§ã³ã")}}ã¯ãã€ã³ã¿ãŒãããäžã®æ§ã
ãª<em>ãªãœãŒã¹</em>ãšéä¿¡ããããšãã§ããŸãããã®ããã«ããã©ãŠã¶ãŒã¯ãªãœãŒã¹ã®<em>èå¥</em>åã³<em>å Žæ</em>ã®äž¡æ¹ãå¿
èŠã§ãããããäºã€ã®æ
å ±ã {{glossary("URI")}} ã«ãã£ãŠèšè¿°ãããŸãã</p> + +<dl> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web">ãŠã§ãäžã®ãªãœãŒã¹ã®èå¥</a></dt> + <dd>URI åã³ãŠã§ãäžã®ãªãœãŒã¹ãžã®ã¢ã¯ã»ã¹æ¹æ³ã§ãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Data_URIs">ããŒã¿ URI</a></dt> + <dd>ç¹å®ã®çš®é¡ã® URI ã§ãããèå¥åã®äžã«ãªãœãŒã¹èªäœãåã蟌ãã ããŒã¿ URI ã§ãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs">www åã³ www 以å€ã® URL ã®éžæ</a></dt> + <dd>www ã®æ¥é èŸãä»ãããã¡ã€ã³ã䜿çšãããã©ããã®ã¢ããã€ã¹ã§ããã®èšäºã§ã¯éžæã®çµæãã©ããªãããšãã©ããããã説æããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME ã¿ã€ã</a></dt> + <dd>MIME ã¡ãã£ã¢ã¿ã€ãã¯ãç¹å®ã®ãªãœãŒã¹ãã©ã®çš®é¡ã®ææžã§ããããå®çŸ©ããŸãããã®èšäºã¯æ§æãšããŠã§ãã§ãã䜿ããã MIME ã¿ã€ãã玹ä»ããŸãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types">MIME ã¿ã€ãã®å®å
šãªäžèŠ§</a></dt> + <dd>ãŠã§ãéçºè
ã«äŸ¿å©ãª MIME ã¿ã€ãã®å
æ¬çãªäžèŠ§ã§ãã</dd> + <dt><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Separating_identity_and_location_of_a_resource">ãªãœãŒã¹ã®èå¥åãšäœçœ®ã®åé¢: Alt-Svc ããããŒ</a></dt> + <dd> èå¥åãšäœçœ®ã®äž¡æ¹ã {{Glossary("URL")}} ã§èšè¿°ãããŠããŠãã2ã€ã¯ç°ãªãæŠå¿µã§ãããæã«ã¯åºå¥ããã»ãã䟿å©ã§ãããã®èšäºã§ã¯ {{HTTPHeader("Alt-Svc")}} ããããŒã玹ä»ããŸãã</dd> +</dl> diff --git a/files/ja/web/http/session/index.html b/files/ja/web/http/session/index.html new file mode 100644 index 0000000000..20d9fc024e --- /dev/null +++ b/files/ja/web/http/session/index.html @@ -0,0 +1,160 @@ +--- +title: å
žåç㪠HTTP ã»ãã·ã§ã³ +slug: Web/HTTP/Session +tags: + - HTTP +translation_of: Web/HTTP/Session +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã®ãããªã¯ã©ã€ã¢ã³ããµãŒããŒãããã³ã«ã§ã¯ãã»ãã·ã§ã³ã 3 ã€ã®æ®µéã§æ§æãããŸãã</p> + +<ol> + <li>ã¯ã©ã€ã¢ã³ã㯠TCP ã³ãã¯ã·ã§ã³ (ãã©ã³ã¹ããŒãå±€ã TCP ã§ã¯ãªãå Žåã¯ãä»ã®é©åãªã³ãã¯ã·ã§ã³) ã確ç«ããŸãã</li> + <li>ã¯ã©ã€ã¢ã³ãã¯èŠæ±ãéããåçãåŸ
ã¡ãŸãã</li> + <li>ãµãŒãã¯èŠæ±ãåŠçããŠãã¹ããŒã¿ã¹ã³ãŒããé©åãªããŒã¿ãæäŸããåçãè¿ä¿¡ããŸãã</li> +</ol> + +<p>HTTP/1.1 ã§ã¯ç¬¬ 3 段éã®åŸã«ã³ãã¯ã·ã§ã³ã¯éããããªããªããã¯ã©ã€ã¢ã³ãã¯ããã«èŠæ±ãçºè¡ããããšãã§ããŸããã€ãŸãã第 2 段éãšç¬¬ 3 段éãè€æ°åè¡ãããšãã§ããŸãã</p> + +<h2 id="Establishing_a_connection" name="Establishing_a_connection">ã³ãã¯ã·ã§ã³ã®ç¢ºç«</h2> + +<p>ã¯ã©ã€ã¢ã³ããµãŒããŒãããã³ã«ã§ã¯ãã¯ã©ã€ã¢ã³ããã³ãã¯ã·ã§ã³ã確ç«ããŸããHTTP ã®ã³ãã¯ã·ã§ã³ãéããšã¯ãäžå±€ã®ãã©ã³ã¹ããŒãå±€ã®ã³ãã¯ã·ã§ã³ã確ç«ããããšã§ãããããã¯éåžž TCP ã§ãã</p> + +<p>ã³ã³ãã¥ãŒã¿ãŒäžã® HTTP ãµãŒããŒçšã®ã TCP ã®æ¢å®ã®ããŒã㯠80 çªã§ãã8000 çªã 8080 çªãªã©ãã»ãã®ããŒãã䜿çšããããšãã§ããŸããèªã¿èŸŒãããŒãžã® URL ã¯ãã¡ã€ã³åãšããŒãçªå·ã®äž¡æ¹ãå«ã¿ãŸãããåŸè
㯠80 çªã§ããå Žåã«çç¥ã§ããŸãã詳ãã㯠<a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web">Identifying resources on the Web</a> ãã芧ãã ããã</p> + +<div class="note"><strong>ã¡ã¢:</strong> ã¯ã©ã€ã¢ã³ããµãŒããŒã¢ãã«ã§ã¯ãæ瀺çãªèŠæ±ãªããµãŒããŒãã¯ã©ã€ã¢ã³ãã«ããŒã¿ãéä¿¡ããããšãèªããŠããŸããããã®åé¡ãåé¿ããããã«ããŠã§ãéçºè
ã¯ããã€ãã®æè¡ã䜿çšããŠããŸãã {{domxref("XMLHTTPRequest")}} ã {{domxref("Fetch")}} API ã§å®æçã«ãµãŒããŒã« ping ãéã£ããã <a href="/ja/docs/WebSockets">WebSockets API</a> ãåæ§ã®ãããã³ã«ã䜿çšãããããŸãã</div> + +<h2 id="Sending_a_client_request" name="Sending_a_client_request">ã¯ã©ã€ã¢ã³ãã®èŠæ±ã®éä¿¡</h2> + +<p>ã³ãã¯ã·ã§ã³ã確ç«ãããšããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯èŠæ±ãéä¿¡ã§ããŸã (ãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯äžè¬çã«ãŠã§ããã©ãŠã¶ãŒã§ãããã»ãã«ãã¯ããŒã©ãŒãªã©ããããŸã)ãã¯ã©ã€ã¢ã³ãã®èŠæ±ã¯ CRLF (ãã£ãªããžãªã¿ãŒã³ã«ç¶ããŠã©ã€ã³ãã£ãŒã) ã§åºåãããããã¹ãã®ãã£ã¬ã¯ãã£ãã§æ§æããã3 ã€ã®ãããã¯ã«åããããŸãã</p> + +<ol> + <li>æåã®è¡ã¯ãèŠæ±ã¡ãœããã®åŸã«æ¬¡ã®åŒæ°ãç¶ããŸãã + <ul> + <li>ææžã®ãã¹ãããªãã¡çµ¶å¯Ÿ URL ãããããã³ã«åãšãã¡ã€ã³åãé€ãããã®ã§ãã</li> + <li>HTTP ãããã³ã«ã®ããŒãžã§ã³ã</li> + </ul> + </li> + <li>åŸç¶ã®è¡ã¯ HTTP ããããŒã§ããããµãŒããŒã«å¯ŸããŠã©ã®çš®é¡ (äŸãã°ãèšèªã MIME ã¿ã€ã) ã®ããŒã¿ãé©åãã瀺ãæ
å ±ãããµãŒããŒã®åäœãå€ãã (äŸãã°ããã§ã«ãã£ãã·ã¥ãããŠããå Žåã¯åçãéä¿¡ããªã) ããŒã¿ãäžããŸãããããã® HTTP ããããŒã¯ç©ºè¡ã§çµãããããã¯ãæ§æããŸãã</li> + <li>æåŸã®ãããã¯ã¯çç¥å¯èœãªããŒã¿ãããã¯ã§ã䞻㫠POST ã¡ãœããã§äœ¿çšãããè¿œå ã®ããŒã¿ãå«ã¿ãŸãã</li> +</ol> + +<h3 id="Example_requests" name="Example_requests">èŠæ±ã®äŸ</h3> + +<p>developer.mozilla.org ã®ã«ãŒãããŒãžãããªãã¡ <a class="linkification-ext external" href="/" title="Linkification: http://developer.mozilla.org/">http://developer.mozilla.org/</a> ãèªã¿èŸŒãããŸãå¯èœã§ããã°ãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãã©ã³ã¹èªã®ããŒãžãåžæããããšããµãŒãã«äŒããŸã:</p> + +<pre>GET / HTTP/1.1 +Host: developer.mozilla.org +Accept-Language: fr + +</pre> + +<p>ããããŒãããã¯ãšããŒã¿ãããã¯ãåããŠãããæåŸã®ç©ºè¡ã«æ³šæããŠãã ããããã®äŸã¯ HTTP ããããŒã« <code>Content-Length</code> ããããŸããã®ã§ã空ã®ããŒã¿ãããã¯ãäžããããŠããããŒã®çµããã瀺ããŠããããµãŒããŒã¯ãã®ç©ºè¡ãåãåããšãã ã¡ã«èŠæ±ãåŠçã§ããŸãã</p> + +<p>ãã©ãŒã ã®å
¥åçµæãéä¿¡ããäŸã§ãã</p> + +<pre>POST /contact_form.php HTTP/1.1 +Host: developer.mozilla.org +Content-Length: 64 +Content-Type: application/x-www-form-urlencoded + +name=Joe%20User&request=Send%20me%20one%20of%20your%20catalogue +</pre> + +<h3 id="Request_methods" name="Request_methods">èŠæ±ã¡ãœãã</h3> + +<p>HTTP ã§ã¯ããªãœãŒã¹ã«å¯ŸããŠå®è¡ãããã¢ã¯ã·ã§ã³ã瀺ã<a href="/ja/docs/Web/HTTP/Methods">èŠæ±ã¡ãœãã</a>ã®ã»ãããå®çŸ©ããŠããŸããèŠæ±ã¡ãœããã«ã¯åè©ãååšããŸããã HTTP åè©ãšèšãããããšããããŸãã <code>GET</code> ãš <code>POST</code> ãæãäžè¬çã§ãã</p> + +<ul> + <li>{{HTTPMethod("GET")}} ã¡ãœããã¯ãæå®ãããªãœãŒã¹ã®ããŒã¿ãèŠæ±ããŸãã <code>GET</code> ã䜿çšããèŠæ±ã¯ãããŒã¿ã®åã蟌ã¿ã«éããŸãã</li> + <li>{{HTTPMethod("POST")}} ã¡ãœããã¯ãµãŒããŒã«ããŒã¿ãéä¿¡ããŸãã®ã§ãããŒã¿ã®ç¶æ
ãå€æŽã§ããŸããããã¯ã <a href="/ja/docs/Web/Guide/HTML/Forms">HTML ãã©ãŒã </a>çšã«ãã䜿çšãããã¡ãœããã§ãã</li> +</ul> + +<h2 id="Structure_of_a_server_response" name="Structure_of_a_server_response">ãµãŒããŒå¿çã®æ§é </h2> + +<p>æ¥ç¶ãããšãŒãžã§ã³ããèŠæ±ãéä¿¡ãããšããŠã§ããµãŒããŒã¯ãã®èŠæ±ãåŠçããŠãæçµçã«å¿çãè¿ä¿¡ããŸããã¯ã©ã€ã¢ã³ãã®èŠæ±ãšåæ§ã«ãµãŒããŒã®å¿çã¯ããã¹ãã®ãã£ã¬ã¯ãã£ãã§æ§æãããããã㯠CRLF ã§åºåãããŠããã3 ã€ã®ãããã¯ã«åããããŸã:</p> + +<ol> + <li>æåã®è¡ã¯<em>ã¹ããŒã¿ã¹è¡</em>ã§ãåãå
¥ãã HTTP ããŒãžã§ã³ãšã¹ããŒã¿ã¹èŠæ±ã§æ§æãããŸã (ãããŠã人éã«èªããããã¹ãã§æå³ãç°¡åã«ç€ºããŸã)ã</li> + <li>åŸç¶ã®è¡ã¯ããããå
·äœç㪠HTTP ããããŒãè¡šããŠãããã¯ã©ã€ã¢ã³ãã«å¯ŸããŠéä¿¡ããããŒã¿ã«é¢ããæ
å ± (äŸãã°çš®é¡ããµã€ãºãå§çž®æ¹æ³ããã£ãã·ã¥æ
å ±) ãäžããŸããã¯ã©ã€ã¢ã³ãã®èŠæ±ã® HTTP ããããŒãããã¯ãšåæ§ã«ããããã® HTTP ããããŒã空è¡ã§çµãããããã¯ãæ§æããŸãã</li> + <li>æåŸã®ãããã¯ã¯ããŒã¿ãããã¯ã§ãä»»æã®ããŒã¿ãå«ã¿ãŸãã</li> +</ol> + +<h3 id="Example_responses" name="Example_responses">å¿çã®äŸ</h3> + +<p>æåãããŠã§ãããŒãžã®å¿çã§ã:</p> + +<pre>HTTP/1.1 200 OK +Date: Sat, 09 Oct 2010 14:28:02 GMT +Server: Apache +Last-Modified: Tue, 01 Dec 2009 20:18:22 GMT +ETag: "51142bc1-7449-479b075b2891b" +Accept-Ranges: bytes +Content-Length: 29769 +Content-Type: text/html + +<!DOCTYPE html... <strong>(ããã«ãµã€ãºã 29769 ãã€ãã®ãèŠæ±ããããŠã§ãããŒãžã眮ãããŸã)</strong> + +</pre> + +<p>èŠæ±ããããªãœãŒã¹ãæ°žç¶çã«ç§»åãããããšã®éç¥ã§ãã</p> + +<pre>HTTP/1.1 301 Moved Permanently +Server: Apache/2.2.3 (Red Hat) +Content-Type: text/html; charset=iso-8859-1 +Date: Sat, 09 Oct 2010 14:30:24 GMT +Location: <a class="linkification-ext" href="../../../../" title="Linkification: https://developer.mozilla.org/">https://developer.mozilla.org/</a> <strong>(ããã¯ãªãœãŒã¹ã®æ°ãããªã³ã¯ã§ãããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãã¡ããèªã¿èŸŒãã§ããã)</strong> +Keep-Alive: timeout=15, max=98 +Accept-Ranges: bytes +Via: Moz-Cache-zlb05 +Connection: Keep-Alive +X-Cache-Info: caching +X-Cache-Info: caching +Content-Length: 325 <strong>(ãŠãŒã¶ãŒãšãŒãžã§ã³ãããªã³ã¯ããã©ããªãå Žåã«è¡šç€ºãããæ¢å®ã®ããŒãžãå«ãã³ã³ãã³ãã§ã)</strong> + +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> +<html><head> +<title>301 Moved Permanently</title> +</head><body> +<h1>Moved Permanently</h1> +<p>The document has moved <a href="<a class="linkification-ext" href="../../../../" title="Linkification: https://developer.mozilla.org/">https://developer.mozilla.org/</a>">here</a>.</p> +<hr> +<address>Apache/2.2.3 (Red Hat) Server at developer.mozilla.org Port 80</address> +</body></html> + +</pre> + +<p>èŠæ±ããããªãœãŒã¹ãååšããªãããšã®éç¥ã§ãã</p> + +<pre>HTTP/1.1 404 Not Found +Date: Sat, 09 Oct 2010 14:33:02 GMT +Server: Apache +Last-Modified: Tue, 01 May 2007 14:24:39 GMT +ETag: "499fd34e-29ec-42f695ca96761;48fe7523cfcc1" +Accept-Ranges: bytes +Content-Length: 10732 +Content-Type: text/html + +<!DOCTYPE html... <strong>(æ¬ ããŠãããªãœãŒã¹ããŠãŒã¶ãèŠã€ããããšãæ¯æŽããããµã€ãæ¯ã«ã«ã¹ã¿ãã€ãºãããããŒãžãå«ã¿ãŸã)</strong> + +</pre> + +<h3 id="Response_status_codes" name="Response_status_codes">å¿çã¹ããŒã¿ã¹ã³ãŒã</h3> + +<p><a href="/ja/docs/Web/HTTP/Status">HTTP å¿çã¹ããŒã¿ã¹ã³ãŒã</a> ã¯ãç¹å®ã® HTTP èŠæ±ãæ£åžžã«å®äºãããã瀺ããŸããå¿çã¯æ
å ±å¿çãæåå¿çããªãã€ã¬ã¯ã·ã§ã³ãã¯ã©ã€ã¢ã³ããšã©ãŒããµãŒããŒãšã©ãŒã® 5 ã€ã®ã¯ã©ã¹ã«åé¡ãããŸãã</p> + +<ul> + <li>{{HTTPStatus(200)}}: OK. èŠæ±ã¯æåããŸããã</li> + <li>{{HTTPStatus(301)}}: Moved Permanently. ãã®å¿çã³ãŒãã¯ãèŠæ±ãããªãœãŒã¹ã® URI ãå€æŽãããããšãè¡šããŸãã</li> + <li>{{HTTPStatus(404)}}: Not Found. ãµãŒããŒã¯ãèŠæ±ããããªãœãŒã¹ãèŠã€ããããšãã§ããŸããã</li> +</ul> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web">ãŠã§ãäžã®ãªãœãŒã¹ã®èå¥</a></li> + <li><a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a></li> + <li><a href="/ja/docs/Web/HTTP/Methods">HTTP èŠæ±ã¡ãœãã</a></li> + <li><a href="/ja/docs/Web/HTTP/Status">HTTP å¿çã¹ããŒã¿ã¹ã³ãŒã</a></li> +</ul> diff --git a/files/ja/web/http/status/100/index.html b/files/ja/web/http/status/100/index.html new file mode 100644 index 0000000000..b4c3fcf98c --- /dev/null +++ b/files/ja/web/http/status/100/index.html @@ -0,0 +1,46 @@ +--- +title: 100 Continue +slug: Web/HTTP/Status/100 +tags: + - HTTP + - Informational + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/100 +--- +<p>{{HTTPSidebar}}</p> + +<p>HTTP <strong><code>100 Continue</code></strong> æ
å ±ã¹ããŒã¿ã¹ã¬ã¹ãã³ã¹ã³ãŒãã¯ããããŸã§ã®ãã¹ãŠã OK ã§ãããã¯ã©ã€ã¢ã³ããèŠæ±ãç¶è¡ãããããŸãã¯èŠæ±ããã§ã«çµäºããŠããå Žåã¯ç¡èŠããããšã瀺ããŸãã<br> + <br> + ãµãŒããŒãèŠæ±ã®ããããŒããã§ãã¯ããããã«ããã«ã¯ãã¯ã©ã€ã¢ã³ãã¯æåã®èŠæ±ã§ããããŒãšããŠ{{HTTPHeader("Expect")}}<code>: 100-continue</code> ãéä¿¡ããæ¬æãéä¿¡ããåã«ã¬ã¹ãã³ã¹ãšã㊠<code>100 Continue</code> ã¹ããŒã¿ã¹ã³ãŒããåãåããŸãã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">100 Continue</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "100 Continue" , "6.2.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®å®è£
ç¶æ³">ãã©ãŠã¶ã®å®è£
ç¶æ³</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.100")}}</p> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Expect")}}</li> + <li>{{HTTPStatus(417)}}</li> +</ul> diff --git a/files/ja/web/http/status/101/index.html b/files/ja/web/http/status/101/index.html new file mode 100644 index 0000000000..17f8a39d5a --- /dev/null +++ b/files/ja/web/http/status/101/index.html @@ -0,0 +1,54 @@ +--- +title: 101 Switching Protocols +slug: Web/HTTP/Status/101 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - WebSocket + - ãªãã¡ã¬ã³ã¹ + - æ
å ± +translation_of: Web/HTTP/Status/101 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <code><strong>101 Switching Protocols</strong></code> ã¬ã¹ãã³ã¹ã³ãŒãã¯ã {{HTTPHeader("Upgrade")}} ãªã¯ãšã¹ãããããŒãå«ãã¡ãã»ãŒãžãéãããã¯ã©ã€ã¢ã³ããèŠæ±ããéã«ããµãŒããŒãåãæ¿ããããšããŠãããããã³ã«ã瀺ããŸãã</p> + +<p>ãµãŒããŒã¯ãã®ã¬ã¹ãã³ã¹ã« {{HTTPHeader("Upgrade")}} ã¬ã¹ãã³ã¹ããããŒãå«ããŠãåãæ¿ãå
ã®ãããã³ã«ã瀺ããŸããæé ã¯<a href="/ja/docs/Web/HTTP/Protocol_upgrade_mechanism">ãããã³ã«æŽæ°ã¡ã«ããºã </a>ã®èšäºã§è©³çŽ°ã«èª¬æããŠããŸãã</p> + +<h2 id="Status" name="Status">ç¶æ
</h2> + +<pre class="syntaxbox">101 Switching Protocols</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>åãæ¿ãããããã³ã«ã§ <a href="/ja/docs/Web/API/WebSockets_API">WebSockets</a> ã䜿çšãããå Žåã§ãã</p> + +<pre>HTTP/1.1 101 Switching Protocols +Upgrade: websocket +Connection: Upgrade</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "101 Switching Protocol" , "6.2.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1):ã»ãã³ãã£ã¯ã¹ãšã³ã³ãã³ã</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Protocol_upgrade_mechanism">ãããã³ã«æŽæ°ã¡ã«ããºã </a></li> + <li><a href="/ja/docs/Web/API/WebSockets_API">WebSocket</a></li> + <li>{{HTTPHeader("Upgrade")}}</li> + <li>{{HTTPStatus("426")}} <code>Upgrade Required</code></li> +</ul> diff --git a/files/ja/web/http/status/103/index.html b/files/ja/web/http/status/103/index.html new file mode 100644 index 0000000000..288e428c3d --- /dev/null +++ b/files/ja/web/http/status/103/index.html @@ -0,0 +1,50 @@ +--- +title: 103 Early Hints +slug: Web/HTTP/Status/103 +tags: + - Draft + - HTTP + - Informational + - NeedsCompatTable + - NeedsContent + - Status code +translation_of: Web/HTTP/Status/103 +--- +<p>{{HTTPSidebar}}{{Draft}}</p> + +<p>HTTP <strong><code>103 Early Hints</code></strong> ã€ã³ãã©ã¡ãŒã·ã§ã³ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ã䞻㫠{{HTTPHeader("Link")}} ããããŒãšå
±ã«äœ¿çšããããµãŒããŒããŸã ã¬ã¹ãã³ã¹ãæºåããŠããéã«ãŠãŒã¶ãŒãšãŒãžã§ã³ãããªãœãŒã¹ã®ããªããŒããéå§ã§ããããã«ããããšãç®çãšããŠããŸãã</p> + +<h2 id="Syntax" name="Syntax">æ§æ</h2> + +<pre class="syntaxbox">103 Early Hints</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¹ããŒã¿ã¹</th> + <th scope="col">ã³ã¡ã³ã</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC(8297, "103 Early Hints")}}</td> + <td><span class="spec-RFC">IETF RFC</span></td> + <td>åæå®çŸ©</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ãŒã®å®è£
ç¶æ³">ãã©ãŠã¶ãŒã®å®è£
ç¶æ³</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§ããŒãã«ã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ããŠããã«ãªã¯ãšã¹ããéã£ãŠãã ããã</div> + +<p>{{Compat("http.status.103")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Link")}}</li> +</ul> diff --git a/files/ja/web/http/status/200/index.html b/files/ja/web/http/status/200/index.html new file mode 100644 index 0000000000..c11c164097 --- /dev/null +++ b/files/ja/web/http/status/200/index.html @@ -0,0 +1,54 @@ +--- +title: 200 OK +slug: Web/HTTP/Status/200 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - æå +translation_of: Web/HTTP/Status/200 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP <strong><code>200 OK</code></strong> ã¯ãªã¯ãšã¹ããæåããå Žåã«è¿ãã¬ã¹ãã³ã¹ã³ãŒãã200ã®ã¬ã¹ãã³ã¹ã¯ããã©ã«ãã§ãã£ãã·ã¥ããŠããã</p> + +<p>æåãããšããæå³ã¯ãªã¯ãšã¹ãã®ã¡ãœããã«ãã£ãŠç°ãªã:</p> + +<ul> + <li>{{HTTPMethod("GET")}}: ãªãœãŒã¹ããã§ããããã¡ãã»ãŒãžã®ããã£éšã§è¿éãããã</li> + <li>{{HTTPMethod("HEAD")}}: ãšã³ãã£ãã£ããããããã£éšã§è¿éãããã</li> + <li>{{HTTPMethod("POST")}}: å®è¡ãããçµæãèšèŒããããªãœãŒã¹ãããã£éšã§è¿éãããã</li> + <li>{{HTTPMethod("TRACE")}}: ã¡ãã»ãŒãžã®ããã£éšã«ãµãŒããŒã§åä¿¡ãããªã¯ãšã¹ãã¡ãã»ãŒãžãå«ãã§ããã</li> +</ul> + +<p>{{HTTPMethod("PUT")}} ã {{HTTPMethod("DELETE")}} ã®æåçµæã¯Â <code>200</code> <code>OK</code> ã§ã¯ãªãã {{HTTPStatus("204")}} <code>No Content</code> (ãããªãœãŒã¹ã®ååã¢ããããŒãã«ããäœæã®å Žåã¯Â {{HTTPStatus("201")}} )ã§ããå Žåãããã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">200 OK</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "200 OK" , "6.3.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ãŒäºææ§">ãã©ãŠã¶ãŒäºææ§</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("http.status.200")}}</p> + +<h2 id="åç
§">åç
§</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Methods">HTTP request methods</a></li> +</ul> diff --git a/files/ja/web/http/status/201/index.html b/files/ja/web/http/status/201/index.html new file mode 100644 index 0000000000..5b8a005712 --- /dev/null +++ b/files/ja/web/http/status/201/index.html @@ -0,0 +1,48 @@ +--- +title: 201 Created +slug: Web/HTTP/Status/201 +tags: + - HTTP + - Reference + - ã¹ããŒã¿ã¹ã³ãŒã + - æå +translation_of: Web/HTTP/Status/201 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>201 Created</code></strong> æåã¹ããŒã¿ã¹ã¬ã¹ãã³ã¹ã³ãŒãã¯ããªã¯ãšã¹ããæåããŠãªãœãŒã¹ã®äœæãå®äºããããšãè¡šããŸããã¬ã¹ãã³ã¹ãè¿ãããåã«ãæ°ããªãªãœãŒã¹ãäœæãããã¬ã¹ãã³ã¹ã¡ãã»ãŒãžã®æ¬æã«ãŠæ°ãããªãœãŒã¹ãè¿ãããŸãããã®äœçœ®ã¯ãªã¯ãšã¹ã URLããŸã㯠{{HTTPHeader("Location")}} ããããŒã®å
容ãšãªããŸãã</p> + +<p>ãã®ã¹ããŒã¿ã¹ã³ãŒãã®äžè¬çãªäœ¿çšäŸã¯ã {{HTTPMethod("PUT")}} ãªã¯ãšã¹ãã®çµæã§ãã</p> + +<h2 id="Status" name="Status">ç¶æ
</h2> + +<pre class="syntaxbox">201 Created</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "201 Created" , "6.3.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.201")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Methods">HTTP ãªã¯ãšã¹ãã¡ãœãã</a></li> +</ul> diff --git a/files/ja/web/http/status/202/index.html b/files/ja/web/http/status/202/index.html new file mode 100644 index 0000000000..f4f6916f78 --- /dev/null +++ b/files/ja/web/http/status/202/index.html @@ -0,0 +1,37 @@ +--- +title: 202 Accepted +slug: Web/HTTP/Status/202 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/202 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP <code><strong>202 Accepted</strong></code> ã¬ã¹ãã³ã¹ã¯ãªã¯ãšã¹ããåãåã£ããåŠçã¯ãããŠããªãããšããããšãè¡šãã¹ããŒã¿ã¹ã³ãŒãã§ããããã¯ã³ããããããŠããªãããªã¯ãšã¹ããåŠçããçµæã瀺ãã¬ã¹ãã³ã¹ããéåæã§éä¿¡ããæ¹æ³ãHTTPã«ååšããªãããšãæå³ããŠããŸããå¥ã®ããã»ã¹ãŸãã¯ãµãŒããŒããªã¯ãšã¹ããåŠçããå ŽåããŸãã¯ãããåŠçã®å Žåãæ³å®ããŠããŸãã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">202 Accepted</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "202 Accepted" , "6.3.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="åç
§">åç
§</h2> + +<ul> + <li>{{HTTPHeader("Accept")}}</li> +</ul> diff --git a/files/ja/web/http/status/203/index.html b/files/ja/web/http/status/203/index.html new file mode 100644 index 0000000000..0198651222 --- /dev/null +++ b/files/ja/web/http/status/203/index.html @@ -0,0 +1,46 @@ +--- +title: 203 Non-Authoritative Information +slug: Web/HTTP/Status/203 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Reference + - Status code + - ã¹ããŒã¿ã¹ã³ãŒã + - æåã¬ã¹ãã³ã¹ +translation_of: Web/HTTP/Status/203 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>203 Non-Authoritative Information</code></strong> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã¯ããªã¯ãšã¹ããæåãããã®ã®ãå€æ{{Glossary("Proxy server", "ãããã·")}}ã«ãã£ãŠå
ã®ãµãŒããŒã®{{HTTPStatus("200")}} (<code>OK</code>) ã¬ã¹ãã³ã¹ãããã€ããŒããå€æŽãããããšãè¡šããŸãã</p> + +<p><code>203</code> ã¬ã¹ãã³ã¹ã¯ <code><a href="/en-US/docs/Web/HTTP/Headers/Warning#Warning_codes">214</a></code> ã®å€ãããªãã¡ <code>Transformation Applied</code> ã® {{HTTPHeader("Warning")}} ããããŒã³ãŒããšäŒŒãŠããŸããããã¡ãã¯ã©ã®ã¹ããŒã¿ã¹ã³ãŒãã®ã¬ã¹ãã³ã¹ã«ãé©çšã§ãããšããå©ç¹ããããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">203 Non-Authoritative Information</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "203 Non-Authoritative Information" , "6.3.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("200")}}</li> + <li>{{Glossary("Proxy server")}}</li> + <li>{{HTTPHeader("Warning")}}</li> +</ul> diff --git a/files/ja/web/http/status/204/index.html b/files/ja/web/http/status/204/index.html new file mode 100644 index 0000000000..eb59749e28 --- /dev/null +++ b/files/ja/web/http/status/204/index.html @@ -0,0 +1,46 @@ +--- +title: 204 No Content +slug: Web/HTTP/Status/204 +tags: + - HTTP + - Success + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/204 +--- +<p>{{HTTPSidebar}}</p> + +<p>HTTP ã®ã¬ã¹ãã³ã¹ã³ãŒã <strong><code>204 No Content</code></strong> ã¯ããªã¯ãšã¹ããæåããäºã瀺ããŸãããã¯ã©ã€ã¢ã³ãã¯çŸåšã®ããŒãžããé·ç§»ããå¿
èŠã¯ãããŸãããã¬ã¹ãã³ã¹ã³ãŒã 204 ãè¿ãããå Žåã¯ãããã©ã«ãã§ãã£ãã·ã¥å¯èœã«ãªã£ãŠããŸãããã®ãããªã¬ã¹ãã³ã¹ã«ã¯ã{{HTTPHeader("ETag")}} ããããŒãå«ãŸããŠããŸãã</p> + +<p>ã¬ã¹ãã³ã¹ã³ãŒã 204 ã¯ãäž»ã«ããŠãŒã¶ãŒã«è¡šç€ºãããã³ã³ãã³ã (ããŒãžã®å
容) ã®å€æŽãäžèŠãªã{{HTTPMethod("PUT")}} ãªã¯ãšã¹ãããªãœãŒã¹ã®ã¢ããããŒããªã©ã«çšããããŸãããªãœãŒã¹ãäœæãããå Žåã¯ã204 ã®ä»£ããã«ãã¬ã¹ãã³ã¹ã³ãŒã {{HTTPStatus("201")}} <code>Created</code> ãè¿ãããŸãããªã¯ãšã¹ãåŸã«ããŒãžå
容ã®æŽæ°ãå¿
èŠãªå Žåãã¬ã¹ãã³ã¹ã³ãŒã {{HTTPStatus("200")}} ãçšããŸãã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">204 No Content</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "204 No Content" , "6.3.5")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºææ§">ãã©ãŠã¶ã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http/status", "204")}}</p> + +<h2 id="åç
§">åç
§</h2> + +<ul> + <li><a href="/docs/Web/HTTP/Methods">HTTP ãªã¯ãšã¹ãã®ã¡ãœãã</a></li> +</ul> diff --git a/files/ja/web/http/status/205/index.html b/files/ja/web/http/status/205/index.html new file mode 100644 index 0000000000..dab1962040 --- /dev/null +++ b/files/ja/web/http/status/205/index.html @@ -0,0 +1,44 @@ +--- +title: 205 Reset Content +slug: Web/HTTP/Status/205 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/205 +--- +<p>{{HTTPSidebar}}</p> + +<p>HTTP <strong><code>205 Reset Content</code></strong> ã®ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã¯ã¯ã©ã€ã¢ã³ãã«ããã¥ã¡ã³ããã¥ãŒããªã»ããããããã«æ瀺ããŸããããšãã°ããã©ãŒã ã®å
容ãã¯ãªã¢ãããããã£ã³ãã¹ã®ç¶æ
ããªã»ããããããUI ããªãã¬ãã·ã¥ããããšãã§ããŸãã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">205 Reset Content</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "205 Reset Content" , "6.3.6")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="äºææ§ã¡ã¢">äºææ§ã¡ã¢</h2> + +<ul> + <li>ãã®ã¬ã¹ãã³ã¹ãæ°žç¶çãªæ¥ç¶äžã§èª€ã£ãŠæ¬æãå«ããšããã©ãŠã¶ã®åäœãç°ãªããŸãã詳现ã«ã€ããŠã¯ <a href="https://developer.mozilla.org/ja/docs/Web/HTTP/Status/204">204 No Content</a> ãåç
§ããŠãã ããã</li> +</ul> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus(204)}} No Content</li> +</ul> diff --git a/files/ja/web/http/status/206/index.html b/files/ja/web/http/status/206/index.html new file mode 100644 index 0000000000..c2560cc2bc --- /dev/null +++ b/files/ja/web/http/status/206/index.html @@ -0,0 +1,86 @@ +--- +title: 206 Partial Content +slug: Web/HTTP/Status/206 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Range Requests + - Success +translation_of: Web/HTTP/Status/206 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP <strong><code>206 Partial Content</code></strong> ã¯æåã¹ããŒã¿ã¹ã¬ã¹ãã³ã¹ã³ãŒãã§ããã®ãªã¯ãšã¹ããæåããããšããããŠãªã¯ãšã¹ãã® {{HTTPHeader("Range")}} ããããŒã«èšè¿°ãããéããèŠæ±ãããç¯å²ã®ããŒã¿ãæ¬æã«å«ãŸããŠããããšã瀺ããŸãã</p> + +<p>ããç¯å²ã1ã€ãããªãã®ã§ããã°ãã¬ã¹ãã³ã¹å
šäœã® {{HTTPHeader("Content-Type")}} ãææžã®ã¿ã€ãã«èšå®ããã {{HTTPHeader("Content-Range")}} ãæäŸãããŸãã</p> + +<p>è€æ°ã®ç¯å²ãè¿ãããå Žåã¯ã {{HTTPHeader("Content-Type")}} ã <code>multipart/byteranges</code> ã«èšå®ãããããããã®æçã1ã€ã®ç¯å²ãè¡šãã{{HTTPHeader("Content-Range")}} ããã³ {{HTTPHeader("Content-Type")}} ãããã説æããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">206 Partial Content</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<p>1ã€ã®ç¯å²ãå«ãã¬ã¹ãã³ã¹ã®äŸ:</p> + +<pre class="newpage">HTTP/1.1 206 Partial Content +Date: Wed, 15 Nov 2015 06:25:24 GMT +Last-Modified: Wed, 15 Nov 2015 04:58:08 GMT +Content-Range: bytes 21010-47021/47022 +Content-Length: 26012 +Content-Type: image/gif + +... 26012 bytes of partial image data ...</pre> + +<p>è€æ°ã®ç¯å²ãå«ãã¬ã¹ãã³ã¹ã®äŸ:</p> + +<pre class="newpage">HTTP/1.1 206 Partial Content +Date: Wed, 15 Nov 2015 06:25:24 GMT +Last-Modified: Wed, 15 Nov 2015 04:58:08 GMT +Content-Length: 1741 +Content-Type: multipart/byteranges; boundary=String_separator + +--String_separator +Content-Type: application/pdf +Content-Range: bytes 234-639/8000 + +...the first range... +--String_separator +Content-Type: application/pdf +Content-Range: bytes 4590-7999/8000 + +...the second range +--String_separator--</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7233", "206 Partial Content" , "4.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.206")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("If-Range")}}</li> + <li>{{HTTPHeader("Range")}}</li> + <li>{{HTTPHeader("Content-Range")}}</li> + <li>{{HTTPHeader("Content-Type")}}</li> +</ul> diff --git a/files/ja/web/http/status/300/index.html b/files/ja/web/http/status/300/index.html new file mode 100644 index 0000000000..e6081a01b3 --- /dev/null +++ b/files/ja/web/http/status/300/index.html @@ -0,0 +1,42 @@ +--- +title: 300 Multiple Choices +slug: Web/HTTP/Status/300 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/300 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <code><strong>300 Multiple Choices</strong></code> ãªãã€ã¬ã¯ãç¶æ
ã³ãŒãã¯ããªã¯ãšã¹ãã«å¯ŸããŠè€æ°ã®ã¬ã¹ãã³ã¹ãããããšã瀺ããŸãããŠãŒã¶ãŒãšãŒãžã§ã³ãããŠãŒã¶ãŒã¯ããã®å
ããäžã€ãéžæããŸããã¬ã¹ãã³ã¹ãäžã€éžæããæ¹æ³ã¯æšæºåãããŠããªãããããã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ã»ãšãã©äœ¿ãããŠããŸããã</p> + +<p>ãµãŒããŒãæšå¥šããéžæè¢ãããå Žåã¯ã {{HTTPHeader("Location")}} ããããŒãçæããŠãã ããã</p> + +<h2 id="Status" name="Status">ç¶æ
</h2> + +<pre class="syntaxbox">300 Multiple Choices +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + <tr> + <td>{{RFC("7231", "300 Multiple Choices" , "6.4.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("301")}} <code>Moved Permanently</code></li> + <li>{{HTTPStatus("302")}} <code>Found</code> (äžæãªãã€ã¬ã¯ã)</li> + <li>{{HTTPStatus("308")}} <code>Permanent Redirect</code></li> +</ul> diff --git a/files/ja/web/http/status/301/index.html b/files/ja/web/http/status/301/index.html new file mode 100644 index 0000000000..ffd70bfad4 --- /dev/null +++ b/files/ja/web/http/status/301/index.html @@ -0,0 +1,63 @@ +--- +title: 301 Moved Permanently +slug: Web/HTTP/Status/301 +tags: + - HTTP + - Redirect + - Reference + - Status code + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã€ã¬ã¯ã +translation_of: Web/HTTP/Status/301 +--- +<div>{{HTTPSidebar}}</div> + +<p>The HyperText Transfer Protocol (HTTP) ã® <code><strong>301 Moved Permanently</strong></code> ãªãã€ã¬ã¯ãã¹ããŒã¿ã¹ã³ãŒãã¯ããªã¯ãšã¹ãããããªãœãŒã¹ã {{HTTPHeader("Location")}} ããããŒã§ç€ºããã URL ãžå®å
šã«ç§»åããããšã瀺ããŸãããã©ãŠã¶ãŒã¯ãã®ããŒãžã«ãªãã€ã¬ã¯ãããæ€çŽ¢ãšã³ãžã³ã¯ãªãœãŒã¹ãžã®ãªã³ã¯ãæŽæ°ããŸã (ãSEO çšèªãã§ã¯ãããªã³ã¯ãžã¥ãŒã¹ããæ°ãã URL ã«éããããšèšãããŸã)ã</p> + +<p>ãªãã€ã¬ã¯ããè¡ããããšããä»æ§æžã§ã¯ã¡ãœãã (ãšæ¬æ) ãå€æŽããªãããèŠæ±ããŠããŸããããã¹ãŠã®ãŠãŒã¶ãŒãšãŒãžã§ã³ããåŸã£ãŠããèš³ã§ã¯ãããŸããã - ãŸã ãã®çš®ã®ãã°ãçºçãããœãããŠã§ã¢ãèŠã€ããã§ããããåŸã£ãŠã <code>301</code> ã®ã³ãŒã㯠{{HTTPMethod("GET")}} ãŸã㯠{{HTTPMethod("HEAD")}} ã¡ãœããã®ã¿ã«äœ¿çšãããã®ã¹ããŒã¿ã¹ã§ã¯æ確ã«ã¡ãœããã®å€æŽãçŠæ¢ãããŠããã®ã§ã {{HTTPMethod("POST")}} ã¡ãœããã§ã¯ä»£ããã« {{HTTPStatus("308", "308 Permanent Redirect")}} ã䜿çšããããšãæšå¥šãããŠããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">301 Moved Permanently</pre> + +<h2 id="Example" name="Example">äŸ</h2> + +<h3 id="Client_request" name="Client_request">ã¯ã©ã€ã¢ã³ããªã¯ãšã¹ã</h3> + +<pre class="notranslate">GET /index.php HTTP/1.1 +Host: www.example.org</pre> + +<h3 id="Server_response" name="Server_response">ãµãŒããŒã¬ã¹ãã³ã¹</h3> + +<pre class="notranslate">HTTP/1.1 301 Moved Permanently +Location: http://www.example.org/index.asp</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "301 Moved Permanently" , "6.4.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããããŒã¿ã«è²¢ç®ãããå Žåã¯ã<a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠããããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.301")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("308", "308 Permanent Redirect")}}</li> + <li>{{HTTPStatus("302", "302 Found")}}: äžæãªãã€ã¬ã¯ã</li> +</ul> diff --git a/files/ja/web/http/status/302/index.html b/files/ja/web/http/status/302/index.html new file mode 100644 index 0000000000..03966be5b3 --- /dev/null +++ b/files/ja/web/http/status/302/index.html @@ -0,0 +1,52 @@ +--- +title: 302 Found +slug: Web/HTTP/Status/302 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Reference + - ãªãã€ã¬ã¯ã +translation_of: Web/HTTP/Status/302 +--- +<div>{{HTTPSidebar}}</div> + +<p>The HyperText Transfer Protocol (HTTP) ã® <code><strong>302 Found</strong></code> ãªãã€ã¬ã¯ãã¹ããŒã¿ã¹ã¬ã¹ãã³ã¹ã³ãŒãã¯ããªã¯ãšã¹ãããããªãœãŒã¹ãäžæçã« {{HTTPHeader("Location")}} ã§ç€ºããã URL ãžç§»åããããšã瀺ããŸãããã©ãŠã¶ãŒã¯ãã®ããŒãžã«ãªãã€ã¬ã¯ãããŸãããæ€çŽ¢ãšã³ãžã³ã¯ãªãœãŒã¹ãžã®ãªã³ã¯ãæŽæ°ããŸãã (ãSEO çšèªãã§ã¯ãããªã³ã¯ãžã¥ãŒã¹ããæ°ãã URL ã«éãããªãã£ããšèšãããŸã)ã</p> + +<p>ä»æ§æžã§ã¯ãªãã€ã¬ã¯ãã®éã«ã¡ãœãã (ãšæ¬æ) ãå€æŽããªãããèŠæ±ããŠããŸããããã¹ãŠã®ãŠãŒã¶ãŒãšãŒãžã§ã³ããæºæ ããŠããèš³ã§ã¯ãããŸãã (ãŸã ãã®çš®ã®ãã°ã®ãããœãããŠã§ã¢ãèŠã€ããã§ããã)ãåŸã£ãŠã <code>302</code> ã³ãŒã㯠{{HTTPMethod("GET")}} ãŸã㯠{{HTTPMethod("HEAD")}} ã¡ãœãããžã®ã¬ã¹ãã³ã¹ã®ã¿ã«äœ¿çšãã {{HTTPMethod("POST")}} ã¡ãœããã®ãŸãŸãªãã€ã¬ã¯ãããå Žåã¯ä»£ããã« {{HTTPStatus("307", "307 Temporary Redirect")}} (ãã¡ãã§ã¯æ確ã«ã¡ãœããã®å€æŽãçŠæ¢ãããŠãã) ã䜿çšããããšãæšå¥šãããŠããŸãã</p> + +<p>䜿çšãããã¡ãœããã {{HTTPMethod("GET")}} ã«å€æŽãããå Žåã¯ã代ããã« {{HTTPStatus("303", "303 See Other")}} ã䜿çšããŠãã ããããã㯠{{HTTPMethod("PUT")}} ã¡ãœãããžã®ã¬ã¹ãã³ã¹ãšããŠãã¢ããããŒãããããªãœãŒã¹ã§ã¯ãªããXYZ ã®ã¢ããããŒãã«æåããŸãããã®ãããªç¢ºèªã¡ãã»ãŒãžã衚瀺ãããå Žåã«äŸ¿å©ã§ãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">302 Found</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "302 Found" , "6.4.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããããŒã¿ã«è²¢ç®ãããå Žåã¯ã<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠããããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.302")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("307", "307 Temporary Redirect")}} 䜿çšãããã¡ãœãããå€æŽãããªãå Žé¢ã§ãã®ã¹ããŒã¿ã¹ã³ãŒããšç䟡ã</li> + <li>{{HTTPStatus("303", "303 See Other")}} ã¡ãœããã {{HTTPMethod("GET")}} ã«å€æŽããäžæãªãã€ã¬ã¯ãã</li> + <li>{{HTTPStatus("301", "301 Moved Permanently")}} æ°žä¹
ãªãã€ã¬ã¯ã</li> +</ul> diff --git a/files/ja/web/http/status/303/index.html b/files/ja/web/http/status/303/index.html new file mode 100644 index 0000000000..f80e5e0f14 --- /dev/null +++ b/files/ja/web/http/status/303/index.html @@ -0,0 +1,47 @@ +--- +title: 303 See Other +slug: Web/HTTP/Status/303 +tags: + - HTTP + - HTTP Status Code + - Reference + - redirects +translation_of: Web/HTTP/Status/303 +--- +<p>{{HTTPSidebar}}</p> + +<p>HyperText Transfer Protocol (HTTP) ã® <code><strong>303 See Other</strong></code> ãªãã€ã¬ã¯ãã¹ããŒã¿ã¹ã¬ã¹ãã³ã¹ã³ãŒãã¯ããªãã€ã¬ã¯ããæ°ããã¢ããããŒãããããªãœãŒã¹ã§ã¯ãªãã (確èªããŒãžãã¢ããããŒãé²æããŒãžã®ãããª) å¥ãªããŒãžã«ãªã³ã¯ããããšã瀺ããŸãããã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ãµã€ãã {{HTTPMethod("PUT")}} ãŸã㯠{{HTTPMethod("POST")}} ã®çµæãšããŠéãè¿ãããŸãããã®ãªãã€ã¬ã¯ãããŒãžã衚瀺ããããã«ã¯ãåžžã« {{HTTPMethod("GET")}} ã䜿çšããŠãã ããã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">303 See Other</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "303 See Other" , "6.4.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.303")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("302", "302 Found")}} äžæçãªãªãã€ã¬ã¯ã</li> + <li>{{HTTPStatus("307", "307 Temporary Redirect")}} 䜿çšãããã¡ãœãããå€æŽãããªãå Žé¢ã§ãã®ã¹ããŒã¿ã¹ã³ãŒããšç䟡ã</li> +</ul> diff --git a/files/ja/web/http/status/304/index.html b/files/ja/web/http/status/304/index.html new file mode 100644 index 0000000000..b2fe293ad7 --- /dev/null +++ b/files/ja/web/http/status/304/index.html @@ -0,0 +1,57 @@ +--- +title: 304 Not Modified +slug: Web/HTTP/Status/304 +tags: + - HTTP + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã€ã¬ã¯ã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/304 +--- +<p>{{HTTPSidebar}}</p> + +<p>HTTP <code><strong>304 Not Modified</strong></code> ã¯ã©ã€ã¢ã³ããªãã€ã¬ã¯ãã¬ã¹ãã³ã¹ã³ãŒãã¯ããªã¯ãšã¹ãããããªãœãŒã¹ãåéããå¿
èŠããªãããšã瀺ããŸããããã¯ãã£ãã·ã¥ããããªãœãŒã¹ãžã®æé»ã®ãªãã€ã¬ã¯ãã§ããããã¯ã{{HTTPMethod("GET")}} ã {{HTTPMethod("HEAD")}} ãªã¯ãšã¹ãã®ãããªãªã¯ãšã¹ãã¡ãœããã {{glossary("safe")}} ã§ããå ŽåããŸãã¯ãªã¯ãšã¹ããæ¡ä»¶ä»ã㧠{{HTTPHeader("If-None-Match")}} ããã㯠{{HTTPHeader("If-Modified-Since")}} ããããŒã䜿çšããŠãããšãã«çºçããŸãã</p> + +<p>{{HTTPStatus("200")}} <code>OK</code> ãšåçã®ã¬ã¹ãã³ã¹ã¯ {{HTTPHeader("Cache-Control")}}ã{{HTTPHeader("Content-Location")}}ã{{HTTPHeader("Date")}}ã{{HTTPHeader("ETag")}}ã{{HTTPHeader("Expires")}} ããã³ {{HTTPHeader("Vary")}} ããããŒãå«ã¿ãŸãã</p> + +<div class="note"> +<p>å€ãã®ãã©ãŠã¶ã®<a href="/ja/docs/Tools/Network_Monitor">éçºããŒã«ã®ãããã¯ãŒã¯ããã«</a>㯠<code>304</code> ã¬ã¹ãã³ã¹ã«ã€ãªããè¿œå ã®ãªã¯ãšã¹ããäœæãããããéçºè
ã¯ããŒã«ã«ãã£ãã·ã¥ãžã®ã¢ã¯ã»ã¹ãèŠãããšãã§ããŸãã</p> +</div> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">304 Not Modified</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7232", "304 Not Modified" , "4.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ã®äºææ§">ãã©ãŠã¶ã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºæè¡šã¯æ§é åããŒã¿ããçæãããŸããããŒã¿ã«è²¢ç®ãããå Žå㯠<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ãããã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.304")}}</p> + +<h2 id="äºææ§ã¡ã¢">äºææ§ã¡ã¢</h2> + +<ul> + <li>ãã®ã¬ã¹ãã³ã¹ãæ°žç¶çãªæ¥ç¶äžã§èª€ã£ãŠæ¬æãå«ããšããã©ãŠã¶ã®åäœãç°ãªããŸãã詳现ã«ã€ããŠã¯ <a href="/ja/docs/Web/HTTP/Status/204">204 No Content</a> ãåç
§ããŠãã ããã</li> +</ul> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("If-Modified-Since")}}</li> + <li>{{HTTPHeader("If-None-Match")}}</li> +</ul> diff --git a/files/ja/web/http/status/307/index.html b/files/ja/web/http/status/307/index.html new file mode 100644 index 0000000000..1d96694319 --- /dev/null +++ b/files/ja/web/http/status/307/index.html @@ -0,0 +1,53 @@ +--- +title: 307 Temporary Redirect +slug: Web/HTTP/Status/307 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Reference + - ãªãã€ã¬ã¯ã +translation_of: Web/HTTP/Status/307 +--- +<div>{{HTTPSidebar}}</div> + +<p>{{Glossary("HTTP")}} ã® <code><strong>307 Temporary Redirect</strong></code> ãªãã€ã¬ã¯ãã¹ããŒã¿ã¹ã¬ã¹ãã³ã¹ã³ãŒãã¯ããªã¯ãšã¹ãããããªãœãŒã¹ãäžæçã« {{HTTPHeader("Location")}} ã§ç€ºããã URL ãžç§»åããããšã瀺ããŸãã</p> + +<p>å
ã®ãªã¯ãšã¹ãã®ã¡ãœãããšæ¬æã¯ããªãã€ã¬ã¯ãããããªã¯ãšã¹ããè¡ãéã«åå©çšãããŸãã䜿çšãããã¡ãœããã {{HTTPMethod("GET")}} ã«å€æŽãããå Žåã¯ã代ããã« {{HTTPStatus("303", "303 See Other")}} ã䜿çšããŠãã ããããã㯠{{HTTPMethod("PUT")}} ã¡ãœãããžã®ã¬ã¹ãã³ã¹ã§ãã¢ããããŒãããããªãœãŒã¹ã§ã¯ãªããšããã§ãXYZ ã®ã¢ããããŒãã«æåããŸãããã®ãããªç¢ºèªã¡ãã»ãŒãžã衚瀺ãããå Žåã«äŸ¿å©ã§ãã</p> + +<p> <code>307</code> ãš {{HTTPStatus("302")}} ã®å¯äžã®éãã¯ã <code>307</code> ã¯ãªãã€ã¬ã¯ãããããªã¯ãšã¹ããè¡ããããšãã«ãã¡ãœãããšæ¬æãå€æŽãããªãããšãä¿èšŒãããããšã§ãã <code>302</code> ã§ã¯ãäžéšã®å€ãã¯ã©ã€ã¢ã³ãã¯äžæ£ã«ã¡ãœããã {{HTTPMethod("GET")}} ã«å€æŽããŠããŸããŸãã <code>GET</code> 以å€ã®ã¡ãœãããš <code>302</code> ã«ããæåã¯ãŠã§ãã§äºæž¬ããããšãã§ããã <code>307</code> ã®æåã¯äºæž¬ã§ããŸãã <code>GET</code> ãªã¯ãšã¹ãã§ã¯ãäž¡è
ã®æåã¯åãã§ãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">307 Temporary Redirect +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "307 Temporary Redirect" , "6.4.7")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååãããã®ã§ããã°ã <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.307")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("302", "302 Found")}}: ãã®ã¹ããŒã¿ã¹ã³ãŒããšåçã§ããã {{HTTPMethod("GET")}} 以å€ã®æã«ã¡ãœãããå€æŽããããããããªãã</li> + <li>{{HTTPStatus("303", "303 See Other")}}: 䜿çšãããã¡ãœããã {{HTTPMethod("GET")}} ã«å€æŽããäžæãªãã€ã¬ã¯ãã</li> + <li>{{HTTPStatus("301", "301 Moved Permanently")}}: æ°žä¹
ãªãã€ã¬ã¯ã</li> +</ul> diff --git a/files/ja/web/http/status/308/index.html b/files/ja/web/http/status/308/index.html new file mode 100644 index 0000000000..d2329cd602 --- /dev/null +++ b/files/ja/web/http/status/308/index.html @@ -0,0 +1,53 @@ +--- +title: 308 Permanent Redirect +slug: Web/HTTP/Status/308 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Reference + - ãªãã€ã¬ã¯ã +translation_of: Web/HTTP/Status/308 +--- +<div>{{HTTPSidebar}}</div> + +<p>The HyperText Transfer Protocol (HTTP) <code><strong>308 Permanent Redirect</strong></code> ãªãã€ã¬ã¯ãã¹ããŒã¿ã¹ã³ãŒãã¯ããªã¯ãšã¹ãããããªãœãŒã¹ã {{HTTPHeader("Location")}} ããããŒã§ç€ºããã URL ãžå®å
šã«ç§»åããããšã瀺ããŸãããã©ãŠã¶ãŒã¯ãã®ããŒãžã«ãªãã€ã¬ã¯ãããæ€çŽ¢ãšã³ãžã³ã¯ãªãœãŒã¹ãžã®ãªã³ã¯ãæŽæ°ããŸã (ãSEO çšèªãã§ã¯ãããªã³ã¯ãžã¥ãŒã¹ããæ°ãã URL ã«éããããšèšãããŸã)ã</p> + +<p> {{HTTPStatus("301")}} ã®å Žåã¯äžæ£ã« {{HTTPMethod("GET")}} ã¡ãœããã«å€æŽãããå¯èœæ§ãããã®ã«å¯Ÿãããã®ã³ãŒãã®å Žåã¯ãªã¯ãšã¹ãã¡ãœãããšæ¬æãå€æŽãããŸããã</p> + +<div class="note"> +<p><strong>ã¡ã¢:</strong> ãŠã§ãã¢ããªã±ãŒã·ã§ã³ã«ãã£ãŠã¯ã <code>308 Permanent Redirect</code> ãæšæºå€ãã€ä»ã®ç®çã«äœ¿çšããŠããããšããããŸããäŸãã°ã Google Drive ã¯ã¢ããããŒããäžå®å
šã«åæ¢ããããšãè¡šãããã«ã <code>308 Resume Incomplete</code> ã¬ã¹ãã³ã¹ã䜿çšããŸãã<sup><a href="https://developers.google.com/drive/v3/web/manage-uploads#resumable">[1]</a></sup></p> +</div> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">308 Permanent Redirect</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7538", "308 Permanent Redirect" , "3")}}</td> + <td>The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ãããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.308")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("301", "301 Moved Permanently")}}</li> + <li>{{HTTPStatus("302", "302 Found")}}: äžæãªãã€ã¬ã¯ã</li> +</ul> diff --git a/files/ja/web/http/status/400/index.html b/files/ja/web/http/status/400/index.html new file mode 100644 index 0000000000..a7fa86440c --- /dev/null +++ b/files/ja/web/http/status/400/index.html @@ -0,0 +1,45 @@ +--- +title: 400 Bad Request +slug: Web/HTTP/Status/400 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Reference + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/400 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) ã® <code><strong>400 Bad Request</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ãäœããã®ã¯ã©ã€ã¢ã³ãåŽã®ãšã©ãŒã§ãããšåãã£ãããã«ããµãŒããŒããã®ãªã¯ãšã¹ããåŠçããªã (ã§ããªã) ããšãè¡šããŸã (äŸãã°ããªã¯ãšã¹ãã®æ§æãæ£ãããªãããªã¯ãšã¹ãã¡ãã»ãŒãžã®ãã¬ãŒãã³ã°ãç¡å¹ããªã¯ãšã¹ãçµè·¯ã«åœãããããªã©)ã</p> + +<div class="warning"> +<p>ã¯ã©ã€ã¢ã³ãã¯å€æŽãªãã«ãã®ãªã¯ãšã¹ããç¹°ãè¿ãã¹ãã§ã¯ãããŸããã</p> +</div> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">400 Bad Request </pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "400 Bad Request" , "6.5.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" rel="noopener">HTTP/1.1: Status Code Definitions</a></li> +</ul> diff --git a/files/ja/web/http/status/401/index.html b/files/ja/web/http/status/401/index.html new file mode 100644 index 0000000000..5e38983c79 --- /dev/null +++ b/files/ja/web/http/status/401/index.html @@ -0,0 +1,58 @@ +--- +title: 401 Unauthorized +slug: Web/HTTP/Status/401 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Reference +translation_of: Web/HTTP/Status/401 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP <strong><code>401 Unauthorized</code></strong> ã¯ãæå¹ãªèªèšŒè³æ Œãäžè¶³ããŠããããšã«ãããªã¯ãšã¹ããé©çšãããªãããšã瀺ãã¯ã©ã€ã¢ã³ããšã©ãŒã®ã¬ã¹ãã³ã¹ã³ãŒãã§ãã</p> + +<p>ãã®ã¹ããŒã¿ã¹ã¯ãæ£ããèªèšŒæ¹æ³ãå«ã {{HTTPHeader("WWW-Authenticate")}} ããããŒãšãšãã«éä¿¡ãããŸãã</p> + +<p>ãã®ã¹ããŒã¿ã¹ã¯ {{HTTPStatus("403")}} ã«äŒŒãŠããŸããããã®å Žåã¯åèªèšŒãå¯èœã§ãã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">401 Unauthorized</pre> + +<h2 id="äŸ">äŸ</h2> + +<pre>HTTP/1.1 401 Unauthorized +Date: Wed, 21 Oct 2015 07:28:00 GMT +WWW-Authenticate: Basic realm="Access to staging site"</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7235", "401 Unauthorized" , "3.1")}}</td> + <td>HTTP/1.1: Authentication</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶ãŒäºææ§">ãã©ãŠã¶ãŒäºææ§</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("http.status.401")}}</p> + +<h2 id="åç
§">åç
§</h2> + +<ul> + <li><a href="/en-US/docs/Web/HTTP/Authentication">HTTP authentication</a></li> + <li>{{HTTPHeader("WWW-Authenticate")}}</li> + <li>{{HTTPHeader("Authorization")}}</li> + <li>{{HTTPHeader("Proxy-Authorization")}}</li> + <li>{{HTTPHeader("Proxy-Authenticate")}}</li> + <li>{{HTTPStatus("403")}}, {{HTTPStatus("407")}}</li> +</ul> diff --git a/files/ja/web/http/status/402/index.html b/files/ja/web/http/status/402/index.html new file mode 100644 index 0000000000..8a58ee1ad6 --- /dev/null +++ b/files/ja/web/http/status/402/index.html @@ -0,0 +1,56 @@ +--- +title: 402 Payment Required +slug: Web/HTTP/Status/402 +tags: + - Browser + - Client error + - HTTP + - Status code + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/402 +--- +<p>{{HTTPSidebar}}{{SeeCompatTable}}</p> + +<p>HTTP ã® <strong><code>402 Payment Required</code></strong> ã¯ãå°æ¥äœ¿çšããããã«äºçŽãããŠããæšæºå€ã®ã¯ã©ã€ã¢ã³ããšã©ãŒã¹ããŒã¿ã¹ã¬ã¹ãã³ã¹ã³ãŒãã§ãã</p> + +<p>ãã®ã³ãŒãã¯ãã¯ã©ã€ã¢ã³ããæ¯æãããããŸã§ãªã¯ãšã¹ããåŠçã§ããªãããšã瀺ããŠããå ŽåããããŸããããšããšã¯é»åãããŒãŸã㯠(ãã€ã¯ã) ãã€ã¡ã³ãã·ã¹ãã ãæå¹ã«ããããã«äœæããããã®ã§ããªã¯ãšã¹ããããã³ã³ãã³ããã¯ã©ã€ã¢ã³ããæ¯æãããããŸã§å©çšã§ããªãããšã瀺ããŠããŸãããããããªãããæšæºçãªæ
£äŸã¯ååšãããæ§ã
ãªãšã³ãã£ãã£ãæ§ã
ãªå Žé¢ã§äœ¿çšããŠããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">402 Payment Required</pre> + +<h2 id="Example_response" name="Example_response">ã¬ã¹ãã³ã¹ã®äŸ</h2> + +<pre class="brush: bash notranslate">HTTP/1.1 402 Payment Required +Date: Wed, 21 Oct 2015 07:28:00 GMT +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "402 Payment Required" , "6.5.2")}}</td> + <td>HTTP/1.1: Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.402")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/ja/docs/Web/HTTP/Authentication">HTTP authentication</a></li> +</ul> diff --git a/files/ja/web/http/status/403/index.html b/files/ja/web/http/status/403/index.html new file mode 100644 index 0000000000..d2043ac3f8 --- /dev/null +++ b/files/ja/web/http/status/403/index.html @@ -0,0 +1,56 @@ +--- +title: 403 Forbidden +slug: Web/HTTP/Status/403 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Reference + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/403 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>403 Forbidden</code></strong> ã¯ã©ã€ã¢ã³ããšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ããµãŒããŒããªã¯ãšã¹ããç解ãããã®ã®ãèªèšŒãæåŠãããããšã瀺ããŸãã</p> + +<p>ãã®ã¹ããŒã¿ã¹ã¯ {{HTTPStatus("401")}} ã«äŒŒãŠããŸããããã®å Žåã¯åèªèšŒããŠãçµæã¯å€ãããŸãããã¢ã¯ã»ã¹ã¯æä¹
çã«çŠæ¢ãããŠããããªãœãŒã¹ã«ã¢ã¯ã»ã¹ããæš©éãäžè¶³ããŠãããªã©ãã¢ããªã±ãŒã·ã§ã³ã®ããžãã¯ã«çµã³ã€ãããã®ã§ãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">403 Forbidden</pre> + +<h2 id="Example_response" name="Example_response">ã¬ã¹ãã³ã¹ã®äŸ</h2> + +<pre class="notranslate">HTTP/1.1 403 Forbidden +Date: Wed, 21 Oct 2015 07:28:00 GMT +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "403 Forbidden" , "6.5.3")}}</td> + <td>HTTP/1.1: Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.403")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("401")}}</li> + <li><a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" rel="noopener">HTTP/1.1: Status Code Definitions</a></li> +</ul> diff --git a/files/ja/web/http/status/404/index.html b/files/ja/web/http/status/404/index.html new file mode 100644 index 0000000000..b3019345bd --- /dev/null +++ b/files/ja/web/http/status/404/index.html @@ -0,0 +1,65 @@ +--- +title: 404 Not Found +slug: Web/HTTP/Status/404 +tags: + - Browser + - HTTP + - Reference + - Status code + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/404 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP <code><strong>404 Not Found</strong></code> ã¯ããµãŒããŒããªã¯ãšã¹ãããããªãœãŒã¹ãèŠã€ããããšãã§ããªãæã®ã¯ã©ã€ã¢ã³ããšã©ãŒã®ã¬ã¹ãã³ã¹ã³ãŒãã§ãã 404 ããŒãžã«ã€ãªãããªã³ã¯ã¯ãå£ãããªã³ã¯ãŸãã¯æ»ãã ãªã³ã¯ãšåŒã°ãã<a href="https://en.wikipedia.org/wiki/Link_rot">ãªã³ã¯è
æ</a>ã®åœ±é¿ãåããå¯èœæ§ããããŸãã</p> + +<p>404 ã¹ããŒã¿ã¹ã³ãŒãã¯ããªãœãŒã¹ãäžæçãŸãã¯æ°žç¶çã«å€±ãããŠãããã©ããã瀺ããŠã¯ããŸãããããªãœãŒã¹ãæ°žä¹
ã«åé€ãããå Žåã¯ã 404 ã¹ããŒã¿ã¹ã®ä»£ããã« {{HTTPStatus("410")}} (Gone) ã䜿çšããå¿
èŠããããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">404 Not Found</pre> + +<h2 id="Custom_error_pages" name="Custom_error_pages">ã«ã¹ã¿ã ãšã©ãŒããŒãž</h2> + +<p>å€ãã®ãŠã§ããµã€ãã§ã¯ã 404 ããŒãžã®èŠãç®ãã«ã¹ã¿ãã€ãºãããããŠãŒã¶ãŒã«ãšã£ãŠåœ¹ç«ã€ãããªã次ã«äœããã¹ããã«ã€ããŠã®ã¬ã€ãã³ã¹ãæäŸããŠããŸãã Apache ãµãŒããŒã¯ <code>.htaccess</code> ãã¡ã€ã«ãã以äžã®äŸã®ãããªã³ãŒãã¹ããããã䜿çšããŠæ§æããããšãã§ããŸãã</p> + +<pre class="brush: bash notranslate">ErrorDocument 404 /notfound.html</pre> + +<p>ã«ã¹ã¿ã 404 ããŒãžã®äŸã«ã€ããŠã¯ã <a href="https://developer.mozilla.org/ja/404">MDN ã® 404 ããŒãž</a>ãåç
§ããŠãã ããã</p> + +<div class="note"> +<p>é©åºŠãªãã¶ã€ã³ã®ã«ã¹ã¿ãã€ãºã¯è¯ãããšã§ããããªãã® 404 ããŒãžããŠãŒã¢ã¢ãæãããã®ãããã®ã«ããããšã¯èªç±ã§ããããŠãŒã¶ãŒãæ··ä¹±ãããªãããã«ããŠãã ããã</p> +</div> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "404 Not Found" , "6.5.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.404")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("410")}}</li> + <li> + <p>{{interwiki("wikipedia", "HTTP_404", "Wikipedia: HTTP 404")}}</p> + </li> +</ul> diff --git a/files/ja/web/http/status/405/index.html b/files/ja/web/http/status/405/index.html new file mode 100644 index 0000000000..30429674b5 --- /dev/null +++ b/files/ja/web/http/status/405/index.html @@ -0,0 +1,46 @@ +--- +title: 405 Method Not Allowed +slug: Web/HTTP/Status/405 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Reference + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/405 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) ã® <code><strong>405</strong></code><strong><code> Method Not Allowed</code></strong> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ããªã¯ãšã¹ãã¡ãœããããµãŒããŒåŽã§èªèããŠãããã察象ã®ãªãœãŒã¹ã§ã¯å¯Ÿå¿ããŠããªãããšã瀺ããŸãã</p> + +<p class="newpage">ãµãŒããŒã¯ 405 ã¬ã¹ãã³ã¹ã§ã察象ã®ãªãœãŒã¹ã§çŸåšå¯Ÿå¿ããŠããã¡ãœããã®äžèŠ§ãå«ã <strong><code>Allow</code></strong> ããããŒæ¬ãçæããªããã°ãªããŸããã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">405 Method Not Allowed</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "405 Method Not Allowed" , "6.5.5")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Allow")}}</li> + <li><a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" rel="noopener">HTTP/1.1: Status Code Definitions</a></li> + <li><a href="https://kinsta.com/blog/405-method-not-allowed-error/">How to Fix 405 Method Not Allowed</a></li> + <li><a href="https://docs.microsoft.com/en-us/aspnet/web-api/overview/testing-and-debugging/troubleshooting-http-405-errors-after-publishing-web-api-applications">Troubleshooting HTTP 405</a></li> +</ul> diff --git a/files/ja/web/http/status/406/index.html b/files/ja/web/http/status/406/index.html new file mode 100644 index 0000000000..ce674696f3 --- /dev/null +++ b/files/ja/web/http/status/406/index.html @@ -0,0 +1,64 @@ +--- +title: 406 Not Acceptable +slug: Web/HTTP/Status/406 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Reference +translation_of: Web/HTTP/Status/406 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) ã® <code><strong>406 Not Acceptable</strong></code> ã¯ã©ã€ã¢ã³ããšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ããµãŒããŒããªã¯ãšã¹ãã®çšæãã<a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a>ããããŒã§å®çŸ©ãããåä»å¯èœãªå€ã«äžèŽããã¬ã¹ãã³ã¹ãçæã§ããããµãŒããŒãæ¢å®ã®è¡šçŸæ¹æ³ã§æäŸããããšãæãŸãªãããšãè¡šããŸãã</p> + +<p>çšæãããã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ããããŒã«ã¯æ¬¡ã®ãã®ããããŸãã</p> + +<ul> + <li>{{HTTPHeader("Accept")}}</li> + <li>{{HTTPHeader("Accept-Charset")}}</li> + <li>{{HTTPHeader("Accept-Encoding")}}</li> + <li>{{HTTPHeader("Accept-Language")}}</li> +</ul> + +<p>å®éã«ã¯ããã®ãšã©ãŒã¯æ»
å€ã«äœ¿ãããŸããããã®ãšã©ãŒã³ãŒãã䜿çšããã代ããã«ããšã³ããŠãŒã¶ãŒã«ã¯æå·çã§ä¿®æ£ããã®ãå°é£ãªãã®ãªã®ã§ããµãŒããŒã¯é¢é£ããããããŒãç¡èŠããŠãŠãŒã¶ãŒã«å®éã®ããŒãžãæäŸããŸãããŠãŒã¶ãŒãå®å
šã«å©çã«ãªããªãå Žåã«éãããã¡ãã®ãšã©ãŒã³ãŒããéžæããã§ãããã</p> + +<p>ãµãŒããŒããã®ãããªãšã©ãŒç¶æ
ãè¿ããŠããå Žåãã¡ãã»ãŒãžã®æ¬æã«ã¯å©çšã§ãããªãœãŒã¹ã®è¡šçŸã®äžèŠ§ãå«ã¿ããŠãŒã¶ãŒããã®äžããéžæã§ããããã«ããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">406 Not Acceptable</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "406 Not Acceptable" , "6.5.6")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p>以äžã®æ
å ±ã¯ MDN ã® Github (<a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>) ããååŸãããã®ã§ãã</p> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.406")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Accept")}}</li> + <li>{{HTTPHeader("Accept-Charset")}}</li> + <li>{{HTTPHeader("Accept-Encoding")}}</li> + <li>{{HTTPHeader("Accept-Language")}}</li> + <li>HTTP ã®<a href="/ja/docs/Web/HTTP/Content_negotiation">ã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a></li> +</ul> diff --git a/files/ja/web/http/status/407/index.html b/files/ja/web/http/status/407/index.html new file mode 100644 index 0000000000..d4650a7058 --- /dev/null +++ b/files/ja/web/http/status/407/index.html @@ -0,0 +1,57 @@ +--- +title: 407 Proxy Authentication Required +slug: Web/HTTP/Status/407 +tags: + - HTTP + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/407 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP <strong><code>407 Proxy Authentication Required</code> </strong> ã¯ã©ã€ã¢ã³ããšã©ãŒãšããã¹ããŒã¿ã¹ã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ããªã¯ãšã¹ããé©çšãããŠããªãããšã瀺ããŠããŸãããªããªãããã©ãŠã¶ãšèŠæ±ããããªãœãŒã¹ã«ã¢ã¯ã»ã¹ã§ãããµãŒããŒã®éã«ãããããã·ãµãŒããŒã«æå¹ãªèªèšŒæ
å ±ãäžè¶³ããŠããããã§ãã</p> + +<p>ãã®ã¹ããŒã¿ã¹ã¯ãæ£ããèªèšŒã®ä»æ¹ã«é¢ããæ
å ±ãå«ã {{HTTPHeader("Proxy-Authenticate")}} ããããŒãšå
±ã«éä¿¡ãããŸãã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">407 Proxy Authentication Required </pre> + +<h2 id="ã¬ã¹ãã³ã¹äŸ">ã¬ã¹ãã³ã¹äŸ</h2> + +<pre>HTTP/1.1 407 Proxy Authentication Required +Date: Wed, 21 Oct 2015 07:28:00 GMT +Proxy-Authenticate: Basic realm="Access to internal site"</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Title</th> + </tr> + <tr> + <td>{{RFC("7235", "407 Proxy Authentication Required" , "3.2")}}</td> + <td>HTTP/1.1: Authentication</td> + </tr> + </tbody> +</table> + +<h2 id="ãã©ãŠã¶äºææ§">ãã©ãŠã¶äºææ§</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("http.status.407")}}</p> + +<h2 id="åç
§">åç
§</h2> + +<ul> + <li><a href="/en-US/docs/Web/HTTP/Authentication">HTTP authentication</a></li> + <li>{{HTTPHeader("WWW-Authenticate")}}</li> + <li>{{HTTPHeader("Authorization")}}</li> + <li>{{HTTPHeader("Proxy-Authorization")}}</li> + <li>{{HTTPHeader("Proxy-Authenticate")}}</li> + <li>{{HTTPStatus("401")}}, {{HTTPStatus("403")}}</li> +</ul> diff --git a/files/ja/web/http/status/408/index.html b/files/ja/web/http/status/408/index.html new file mode 100644 index 0000000000..39c187b5a0 --- /dev/null +++ b/files/ja/web/http/status/408/index.html @@ -0,0 +1,48 @@ +--- +title: 408 Request Timeout +slug: Web/HTTP/Status/408 +tags: + - HTTP + - HTTPã¹ããŒã¿ã¹ã³ãŒã + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/408 +--- +<p>{{HTTPSidebar}}</p> + +<p>HyperText Transfer Protocol (HTTP) <code><strong>408 Request Timeout</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ãµãŒããŒããã®æªäœ¿çšã®ã³ãã¯ã·ã§ã³ãã·ã£ããããŠã³ããããšãæå³ããŸãã <em>ã¯ã©ã€ã¢ã³ãããã®ä»¥åã®ãªã¯ãšã¹ãããªããŠã</em>ãäžéšã®ãµãŒããŒã«ãã£ãŠã¢ã€ãã«ç¶æ
ã®ã³ãã¯ã·ã§ã³ã§éä¿¡ãããŸãã</p> + +<p><code>408</code> ã¯ãµãŒããŒãã³ãã¯ã·ã§ã³ãåŸ
æ©ãç¶ããã®ã§ã¯ãªããéããããšã決å®ããããšãæå³ããŠããããããµãŒããŒã¯ã¬ã¹ãã³ã¹ã§Â "close" {{HTTPHeader("Connection")}} ããããŒãã£ãŒã«ããéä¿¡ããå¿
èŠããããŸãã</p> + +<p>ãã®ã¬ã¹ãã³ã¹ã¯ HTTP äºåæ¥ç¶ã¡ã«ããºã 䜿çšããŠãµãŒãã£ã³ãé«éåããããã«ãChrome ããFirefox 27+ãIE9 ãªã©ã®ãããã€ãã®ãã©ãŠã¶ã§ããå©çšãããŸãã</p> + +<div class="note"> +<p><strong>ã¡ã¢: </strong>ãã®ã¡ãã»ãŒãžãéä¿¡ããã«æ¥ç¶ãã·ã£ããããŠã³ãããµãŒããŒããããŸãã</p> +</div> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">408 Request Timeout</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "408 Request Timeout" , "6.5.7")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="åç
§">åç
§</h2> + +<ul> + <li>{{HTTPHeader("Connection")}}</li> + <li>{{HTTPHeader("X-DNS-Prefetch-Control")}}</li> +</ul> diff --git a/files/ja/web/http/status/409/index.html b/files/ja/web/http/status/409/index.html new file mode 100644 index 0000000000..155f2bd1a6 --- /dev/null +++ b/files/ja/web/http/status/409/index.html @@ -0,0 +1,40 @@ +--- +title: 409 Conflict +slug: Web/HTTP/Status/409 +tags: + - HTTP + - HTTPã¹ããŒã¿ã¹ã³ãŒã + - Reference + - ã¯ã©ã€ã¢ã³ããšã©ãŒ +translation_of: Web/HTTP/Status/409 +--- +<p>{{HTTPSidebar}}</p> + +<p>HTTP <code><strong>409 Conflict</strong></code> ã¯ãªã¯ãšã¹ããçŸåšã®ãµãŒããŒã®ç¶æ
ãšç«¶åããããšã瀺ãã¹ããŒã¿ã¹ã³ãŒãã</p> + +<p>競åã¯Â {{HTTPMethod("PUT")}} ã¡ãœããã䜿çšãããªã¯ãšã¹ãã®ã¬ã¹ãã³ã¹ã§æãçºçãããããäŸãã°ããµãŒããŒã«ãã§ã«ååšããŠãããã¡ã€ã«ãããå€ãããŒãžã§ã³ã®ãã¡ã€ã«ãã¢ããããŒãããéã«409ã®å¿çãè¿ãããããŒãžã§ã³ç®¡çã·ã¹ãã ã®ç«¶åãçºçããå¯èœæ§ãããã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">409 Conflict</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "409 Conflict" , "6.5.8")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="åç
§">åç
§</h2> + +<ul> + <li>{{HTTPMethod("PUT")}}</li> +</ul> diff --git a/files/ja/web/http/status/410/index.html b/files/ja/web/http/status/410/index.html new file mode 100644 index 0000000000..ba7d4462e1 --- /dev/null +++ b/files/ja/web/http/status/410/index.html @@ -0,0 +1,55 @@ +--- +title: 410 Gone +slug: Web/HTTP/Status/410 +tags: + - Client error + - HTTP + - Reference + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/410 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) ã® <code><strong>410 Gone</strong></code> ã¯ã©ã€ãšã³ããšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ãå
ã®ãµãŒããŒã§å©çšã§ããªããªã£ãŠãã察象ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããŠããããšã瀺ããŸãããã®ç¶æ
ã¯æ°žä¹
çã§ãã</p> + +<p>ãã®ç¶æ
ãäžæçãªãã®ãæ°žä¹
ãªã®ãåãããªãå Žåã¯ã代ããã« {{HTTPStatus(404)}} ã¹ããŒã¿ã¹ã³ãŒãã䜿çšããŠãã ããã</p> + +<div class="note"> +<p><strong>ã¡ã¢:</strong> 410 ã¬ã¹ãã³ã¹ã¯æ¢å®ã§ãã£ãã·ã¥å¯èœã§ãã</p> +</div> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">410 Gone</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "410 Gone" , "6.5.9")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>以äžã«ç€ºãæ
å ±ã¯ã MDN ã® GitHub ããååŸãããã®ã§ãã (<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>).</p> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.410")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus(404)}}</li> +</ul> diff --git a/files/ja/web/http/status/411/index.html b/files/ja/web/http/status/411/index.html new file mode 100644 index 0000000000..af799dec88 --- /dev/null +++ b/files/ja/web/http/status/411/index.html @@ -0,0 +1,44 @@ +--- +title: 411 Length Required +slug: Web/HTTP/Status/411 +tags: + - HTTP + - HTTPã¹ããŒã¿ã¹ã³ãŒã + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/411 +--- +<p>{{HTTPSidebar}}</p> + +<p>HyperText Transfer Protocol (HTTP) <code><strong>411 Length Required</strong></code> ã¯ã©ã€ã¢ã³ããšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ããµãŒããŒãå®çŸ©ããã {{HTTPHeader("Content-Length")}} ããããŒã®ãªããªã¯ãšã¹ãã®åãå
¥ããæåŠããããšã瀺ããŸãã</p> + +<div class="note"> +<p><strong>ã¡ã¢: </strong>ä»æ§ã«ãã£ãŠã¯ãäžé£ã®ãã£ã³ã¯ã§ããŒã¿ãéä¿¡ããå Žå <code>Content-Length</code> ãããã¯çç¥ãããåãã£ã³ã¯ã®å
é ã«ãçŸåšã®ãã£ã³ã¯ã®é·ãã16é²åœ¢åŒã§è¿œå ããå¿
èŠããããŸãã詳现㯠{{HTTPHeader("Transfer-Encoding")}} ãåç
§ããŠãã ããã</p> +</div> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">411 Length Required</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "411 Length Required" , "6.5.10")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Length")}}</li> + <li>{{HTTPHeader("Transfer-Encoding")}}</li> +</ul> diff --git a/files/ja/web/http/status/412/index.html b/files/ja/web/http/status/412/index.html new file mode 100644 index 0000000000..eb990c4f4d --- /dev/null +++ b/files/ja/web/http/status/412/index.html @@ -0,0 +1,71 @@ +--- +title: 412 Precondition Failed +slug: Web/HTTP/Status/412 +tags: + - HTTP + - Reference + - ãšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/412 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) <code><strong>412 Precondition Failed</strong></code> ã¯ã©ã€ã¢ã³ããšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ãã¿ãŒã²ãããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãæåŠãããããšã瀺ããŸããããã¯ã {{HTTPHeader("If-Unmodified-Since")}} ãŸã㯠{{HTTPHeader("If-None-Match")}} ããããŒã§å®çŸ©ãããæ¡ä»¶ãæºããããŠããªãå Žåã«ã {{HTTPMethod("GET")}} ããã㯠{{HTTPMethod("HEAD")}} 以å€ã®ã¡ãœããã®æ¡ä»¶ä»ããªã¯ãšã¹ãã§çºçããŸãããã®å Žåããªã¯ãšã¹ã (éåžžã¯ãªãœãŒã¹ã®ã¢ããããŒããŸãã¯å€æŽ) ãè¡ãããšãã§ããããã®ãšã©ãŒã¬ã¹ãã³ã¹ãè¿ãããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">412 Precondition Failed</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre><code>ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4" +ETag: W/"0815"</code></pre> + +<h3 id="Avoiding_mid-air_collisions" name="Avoiding_mid-air_collisions">空äžè¡çªã®é²æ¢</h3> + +<p><code>ETag</code> ãš {{HTTPHeader("If-Match")}} ã®åããããŒã掻çšããããšã§ãç·šéã®ç©ºäžè¡çªãæ€åºããããšãã§ããŸãã</p> + +<p>äŸãã°ã MDN ãç·šéããŠãããšããçŸåšã® Wiki ã®å
容ãããã·ã¥åãããã¬ã¹ãã³ã¹ã® <code>Etag</code> ã«å
¥ããŸãã</p> + +<pre><code>ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"</code></pre> + +<p>Wiki ããŒãžãžã®ç·šéãä¿åãã (ããŒã¿ãæçš¿ãã) éã«ã {{HTTPMethod("POST")}} ãªã¯ãšã¹ãã« {{HTTPHeader("If-Match")}} ããããŒãå«ã¿ããã®äžã§æ°é®®ãããã§ãã¯ããããã® <code>ETag</code> ã®å€ãå«ã¿ãŸãã</p> + +<pre><code>If-Match: "33a64df551425fcc55e4d42a148795d9f25f89d4"</code></pre> + +<p>ããã·ã¥ãäžèŽããªãå Žåããã®éã§ææžãç·šéãããããšãæå³ããã®ã§ã {{HTTPStatus("412")}} <code>Precondition Failed</code> ãšã©ãŒãçºçãããŸãã</p> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7232", "412 Precondition Failed" , "4.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>以äžã«ç€ºãæ
å ±ã¯ã MDN ã® GitHub ããååŸãããã®ã§ãã (<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>).</p> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.412")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus("304")}}</li> + <li>{{HTTPHeader("If-Unmodified-Since")}}</li> + <li>{{HTTPHeader("If-None-Match")}}</li> + <li>{{HTTPStatus("428")}}</li> +</ul> diff --git a/files/ja/web/http/status/413/index.html b/files/ja/web/http/status/413/index.html new file mode 100644 index 0000000000..f4b4ab9ffd --- /dev/null +++ b/files/ja/web/http/status/413/index.html @@ -0,0 +1,42 @@ +--- +title: 413 Payload Too Large +slug: Web/HTTP/Status/413 +tags: + - Client error + - HTTP + - HTTP Status Code + - Reference + - Status code +translation_of: Web/HTTP/Status/413 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP <code><strong>413 Payload Too Large</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ããªã¯ãšã¹ããšã³ãã£ãã£ããµãŒããŒã«ãã£ãŠå®çŸ©ãããå¶éããã倧ããããšã瀺ããŸãããµãŒããŒã¯æ¥ç¶ãéããã {{HTTPHeader("Retry-After")}} ããããŒãã£ãŒã«ããè¿ããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">413 Payload Too Large</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "413 Payload Too Large" , "6.5.11")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Connection")}}</li> + <li>{{HTTPHeader("Retry-After")}}</li> +</ul> diff --git a/files/ja/web/http/status/414/index.html b/files/ja/web/http/status/414/index.html new file mode 100644 index 0000000000..308616143f --- /dev/null +++ b/files/ja/web/http/status/414/index.html @@ -0,0 +1,49 @@ +--- +title: 414 URI Too Long +slug: Web/HTTP/Status/414 +tags: + - HTTP + - Reference + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/414 +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary">HTTP ã® <code><strong>414 URI Too Long</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ãã¯ã©ã€ã¢ã³ãããªã¯ãšã¹ããã URL ãããµãŒããŒã解éããããšãããã®ãããé·ãããšã瀺ããŸãã</span></p> + +<p>ãããçºçããæ¡ä»¶ã¯ãããã§ãã</p> + +<ul> + <li>ã¯ã©ã€ã¢ã³ãããéä¿¡ããŒã¿ãããã 2KB ãè¶
ãã {{HTTPMethod("POST")}} ãªã¯ãšã¹ããäžé©åã« {{HTTPMethod("GET")}} ãªã¯ãšã¹ãã«å€æããå Žåã</li> + <li>ã¯ã©ã€ã¢ã³ãããªãã€ã¬ã¯ãã®ã«ãŒãã«é¥ã£ãå Žå (ããšãã°ããªãã€ã¬ã¯ãããã URL æ¥é èŸãèªåèªèº«ã®æ¥å°ŸèŸãæããŠããå Žåããåãåã£ã URL ã®æ±ãã誀ã£ãå Žå)ã</li> + <li>æœåšçãªã»ãã¥ãªãã£ããŒã«ãå©çšããããšããŠããã¯ã©ã€ã¢ã³ãããµãŒããŒãæ»æããŠããå Žåãªã©ã§ãã</li> +</ul> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">414 URI Too Long</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "414 URI Too Long" , "6.5.12")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus(431, "431 Request Header Fields Too Large")}}</li> + <li>{{Glossary("URI")}}</li> +</ul> diff --git a/files/ja/web/http/status/415/index.html b/files/ja/web/http/status/415/index.html new file mode 100644 index 0000000000..ced2dfbcf6 --- /dev/null +++ b/files/ja/web/http/status/415/index.html @@ -0,0 +1,43 @@ +--- +title: 415 Unsupported Media Type +slug: Web/HTTP/Status/415 +tags: + - HTTP + - HTTPã¹ããŒã¿ã¹ã³ãŒã + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/415 +--- +<p>{{HTTPSidebar}}</p> + +<p>HTTP <code><strong>415 Unsupported Media Type</strong></code> ã¯ã©ã€ã¢ã³ããšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ããã€ããŒããã©ãŒãããããµããŒããããŠããªããã©ãŒãããã§ããããããµãŒããŒããªã¯ãšã¹ãã®åãå
¥ããæåŠããããšã瀺ããŸãã</p> + +<p>ãã©ãŒãããã®åé¡ã¯ãªã¯ãšã¹ãããã {{HTTPHeader("Content-Type")}} ãŸã㯠{{HTTPHeader("Content-Encoding")}} ã«ãããã®ãããŸãã¯çŽæ¥ããŒã¿ãæ€æ»ããçµæã«èµ·å ããå¯èœæ§ããããŸãã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">415 Unsupported Media Type</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "415 Unsupported Media Type" , "6.5.13")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Content-Type")}}</li> + <li>{{HTTPHeader("Content-Encoding")}}</li> + <li>{{HTTPHeader("Accept")}}</li> +</ul> diff --git a/files/ja/web/http/status/416/index.html b/files/ja/web/http/status/416/index.html new file mode 100644 index 0000000000..2d82a94f5d --- /dev/null +++ b/files/ja/web/http/status/416/index.html @@ -0,0 +1,53 @@ +--- +title: 416 Range Not Satisfiable +slug: Web/HTTP/Status/416 +tags: + - Client error + - HTTP + - Status code +translation_of: Web/HTTP/Status/416 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) <code><strong>416 Range Not Satisfiable</strong></code> ãšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ããµãŒããŒããªã¯ãšã¹ããããç¯å²ãæäŸã§ããªãããšã瀺ããŸããæãå¯èœæ§ã®é«ãçç±ã¯ãææžã«ãã®ãããªç¯å²ãå«ãŸããŠããªããããŸã㯠{{HTTPHeader("Range")}} ããããŒå€ãæ§æçã«ã¯æ£ãããã®ã®ãæå³ããªããªããšããããšã§ãã</p> + +<p><code>416</code> ã¬ã¹ãã³ã¹ã¡ãã»ãŒãžã«ã¯ {{HTTPHeader("Content-Range")}} ãå«ãŸããæªè§£æ±ºã®ç¯å² (<code>'*'</code>) ãšããã«ç¶ã <code>'/'</code> ãšãªãœãŒã¹ã®çŸåšãäŸãã° <code>Content-Range: bytes */12777</code> ã瀺ããŸãã</p> + +<p>ãã®ãšã©ãŒã«çŽé¢ãããšããã©ãŠã¶ãŒã¯éåžžæäœãäžæãã (ããšãã°ãããŠã³ããŒãã¯åéäžå¯ãšã¿ãªã) ããææžå
šäœãå床ãªã¯ãšã¹ããããããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">416 Range Not Satisfiable</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7233", "416 Request Not Satisfiable" , "4.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>以äžã«è¡šç€ºãããæ
å ±ã¯ãMDN ã® Github (<a class="external external-icon" href="https://github.com/mdn/browser-compat-data" rel="noopener">https://github.com/mdn/browser-compat-data</a>) ããã®ãã®ã§ãã</p> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.416")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus(206)}} <code>Partial Content</code></li> + <li>{{HTTPHeader("Content-Range")}}</li> + <li>{{HTTPHeader("Range")}}</li> +</ul> diff --git a/files/ja/web/http/status/417/index.html b/files/ja/web/http/status/417/index.html new file mode 100644 index 0000000000..8c81d582f9 --- /dev/null +++ b/files/ja/web/http/status/417/index.html @@ -0,0 +1,41 @@ +--- +title: 417 Expectation Failed +slug: Web/HTTP/Status/417 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/417 +--- +<p>{{HTTPSidebar}}</p> + +<p>HTTP <strong><code>417 Expectation Failed</code></strong> ã¯ã©ã€ã¢ã³ããšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ããªã¯ãšã¹ãã® {{HTTPHeader("Expect")}} ããããŒã«æåŸ
ãããå€ãèšå®ãããŠããªãã£ãããšã瀺ããŸãã</p> + +<p>詳现㯠{{HTTPHeader("Expect")}} ããããŒãåç
§ããŠãã ããã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">417 Expectation Failed</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "417 Expectation Failed" , "6.5.14")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Expect")}}</li> +</ul> diff --git a/files/ja/web/http/status/418/index.html b/files/ja/web/http/status/418/index.html new file mode 100644 index 0000000000..1295a85bec --- /dev/null +++ b/files/ja/web/http/status/418/index.html @@ -0,0 +1,51 @@ +--- +title: 418 I'm a teapot +slug: Web/HTTP/Status/418 +tags: + - HTTP + - HTTP Status Code + - Reference +translation_of: Web/HTTP/Status/418 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <strong><code>418 I'm a teapot</code></strong> ã¯ã©ã€ã¢ã³ããšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ããµãŒããŒããèªèº«ããã£ãŒãããã§ããããšãçç±ãšããŠã³ãŒããŒãå
¥ããããšãæåŠããããšã瀺ããŸããã³ãŒããŒãšãã£ãŒã®è€åãããã§ãäžæçã«ã³ãŒããŒãæäŸã§ããªãå Žåã¯ã代ããã« 503 ãè¿ããŠãã ããããã®ãšã©ãŒã¯ã1998幎ã®ãšã€ããªã«ããŒã«ã®ãžã§ãŒã¯ã§ãã Hyper Text Coffee Pot Control Protocol ã«ç±æ¥ããŸãã</p> + +<p>äžéšã®ãŠã§ããµã€ãã§ã¯ãèªååãããã¯ãšãªãªã©ãåŠçããããªããªã¯ãšã¹ãã«å¯ŸããŠãã®ã¬ã¹ãã³ã¹ã䜿çšããŠããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">418 I'm a teapot</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("2324", "418 I'm a teapot" , "2.3.2")}}</td> + <td>Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0): Semantics and Content</td> + </tr> + <tr> + <td>{{RFC("7168", "418 I'm a teapot" , "2.3.3")}}</td> + <td>The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA): Response Codes</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.418")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{interwiki("wikipedia", "Hyper Text Coffee Pot Control Protocol", "Wikipedia: Hyper Text Coffee Pot Control Protocol")}}</li> +</ul> diff --git a/files/ja/web/http/status/422/index.html b/files/ja/web/http/status/422/index.html new file mode 100644 index 0000000000..7cbff3d941 --- /dev/null +++ b/files/ja/web/http/status/422/index.html @@ -0,0 +1,39 @@ +--- +title: 422 Unprocessable Entity +slug: Web/HTTP/Status/422 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - WebDAV + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/422 +--- +<p>{{HTTPSidebar}}</p> + +<p>The HyperText Transfer Protocol (HTTP) ã® <code><strong>422 Unprocessable Entity</strong></code> å¿çç¶æ
ã³ãŒãã¯ããµãŒããŒãèŠæ±æ¬æã®ã³ã³ãã³ãåãç解ã§ããèŠæ±æ¬æã®æ§æãæ£ãããã®ã®ãäžã«å«ãŸããŠããæ瀺ãåŠçã§ããªãã£ãããšãè¡šããŸãã</p> + +<div class="warning"> +<p><strong>éèŠ</strong>: ã¯ã©ã€ã¢ã³ãã¯ä¿®æ£ãªãã«ãã®èŠæ±ãç¹°ãè¿ãã¹ãã§ã¯ãããŸããã</p> +</div> + +<h2 id="Status" name="Status">ç¶æ
</h2> + +<pre class="syntaxbox">422 Unprocessable Entity</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("4918", "422 Unprocessable Entity" , "11.2")}}</td> + <td>HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</td> + </tr> + </tbody> +</table> diff --git a/files/ja/web/http/status/425/index.html b/files/ja/web/http/status/425/index.html new file mode 100644 index 0000000000..a144ea2f4b --- /dev/null +++ b/files/ja/web/http/status/425/index.html @@ -0,0 +1,41 @@ +--- +title: 425 Too Early +slug: Web/HTTP/Status/425 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãã©ãŠã¶ãŒ +translation_of: Web/HTTP/Status/425 +--- +<div>{{SeeCompatTable}}{{HTTPSidebar}}</div> + +<p>HTTP (HyperText Transfer Protocol) ã® <code><strong>425 Too Early</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ããµãŒããŒããªãã¬ã€æ»æã®å¯èœæ§ãçã¿åºããªãã¬ã€ãããèŠæ±ãåŠçãããªã¹ã¯ãè² ããªãããšã瀺ããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">425 Too Early</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("8470", "425: Early Data", "5.2")}}</td> + <td>Using Early Data in HTTP</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®å¯Ÿå¿</h2> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.425")}}</p> diff --git a/files/ja/web/http/status/426/index.html b/files/ja/web/http/status/426/index.html new file mode 100644 index 0000000000..0129ce84cb --- /dev/null +++ b/files/ja/web/http/status/426/index.html @@ -0,0 +1,54 @@ +--- +title: 426 Upgrade Required +slug: Web/HTTP/Status/426 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/426 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP ã® <code><strong>426 Upgrade Required</strong></code> ã¯ã©ã€ã¢ã³ããšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ããµãŒããŒãçŸåšã®ãããã³ã«ã䜿çšããŠãªã¯ãšã¹ããå®è¡ããããšãæåŠããŠããããšã瀺ããŸãããã¯ã©ã€ã¢ã³ããå¥ã®ãããã³ã«ã«ã¢ããã°ã¬ãŒãããåŸã«çºçããå¯èœæ§ããããŸãã</p> + +<p>ãµãŒããŒã¯ãã®ã¬ã¹ãã³ã¹ãšãšãã« {{HTTPHeader("Upgrade")}} ããããŒãéä¿¡ããå¿
èŠãªãããã³ã«ã瀺ããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">426 Upgrade Required</pre> + +<h2 id="Examples" name="Examples">äŸ</h2> + +<pre>HTTP/1.1 426 Upgrade Required +Upgrade: HTTP/2.0 +Connection: Upgrade +Content-Length: 53 +Content-Type: text/plain + +This service requires use of the HTTP/2.0 protocol</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "426 Upgrade Required" , "6.5.15")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Upgrade")}}</li> + <li>{{HTTPStatus("101")}} <code>Switching Protocol</code></li> +</ul> diff --git a/files/ja/web/http/status/428/index.html b/files/ja/web/http/status/428/index.html new file mode 100644 index 0000000000..584859f5aa --- /dev/null +++ b/files/ja/web/http/status/428/index.html @@ -0,0 +1,45 @@ +--- +title: 428 Precondition Required +slug: Web/HTTP/Status/428 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/428 +--- +<p>{{HTTPSidebar}}</p> + +<p>HTTP <code><strong>428 Precondition Required</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ããµãŒããŒããªã¯ãšã¹ãã<a href="/ja/docs/Web/HTTP/Conditional_requests">æ¡ä»¶ä»ã</a>ã«ããå¿
èŠãããããšã瀺ããŸãã</p> + +<p>éåžžããã㯠{{HTTPHeader("If-Match")}} ã®ãããªå¿
é ã®åææ¡ä»¶ããããŒã<strong>ãªã</strong>ããšãæå³ããŸãã</p> + +<p>åææ¡ä»¶ããããŒããµãŒããŒåŽã®ç¶æ
ãš<strong>äžèŽããªã</strong>å Žåãã¬ã¹ãã³ã¹ã¯ {{HTTPStatus(412)}} <code>Precondition Failed</code> ã§ããå¿
èŠããããŸãã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">428 Precondition Required</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("6585", "428 Precondition Required" , "3")}}</td> + <td>Additional HTTP Status Codes</td> + </tr> + </tbody> +</table> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li><a href="/en-US/docs/Web/HTTP/Conditional_requests">HTTP conditional requests</a></li> + <li>{{HTTPHeader("If-Match")}}</li> + <li>{{HTTPStatus(412)}}</li> +</ul> diff --git a/files/ja/web/http/status/429/index.html b/files/ja/web/http/status/429/index.html new file mode 100644 index 0000000000..cb0a031143 --- /dev/null +++ b/files/ja/web/http/status/429/index.html @@ -0,0 +1,51 @@ +--- +title: 429 Too Many Requests +slug: Web/HTTP/Status/429 +tags: + - Client error + - HTTP + - HTTP Status Code + - Reference + - Status code +translation_of: Web/HTTP/Status/429 +--- +<div>{{HTTPSidebar}}</div> + +<p>HTTP <code><strong>429 Too Many Requests</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ããŠãŒã¶ãŒãæå®ãããæéå
ã«å€ãã®ãªã¯ãšã¹ããéä¿¡ãã ("rate limiting") ããšã瀺ããŸãã</p> + +<p>æ°ãããªã¯ãšã¹ããè¡ãåã«ã©ã®ãããåŸ
ã€ãã瀺ã {{HTTPHeader("Retry-After")}} ãããããã®ã¬ã¹ãã³ã¹ã«å«ããããšãã§ããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">429 Too Many Requests</pre> + +<h2 id="Example" name="Example">äŸ</h2> + +<pre class="notranslate">HTTP/1.1 429 Too Many Requests +Content-Type: text/html +Retry-After: 3600</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("6585", "429 Too Many Requests" , "4")}}</td> + <td>Additional HTTP Status Codes</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Retry-After")}}</li> + <li><a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" rel="noopener">HTTP/1.1: Status Code Definitions</a></li> + <li>Python solution: <a href="https://stackoverflow.com/questions/22786068/how-to-avoid-http-error-429-too-many-requests-python">How to avoid HTTP error 429 python</a></li> +</ul> diff --git a/files/ja/web/http/status/431/index.html b/files/ja/web/http/status/431/index.html new file mode 100644 index 0000000000..e24f1f2509 --- /dev/null +++ b/files/ja/web/http/status/431/index.html @@ -0,0 +1,51 @@ +--- +title: 431 Request Header Fields Too Large +slug: Web/HTTP/Status/431 +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Reference + - ã¯ã©ã€ã¢ã³ããšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/431 +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary">HTTP ã® <code><strong>431 Request Header Fields Too Large</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ããªã¯ãšã¹ãã® <a href="/ja/docs/Web/HTTP/Headers">HTTP ããããŒ</a>ãé·ãããããã«ãµãŒããŒããªã¯ãšã¹ãã®åŠçãæåŠããããšã瀺ããŸãã</span>ããããŒãã£ãŒã«ããçž®å°ããäžã§ããªã¯ãšã¹ããåéä¿¡ãã<em>ããšãã§ããŸã</em>ã</p> + +<p>431 ã¯ãªã¯ãšã¹ãããããŒã®<strong>å
šäœã®å€§ãã</strong>ã倧ããããå Žåãã<strong>åäžã®</strong>ããããŒãã£ãŒã«ããé·ãããå Žåã«äœ¿çšããããšãã§ããŸãããã®ãšã©ãŒãçºçããå Žåã¯ãã¬ã¹ãã³ã¹æ¬æã§ãã®äºã€ã®åé¡ã®ã©ã¡ãã§ãããã瀺ããšåœ¹ç«ã¡ãŸãã â ã§ããã°ãã©ã®ããããŒãé·ãããã®ããå«ããã»ããããã§ããããããã«ãã£ãŠãŠãŒã¶ãŒããã¯ãããŒãæ¶å»ãããªã©ãåé¡ã®è§£æ±ºãè©Šã¿ãããšãã§ããŸãã</p> + +<p>ãµãŒããŒã¯æ¬¡ã®ãããªå Žåã«ããããã®ã¹ããŒã¿ã¹ãçæããŸãã</p> + +<ul> + <li>{{ httpheader("Referer") }} ã® URL ãé·ãããå Žå</li> + <li>ãã®ãªã¯ãšã¹ãã§éããã <a href="/ja/docs/Web/HTTP/Cookies">Cookie</a> ãå€ãããå Žå</li> +</ul> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">431 Request Header Fields Too Large</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("6585", "431 Request Header Fields Too Large" , "5")}}</td> + <td>Additional HTTP Status Codes</td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus(414, "414 URI Too Long")}}</li> + <li>{{Glossary("Request header")}}</li> +</ul> diff --git a/files/ja/web/http/status/451/index.html b/files/ja/web/http/status/451/index.html new file mode 100644 index 0000000000..c0a18466bf --- /dev/null +++ b/files/ja/web/http/status/451/index.html @@ -0,0 +1,72 @@ +--- +title: 451 Unavailable For Legal Reasons +slug: Web/HTTP/Status/451 +tags: + - Client error + - HTTP + - Reference + - Status code +translation_of: Web/HTTP/Status/451 +--- +<p>{{HTTPSidebar}}</p> + +<p>HyperText Transfer Protocol (HTTP) ã® <code><strong>451 Unavailable For Legal Reasons</strong></code> ã¯ãŠãŒã¶ãŒã®èŠæ±ãããªãœãŒã¹ãæ³ççç±ã§äœ¿çšã§ããªãå Žåã®ã¯ã©ã€ã¢ã³ããšã©ãŒã®ã¬ã¹ãã³ã¹ã³ãŒãã§ãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">451 Unavailable For Legal Reasons</pre> + +<h2 id="Example" name="Example">äŸ</h2> + +<p>ãã®ã¬ã¹ãã³ã¹äŸã¯ IETF RFC ææž (ãªã³ã¯ã¯åŸè¿°) ã«ãããã®ã§ãã¢ã³ãã£ã»ãã€ãœã³ã®{{interwiki("wikipedia", "Monty_Python's_Life_of_Brian", "ã©ã€ãã»ãªãã»ãã©ã€ã¢ã³")}}ããã®åŒçšãäŸã«çšããŠããŸãã</p> + +<p><strong>泚:</strong> ISP ã DNS ãµãŒããŒãªã©ãå®éã«ãŠãŒã¶ãŒã«ãããªãœãŒã¹ã®äœ¿çšãé»ãã§ããäž»äœã瀺ããšãã«ã¯ <code>rel="blocked-by"</code> ãšããå€ã®ã€ãã {{HTTPHeader("Link")}} HTTP ããããŒã䜿çšããŸãã</p> + +<p>ãªãœãŒã¹ã®äœ¿çšãé»ãã§ããæçµçãªåå ã¯ã<code>rel="blocked-by"</code> ã® {{HTTPHeader("Link")}}HTTP ããããŒã§ã¯ãªãã¬ã¹ãã³ã¹ã®æ¬äœã«èšèŒãããŸããããã¯å
容ã®åé€ãæ±ããæ³çãªè«æ±ãè¡ã£ãå人ãçµç¹ãªã©ãå«ãŸããŸãã</p> + +<pre class="notranslate">HTTP/1.1 451 Unavailable For Legal Reasons +Link: <https://spqr.example.org/legislatione>; rel="blocked-by" +Content-Type: text/html</pre> + +<pre class="notranslate"><html> + <head><title>Unavailable For Legal Reasons</title></head> + <body> + <h1>Unavailable For Legal Reasons</h1> + <p>This request may not be serviced in the Roman Province + of Judea due to the Lex Julia Majestatis, which disallows + access to resources hosted on servers deemed to be + operated by the People's Front of Judea.</p> + </body> +</html></pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7725", "451 Unavailable For Legal Reasons")}}</td> + <td>An HTTP Status Code to Report Legal Obstacles</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>以äžã«ç€ºãæ
å ±ã¯ã MDN ã® GitHub ããååŸãããã®ã§ãã (<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>).</p> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.451")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>ãŠã£ãããã£ã¢äžã® {{interwiki("wikipedia", "ja:HTTP_451", "HTTP 451")}} ã®èšäº</li> + <li>ãŠã£ãããã£ã¢äžã® {{interwiki("wikipedia", "ja:è¯æ°451床", "è¯æ°451床")}} ã®èšäº (ãã®ã¹ããŒã¿ã¹ã³ãŒãã®ç±æ¥)</li> +</ul> diff --git a/files/ja/web/http/status/500/index.html b/files/ja/web/http/status/500/index.html new file mode 100644 index 0000000000..0803928c2f --- /dev/null +++ b/files/ja/web/http/status/500/index.html @@ -0,0 +1,51 @@ +--- +title: 500 Internal Server Error +slug: Web/HTTP/Status/500 +tags: + - HTTP + - Server error + - Status code + - ãµãŒããŒãšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/500 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) ã® <code><strong>500 Internal Server Error</strong></code> ãµãŒããŒãšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ããµãŒããŒããªã¯ãšã¹ããå®è¡ã劚ããäºæããªãæ¡ä»¶ã«ééããããšã瀺ããŸãã</p> + +<p>ãã®ãšã©ãŒã¬ã¹ãã³ã¹ã¯äžè¬ç㪠"catch-all" ã¬ã¹ãã³ã¹ã§ããæ®éãããã¯ãµãŒããŒãã¬ã¹ãã³ã¹ã«å¯ŸããŠããé©å㪠5xx ã®ãšã©ãŒã³ãŒããèŠã€ããããšãã§ããªãã£ãããšã瀺ããŸãããµãŒããŒã®ç®¡çè
ã¯ãã¹ããŒã¿ã¹ã³ãŒã 500 ã®ãããªãšã©ãŒã¬ã¹ãã³ã¹ããªã¯ãšã¹ãã«é¢ãã詳现æ
å ±ãšå
±ã«èšé²ããå°æ¥åããšã©ãŒãçºçããããšãé²ãå ŽåããããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">500 Internal Server Error</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "500 Internal Server Error" , "6.6.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>以äžã«ç€ºãæ
å ±ã¯ã MDN ã® GitHub ããååŸãããã®ã§ãã (<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>).</p> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.500")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" rel="noopener">HTTP/1.1: Status Code Definitions</a></li> +</ul> diff --git a/files/ja/web/http/status/501/index.html b/files/ja/web/http/status/501/index.html new file mode 100644 index 0000000000..09dd77259f --- /dev/null +++ b/files/ja/web/http/status/501/index.html @@ -0,0 +1,54 @@ +--- +title: 501 Not Implemented +slug: Web/HTTP/Status/501 +tags: + - HTTP + - Server error + - Status code +translation_of: Web/HTTP/Status/501 +--- +<div>{{HTTPSidebar}}</div> + +<p><span class="seoSummary">HyperText Transfer Protocol (HTTP) ã® <code><strong>501 Not Implemented</strong></code> ãµãŒããŒãšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ã<strong>ãµãŒããŒããªã¯ãšã¹ããæºããã®ã«å¿
èŠãªæ©èœã«å¯Ÿå¿ããŠããªãããš</strong>ã瀺ããŸãã</span></p> + +<p>ãã®ã¹ããŒã¿ã¹ã¯ {{HTTPHeader("Retry-After")}} ããããŒãéä¿¡ããããšãã§ãããã€ãŸã§ã«æ©èœãæ©èœããµããŒããããŠãããã©ããã確èªããããã®ãã§ãã¯ããã¯ã®ã¿ã€ãã³ã°ãèŠæ±å
ã«äŒããããšãã§ããŸãã</p> + +<p><code>501</code> ã¯ããµãŒããŒããªã¯ãšã¹ãã¡ãœãããç解ã§ããããããªãœãŒã¹ã«å¯ŸããŠå¯Ÿå¿ããããšãã§ããªãå Žåã®ã¬ã¹ãã³ã¹ã«é©åã§ãããµãŒããŒã察å¿ããå¿
èŠããã (ãããã£ãŠã <code>501</code> ãè¿ãå¿
èŠããªã) ã¡ãœãã㯠{{HTTPMethod("GET")}} ãš {{HTTPMethod("HEAD")}} ã ãã§ãã</p> + +<p>ãµãŒããŒããã®ã¡ãœãããç解ããŠ<em>ããŠ</em>ãæå³çã«å¯Ÿå¿ããŠããªãå Žåã¯ãé©åãªã¬ã¹ãã³ã¹ã¯ {{HTTPStatus(405, "405 Method Not Allowed")}} ã§ãã</p> + +<div class="note"> +<ul> + <li>501 ãšã©ãŒã¯ä¿®æ£ã§ãããã®ã§ã¯ãããŸããããã¢ã¯ã»ã¹ããããšããŠãããŠã§ããµãŒããŒã§ä¿®æ£ãå¿
èŠã§ãã</li> + <li>501 ã¬ã¹ãã³ã¹ã¯ããã®ä»ã®ããããŒã®ãã£ãã·ã¥ã®æ瀺ããªãéããæ¢å®ã§ãã£ãã·ã¥å¯èœã§ãã</li> +</ul> +</div> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">501 Not Implemented</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "501 Not Implemented" , "6.6.2")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>以äžã«ç€ºãæ
å ±ã¯ã MDN ã® GitHub ããååŸãããã®ã§ãã (<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>).</p> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.501")}}</p> diff --git a/files/ja/web/http/status/502/index.html b/files/ja/web/http/status/502/index.html new file mode 100644 index 0000000000..48977af070 --- /dev/null +++ b/files/ja/web/http/status/502/index.html @@ -0,0 +1,55 @@ +--- +title: 502 Bad Gateway +slug: Web/HTTP/Status/502 +tags: + - HTTP + - Server error + - Status code + - ãµãŒããŒãšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/502 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) ã® <code><strong>502 Bad Gateway</strong></code> ãµãŒããŒãšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ãã²ãŒããŠã§ã€ãŸãã¯ãããã·ãšããŠæ©èœããŠãããµãŒããŒãäžæµã®ãµãŒããŒããç¡å¹ãªã¬ã¹ãã³ã¹ãåãåã£ãããšã瀺ããŠããŸãã</p> + +<div class="note"> +<p><strong>ã¡ã¢:</strong> {{interwiki("wikipedia", "Gateway_(telecommunications)", "ã²ãŒããŠã§ã€")}}ã¯ãããã¯ãŒã¯ã®æ§ã
ãªãã®ãæãå¯èœæ§ãããã 502 ãšã©ãŒã¯éåžžä¿®æ£ã§ãããã®ã§ã¯ãããŸãããããŠã§ããµãŒããŒãŸãã¯ã¢ã¯ã»ã¹ãäžç¶ãããããšããŠãããããã·ã«ããä¿®æ£ãå¿
èŠã§ãã</p> +</div> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">502 Bad Gateway +</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "502 Bad Gateway" , "6.6.3")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>以äžã«ç€ºãæ
å ±ã¯ã MDN ã® GitHub ããååŸãããã®ã§ãã (<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>).</p> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status.502")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPStatus(504)}}</li> + <li><a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" rel="noopener">HTTP/1.1: Status Code Definitions</a></li> +</ul> diff --git a/files/ja/web/http/status/503/index.html b/files/ja/web/http/status/503/index.html new file mode 100644 index 0000000000..23d6ea8581 --- /dev/null +++ b/files/ja/web/http/status/503/index.html @@ -0,0 +1,59 @@ +--- +title: 503 Service Unavailable +slug: Web/HTTP/Status/503 +tags: + - HTTP + - Reference + - Server error + - Status code + - ãµãŒããŒãšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/503 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) ã® <code><strong>503 Service Unavailable</strong></code> ãµãŒããŒãšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã§ããµãŒããŒããªã¯ãšã¹ããåŠçããæºåãã§ããŠããªãããšã瀺ããŸãã</p> + +<p>äžè¬çãªåå ã¯ããµãŒããŒãã¡ã³ããã³ã¹äžã®ããã«åæ¢ããŠããããšããéè² è·ç¶æ
ã«ãªã£ãŠããããšã§ãããã®ã¬ã¹ãã³ã¹ã¯ãäžæçãªæ¡ä»¶ã«äœ¿çšããå¿
èŠãããã {{HTTPHeader("Retry-After")}} HTTP ããããŒã«ã¯ãããå¯èœã§ããã°ããµãŒãã¹ã®åŸ©æ§ã«èŠããäºæ³æéãå«ããã¹ãã§ãã</p> + +<div class="note"> +<p><strong>ã¡ã¢:</strong> ãã®ã¬ã¹ãã³ã¹ãšå
±ã«ãåé¡ãåããããã説æããããŒãžãéä¿¡ããå¿
èŠããããŸãã</p> +</div> + +<p>503 ã®ã¹ããŒã¿ã¹ã¯ãã°ãã°äžæçãªç¶æ
ã§ãããã¬ã¹ãã³ã¹ã¯é »ç¹ã«ãã£ãã·ã¥ãããã¹ãã§ã¯ãªãããããã®ã¬ã¹ãã³ã¹ãšå
±ã«éä¿¡ããããã£ãã·ã¥é¢é£ã®ããããŒã¯æ³šæããå¿
èŠããããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">503 Service Unavailable</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "503 Service Unavailable" , "6.6.4")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>以äžã«ç€ºãæ
å ±ã¯ã MDN ã® GitHub ããååŸãããã®ã§ãã (<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>).</p> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.503")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Retry-After")}}</li> + <li><a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP/1.1: Status Code Definitions</a></li> +</ul> diff --git a/files/ja/web/http/status/504/index.html b/files/ja/web/http/status/504/index.html new file mode 100644 index 0000000000..cea5ed169b --- /dev/null +++ b/files/ja/web/http/status/504/index.html @@ -0,0 +1,54 @@ +--- +title: 504 Gateway Timeout +slug: Web/HTTP/Status/504 +tags: + - HTTP + - Server error + - Status code + - ãµãŒããŒãšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/504 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) <code><strong>504 Gateway Timeout</strong></code> ãµãŒããŒãšã©ãŒã¬ã¹ãã³ã¹ã³ãŒãã¯ããµãŒããŒãã²ãŒããŠã§ã€ãŸãã¯ãããã·ãšããŠæ©èœããŠãããšãã«ããªã¯ãšã¹ããå®äºããããã«å¿
èŠãªäžæµã®ãµãŒããŒããã®ã¬ã¹ãã³ã¹ãæéå
ã«åŸãããªãã£ãããšã瀺ããŸãã</p> + +<div class="note"> +<p><strong>ã¡ã¢</strong>: {{interwiki("wikipedia", "Gateway_(telecommunications)", "ã²ãŒããŠã§ã€")}}ã¯ãããã¯ãŒã¯å
ã®æ§ã
ãªãã®ãæãå¯èœæ§ãããã 504 ãšã©ãŒã¯ãµã€ããèªåã§ä¿®æ£ã§ãããã®ã§ã¯ãããŸããããã¢ã¯ã»ã¹ããããšããŠãããŠã§ããµãŒããŒããããã·ã§ä¿®æ£ããå¿
èŠããããŸãã</p> +</div> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">504 Gateway Timeout</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("7231", "504 Gateway Timeout" , "6.6.5")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<p>以äžã«ç€ºãæ
å ±ã¯ã MDN ã® GitHub ããååŸãããã®ã§ãã (<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>).</p> + +<p class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</p> + +<p>{{Compat("http.status.504")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" rel="noopener">HTTP/1.1: Status Code Definitions</a></li> + <li>{{HTTPStatus(502)}}</li> +</ul> diff --git a/files/ja/web/http/status/505/index.html b/files/ja/web/http/status/505/index.html new file mode 100644 index 0000000000..4aee2ab633 --- /dev/null +++ b/files/ja/web/http/status/505/index.html @@ -0,0 +1,38 @@ +--- +title: 505 HTTP Version Not Supported +slug: Web/HTTP/Status/505 +tags: + - HTTP + - ãµãŒããŒãšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/505 +--- +<p>{{HTTPSidebar}}</p> + +<p>HyperText Transfer Protocol (HTTP) <code><strong>505 HTTP Version Not Supported</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ããªã¯ãšã¹ãã§äœ¿çšãããŠãã HTTP ããŒãžã§ã³ããµãŒããŒã«ãã£ãŠãµããŒããããŠããªãããšã瀺ããŸãã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">505 HTTP Version Not Supported</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("7231", "505 HTTP Version Not Supported" , "6.6.6")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td> + </tr> + </tbody> +</table> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{HTTPHeader("Upgrade")}}</li> +</ul> diff --git a/files/ja/web/http/status/506/index.html b/files/ja/web/http/status/506/index.html new file mode 100644 index 0000000000..675a5ba587 --- /dev/null +++ b/files/ja/web/http/status/506/index.html @@ -0,0 +1,35 @@ +--- +title: 506 Variant Also Negotiates +slug: Web/HTTP/Status/506 +tags: + - HTTP + - Server error + - Status code +translation_of: Web/HTTP/Status/506 +--- +<div>{{HTTPSidebar}}</div> + +<p>The HyperText Transfer Protocol (HTTP) <code><strong>506 Variant Also Negotiates</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ãééçã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ (<strong>transparent content negotiation</strong>) ã®ã³ã³ããã¹ãã§æäŸãããå ŽåããããŸã (åç
§ <a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>)ããã®ãããã³ã«ã¯ããµãŒããŒãè€æ°ã®ããªã¢ã³ãã«å¯Ÿå¿ããŠããå Žåã«ãã¯ã©ã€ã¢ã³ããäžãããããªãœãŒã¹ã®æè¯ã®ããªã¢ã³ããååŸããããšãå¯èœã«ããŸãã</p> + +<p><code><strong>Variant Also Negotiates</strong></code> ã¹ããŒã¿ã¹ã³ãŒãã¯ãéžæãããããªã¢ã³ãèªäœãã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³ã«é¢äžããããã«æ§æãããŠãããããé©åãªããŽã·ãšãŒã·ã§ã³ãšã³ããã€ã³ãã§ã¯ãªãå
éšãµãŒããŒæ§æãšã©ãŒã瀺ããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">506 Variant Also Negotiates</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("2295", "506 Variant Also Negotiates" , "8.1")}}</td> + <td>Transparent Content Negotiation in HTTP</td> + </tr> + </tbody> +</table> diff --git a/files/ja/web/http/status/507/index.html b/files/ja/web/http/status/507/index.html new file mode 100644 index 0000000000..9f3c7bffc1 --- /dev/null +++ b/files/ja/web/http/status/507/index.html @@ -0,0 +1,35 @@ +--- +title: 507 Insufficient Storage +slug: Web/HTTP/Status/507 +tags: + - HTTP + - Server error + - Status code +translation_of: Web/HTTP/Status/507 +--- +<div>{{HTTPSidebar}}</div> + +<p>The HyperText Transfer Protocol (HTTP) <code><strong>507 Insufficient Storage</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ãWeb Distributed Authoring and Versioning (WebDAV) ãããã³ã«ã®ã³ã³ããã¹ãã§æäŸãããå ŽåããããŸãã (åç
§ <a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>)</p> + +<p>ãµãŒããŒãããªã¯ãšã¹ããæ£åžžçµäºããããã«å¿
èŠãªè¡šçŸãä¿åã§ããªããããã¡ãœãããå®è¡ã§ããªãã£ãããšã瀺ããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">507 Insufficient Storage</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("4918", "507 Insufficient Storage" , "11.5")}}</td> + <td>Web Distributed Authoring and Versioning</td> + </tr> + </tbody> +</table> diff --git a/files/ja/web/http/status/508/index.html b/files/ja/web/http/status/508/index.html new file mode 100644 index 0000000000..6e46ceeec4 --- /dev/null +++ b/files/ja/web/http/status/508/index.html @@ -0,0 +1,38 @@ +--- +title: 508 Loop Detected +slug: Web/HTTP/Status/508 +tags: + - '508' + - HTTP + - Server error + - Status code + - ãµãŒããŒãšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã +translation_of: Web/HTTP/Status/508 +--- +<div>{{HTTPSidebar}}</div> + +<p>The HyperText Transfer Protocol (HTTP) ã® <code><strong>508 Loop Detected</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ã Web Distributed Authoring and Versioning (WebDAV) ãããã³ã«ã®æèã§çºçããå¯èœæ§ããããŸãã</p> + +<p>ãã㯠"Depth: infinity" ãã€ãããªã¯ãšã¹ããåŠçããéã«ç¡éã«ãŒãã«é¥ã£ãããã«ããµãŒããŒãæäœãçµäºãããããšã瀺ããŸãããã®ã¹ããŒã¿ã¹ã¯æäœå
šäœã倱æããããšã瀺ããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">508 Loop Detected</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§æž</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">é¡å</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC("5842", "508 Loop Detected" , "7.2")}}</td> + <td>Web Distributed Authoring and Versioning</td> + </tr> + </tbody> +</table> diff --git a/files/ja/web/http/status/510/index.html b/files/ja/web/http/status/510/index.html new file mode 100644 index 0000000000..d6534b2037 --- /dev/null +++ b/files/ja/web/http/status/510/index.html @@ -0,0 +1,33 @@ +--- +title: 510 Not Extended +slug: Web/HTTP/Status/510 +tags: + - HTTP + - Server error + - Status code +translation_of: Web/HTTP/Status/510 +--- +<div>{{HTTPSidebar}}</div> + +<p>HyperText Transfer Protocol (HTTP) ã® <strong><code>510 Not Extended</code></strong> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ã<a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a> ãå®çŸ©ãã HTTP æ¡åŒµãã¬ãŒã ã¯ãŒã¯ã®ã³ã³ããã¹ãã§éä¿¡ãããŸãã</p> + +<p>ãã®ä»æ§ã§ã¯ãã¯ã©ã€ã¢ã³ãã¯ã䜿çšããæ¡åŒµãèšè¿°ããæ¡åŒµå®£èšãå«ããªã¯ãšã¹ããéä¿¡ã§ããŸãã ãµãŒããŒããã®ãããªãªã¯ãšã¹ããåä¿¡ããŠããèšè¿°ãããŠããæ¡åŒµããã®ãªã¯ãšã¹ãã«å¯ŸããŠãµããŒãããŠããªãå ŽåããµãŒããŒã¯ 510 ã¹ããŒã¿ã¹ã³ãŒãã§å¿çããŸãã</p> + +<h2 id="Status" name="Status">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox notranslate">510 Not Extended</pre> + +<h2 id="Specifications" name="Specifications">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("2774", "510 Not Extended" , "7")}}</td> + <td>An HTTP Extension Framework</td> + </tr> + </tbody> +</table> diff --git a/files/ja/web/http/status/511/index.html b/files/ja/web/http/status/511/index.html new file mode 100644 index 0000000000..14d0adeba4 --- /dev/null +++ b/files/ja/web/http/status/511/index.html @@ -0,0 +1,43 @@ +--- +title: 511 Network Authentication Required +slug: Web/HTTP/Status/511 +tags: + - HTTP + - HTTPã¹ããŒã¿ã¹ã³ãŒã + - ãµãŒããŒãšã©ãŒ + - ã¹ããŒã¿ã¹ã³ãŒã + - ãªãã¡ã¬ã³ã¹ +translation_of: Web/HTTP/Status/511 +--- +<p>{{HTTPSidebar}}</p> + +<p>HTTP <code><strong>511 Network Authentication Required</strong></code> ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ãã¯ã©ã€ã¢ã³ãããããã¯ãŒã¯ã¢ã¯ã»ã¹ãååŸããããã«èªèšŒããå¿
èŠãããããšã瀺ããŸãã</p> + +<p>ãã®ç¶æ
ã¯ããªãªãžã³ãµãŒããŒã«ãã£ãŠçæãããã®ã§ã¯ãªãããããã¯ãŒã¯ãžã®ã¢ã¯ã»ã¹ãå¶åŸ¡ãããããã·ãã€ã³ã¿ãŒã»ããããããšã«ãã£ãŠçæãããŸãã</p> + +<p>ãããã¯ãŒã¯ãªãã¬ãŒã¿ã¯ãã¢ã¯ã»ã¹ãèš±å¯ããå (ã€ã³ã¿ãŒãããã«ãã§ã空枯ãªã©ã§) ã«äœããã®èªèšŒãæ¡ä»¶ã®åãå
¥ãããŸãã¯ãã®ä»ã®ãŠãŒã¶ãŒå¯Ÿè©±ãå¿
èŠãšããããšããããŸãã圌ãã¯ãã°ãã°ãMedia Access Control ({{Glossary("MAC")}}) ã¢ãã¬ã¹ã䜿çšããŠããªãã¯ã©ã€ã¢ã³ããèå¥ããŸãã</p> + +<h2 id="ã¹ããŒã¿ã¹">ã¹ããŒã¿ã¹</h2> + +<pre class="syntaxbox">511 Network Authentication Required</pre> + +<h2 id="ä»æ§">ä»æ§</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">ä»æ§æž</th> + <th scope="col">ã¿ã€ãã«</th> + </tr> + <tr> + <td>{{RFC("6585", "511 Network Authentication Required" , "6")}}</td> + <td>Additional HTTP Status Codes</td> + </tr> + </tbody> +</table> + +<h2 id="é¢é£æ
å ±">é¢é£æ
å ±</h2> + +<ul> + <li>{{Glossary("Proxy server")}}</li> +</ul> diff --git a/files/ja/web/http/status/index.html b/files/ja/web/http/status/index.html new file mode 100644 index 0000000000..39478f7b18 --- /dev/null +++ b/files/ja/web/http/status/index.html @@ -0,0 +1,201 @@ +--- +title: HTTP ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒã +slug: Web/HTTP/Status +tags: + - HTTP + - HTTP ã¹ããŒã¿ã¹ã³ãŒã + - Landing + - Reference + - ãŠã§ã + - ã¹ããŒã¿ã¹ã³ãŒã + - æŠèŠ +translation_of: Web/HTTP/Status +--- +<div>{{HTTPSidebar}}</div> + +<p class="summary"><span class="seoSummary">HTTP ã¬ã¹ãã³ã¹ã¹ããŒã¿ã¹ã³ãŒãã¯ãç¹å®ã® <a href="/ja/docs/Web/HTTP">HTTP</a> ãªã¯ãšã¹ããæ£åžžã«å®äºããã©ããã瀺ããŸããã¬ã¹ãã³ã¹ã¯ 5 ã€ã®ã¯ã©ã¹ã«åé¡ãããŠããŸãã</span></p> + +<ol> + <li><span class="seoSummary">æ
å ±ã¬ã¹ãã³ã¹ (<code>100</code>â<code>199</code>), </span></li> + <li><span class="seoSummary">æåã¬ã¹ãã³ã¹ (<code>200</code>â<code>299</code>), </span></li> + <li><span class="seoSummary">ãªãã€ã¬ã¯ã (<code>300</code>â<code>399</code>), </span></li> + <li><span class="seoSummary">ã¯ã©ã€ã¢ã³ããšã©ãŒ (<code>400</code>â<code>499</code>), </span></li> + <li><span class="seoSummary">ãµãŒããšã©ãŒ (<code>500</code>â<code>599</code>)</span></li> +</ol> + +<p>以äžã®ã¹ããŒã¿ã¹ã³ãŒã㯠<a href="https://tools.ietf.org/html/rfc2616#section-10">RFC 2616 ã®ç¬¬10ç« </a>ã§å®çŸ©ãããŠããŸããæŽæ°çã®ä»æ§æžã¯ <a href="https://tools.ietf.org/html/rfc7231#section-6.5.1">RFC 7231</a> ã«ãããŸãã</p> + +<div class="blockIndicator note"> +<p>ãã®äžèŠ§ã«ãªãã¬ã¹ãã³ã¹ãåãåã£ãå Žåãããã¯æšæºå€ã®ã¬ã¹ãã³ã¹ã§ããããããããã®ãµãŒããŒãœãããŠã§ã¢ã«åºæã®ãã®ã§ãã</p> +</div> + +<h2 id="Information_responses" name="Information_responses">æ
å ±ã¬ã¹ãã³ã¹</h2> + +<dl> + <dt>{{HTTPStatus(100, "100 Continue")}}</dt> + <dd>ããã¯æ«å®ã¬ã¹ãã³ã¹ã§ããã®æç¹ãŸã§ã®ãã¹ãŠã«åé¡ããªããã¯ã©ã€ã¢ã³ãã¯ãªã¯ãšã¹ããç¶ç¶ããŠããããŸããããªã¯ãšã¹ããå®äºããŠããå Žåã¯ã¬ã¹ãã³ã¹ãç¡èŠããŠããããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(101, "101 Switching Protocol")}}</dt> + <dd>ãã®ã³ãŒãã¯ã¯ã©ã€ã¢ã³ãããã® {{HTTPHeader("Upgrade")}} ãªã¯ãšã¹ãããããŒã®ã¬ã¹ãã³ã¹ãšããŠéä¿¡ããããµãŒããŒã¯ãããã³ã«ãåãæ¿ããŠããããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(102, "102 Processing")}} ({{Glossary("WebDAV")}})</dt> + <dd>ãã®ã³ãŒãã¯ããµãŒããŒã¯ãªã¯ãšã¹ããåãåã£ãŠåŠçããŠãããããŸã ã¬ã¹ãã³ã¹ãæäŸã§ããªãããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(103, "103 Early Hints")}}</dt> + <dd>ãã®ã¹ããŒã¿ã¹ã³ãŒãã¯äž»ã« {{HTTPHeader("Link")}} ããããŒãšãšãã«äœ¿çšããããµãŒããŒããªãœãŒã¹ãæºåããŠããéããŠãŒã¶ãŒãšãŒãžã§ã³ãããªãœãŒã¹ã®<a href="/ja/docs/Web/HTML/Preloading_content">å
èªã¿</a>ãéå§ã§ããããã«ããããã®ãã®ã§ãã</dd> +</dl> + +<h2 id="Successful_responses" name="Successful_responses">æåã¬ã¹ãã³ã¹</h2> + +<dl> + <dt>{{HTTPStatus(200, "200 OK")}}</dt> + <dd>ãªã¯ãšã¹ããæåããããšã瀺ããŸããæåãæå³ããããšã¯ã HTTP ã¡ãœããã«ããç°ãªããŸãã + <ul> + <li><code>GET</code>: ãªãœãŒã¹ãèªã¿èŸŒãŸããã¡ãã»ãŒãžæ¬æã§è»¢éãããã</li> + <li><code>HEAD</code>: ã¡ãã»ãŒãžæ¬æã«ãšã³ãã£ãã£ããããŒããã</li> + <li><code>PUT</code> ãŸã㯠<code>POST</code>: æäœã®çµæãè¡šããªãœãŒã¹ãã¡ãã»ãŒãžæ¬æã§éä¿¡ãããã</li> + <li><code>TRACE</code>: ã¡ãã»ãŒãžæ¬æã«ããµãŒããŒãåãåã£ããªã¯ãšã¹ãã¡ãã»ãŒãžãå«ãŸããŠããã</li> + </ul> + </dd> + <dt>{{HTTPStatus(201, "201 Created")}}</dt> + <dd>ãªã¯ãšã¹ãã¯æåãããã®çµææ°ããªãªãœãŒã¹ãäœæãããããšã瀺ããŸããããã¯äžè¬çã«ã POST ãªã¯ãšã¹ãããäžéšã® PUT ãªã¯ãšã¹ããéä¿¡ããåŸã®ã¬ã¹ãã³ã¹ã«ãªããŸãã</dd> + <dt>{{HTTPStatus(202, "202 Accepted")}}</dt> + <dd>ãªã¯ãšã¹ãã¯åçããããããŸã å®è¡ãããŠããªãããšã瀺ããŸããããã¯ãããŸãã§ããããªããªã HTTP ã§ã¯ãªã¯ãšã¹ããåŠçããçµæã瀺ãéåæãªã¬ã¹ãã³ã¹ãåŸããéä¿¡ããæ¹æ³ããªãããã§ãããªã¯ãšã¹ãã¯å¥ã®ããã»ã¹ããµãŒããŒãåŠçããããŸãã¯ãããåŠçããäºå®ã§ãã</dd> + <dt>{{HTTPStatus(203, "203 Non-Authoritative Information")}}</dt> + <dd>ãã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ãè¿ãããã¡ã¿æ
å ±ã®ã»ãããçæå
ã®ãµãŒããŒããåŸãããã»ãããšåäžã§ã¯ãªããããŒã«ã«ãŸãã¯ç¬¬äžè
ã®æã€è€è£œããåéããããšãè¡šããŸããããã¯äž»ã«ãä»ã®ãªãœãŒã¹ã®ãã©ãŒãããã¯ã¢ããã䜿çšãããšãã«äœ¿çšãããŸãããã®ãããªå Žå以å€ã¯ããã®ã¹ããŒã¿ã¹ãã "200 OK" ã®ã»ãã奜ãŸããã¬ã¹ãã³ã¹ã§ãã</dd> + <dt>{{HTTPStatus(204, "204 No Content")}}</dt> + <dd>ãªã¯ãšã¹ãã«å¯ŸããŠéä¿¡ããã³ã³ãã³ãã¯ãããŸããããããããŒã¯æçšã§ããããšã瀺ããŸãããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãã®ãªãœãŒã¹ã«é¢ãããã£ãã·ã¥æžã¿ã®ããããŒããæ°ããªå
容ã«æŽæ°ããŸãã</dd> + <dt>{{HTTPStatus(205, "205 Reset Content")}}</dt> + <dd>ãŠãŒã¶ãŒãšãŒãžã§ã³ãã«å¯Ÿãããªã¯ãšã¹ããéä¿¡ããææžããªã»ããããããäŒéããŸãã</dd> + <dt>{{HTTPStatus(206, "206 Partial Content")}}</dt> + <dd>ãã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ãã¯ã©ã€ã¢ã³ãã {{HTTPHeader("Range")}} ããããŒãéä¿¡ãããªãœãŒã¹ã®äžéšã ãããªã¯ãšã¹ãããæã«äœ¿çšãããŸãã</dd> + <dt>{{HTTPStatus(207, "207 Multi-Status")}} ({{Glossary("WebDAV")}})</dt> + <dd>è€æ°ã®ã¹ããŒã¿ã¹ã³ãŒããããŠã¯ãŸãç¶æ³ã§ãè€æ°ã®ãªãœãŒã¹ã«é¢ããæ
å ±ãäŒããŸãã</dd> + <dt>{{HTTPStatus(208, "208 Already Reported")}} ({{Glossary("WebDAV")}})</dt> + <dd>åãã³ã¬ã¯ã·ã§ã³ã«ç¹°ãè¿ãè€æ°ã®ãã€ã³ãã£ã³ã°ããå
éšã¡ã³ããŒãåæããããšãé¿ããããã <code><dav:propstat></code> ã¬ã¹ãã³ã¹ãšã¬ã¡ã³ãã®å
éšã§äœ¿çšããŸãã</dd> + <dt>{{HTTPStatus(226, "226 IM Used")}} (<a href="https://tools.ietf.org/html/rfc3229">HTTP Delta encoding</a>)</dt> + <dd>ãµãŒããŒã¯ãªãœãŒã¹ãžã® <code>GET</code> ãªã¯ãšã¹ãã®åŠçãå®äºããŠãããã¬ã¹ãã³ã¹ã¯çŸåšã®ã€ã³ã¹ã¿ã³ã¹ã«é©çšããã 1 ã€ä»¥äžã® instance manipulation ã®çµæãè¡šããŸãã</dd> +</dl> + +<h2 id="Redirection_messages" name="Redirection_messages">ãªãã€ã¬ã¯ã·ã§ã³ã¡ãã»ãŒãž</h2> + +<dl> + <dt>{{HTTPStatus(300, "300 Multiple Choice")}}</dt> + <dd>ãªã¯ãšã¹ãã«å¯ŸããŠè€æ°ã®ã¬ã¹ãã³ã¹ãããããšã瀺ããŸãããŠãŒã¶ãŒãšãŒãžã§ã³ãããŠãŒã¶ãŒã¯ããããããã²ãšã€ãéžæããŸãã (è€æ°ã®ã¬ã¹ãã³ã¹ããã²ãšã€ãéžã¶æ¹æ³ã¯æšæºåãããŠããŸããããéžæè¢ãžãªã³ã¯ãã HTML ãæšå¥šãããŠãããããã«ãã£ãŠãŠãŒã¶ãŒãéžæããããšãã§ããŸãã)</dd> + <dt>{{HTTPStatus(301, "301 Moved Permanently")}}</dt> + <dd>ãªã¯ãšã¹ãããããªãœãŒã¹ã® URL ãæ°žé ã«å€æŽãããããšã瀺ããŸããã¬ã¹ãã³ã¹ã§æ°ãã URL ãäžããããŸãã</dd> + <dt>{{HTTPStatus(302, "302 Found")}}</dt> + <dd>ãã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ããªã¯ãšã¹ãããããªãœãŒã¹ã® URI ã<em>äžæçã«</em>å€æŽãããããšã瀺ããŸãã URI ã¯å°æ¥ãããã«å€æŽãããå¯èœæ§ããããŸããåŸã£ãŠãã¯ã©ã€ã¢ã³ãã¯å°æ¥ã®ãªã¯ãšã¹ãã§ãåã URI ã䜿çšããã¹ãã§ãã</dd> + <dt>{{HTTPStatus(303, "303 See Other")}}</dt> + <dd>ãµãŒããŒã¯ãã®ã¬ã¹ãã³ã¹ãããªã¯ãšã¹ãããããªãœãŒã¹ãå¥ã® URI 㧠GET ãªã¯ãšã¹ãã䜿çšããŠååŸããããã¯ã©ã€ã¢ã³ããèªå°ããããã«éä¿¡ããŸãã</dd> + <dt>{{HTTPStatus(304, "304 Not Modified")}}</dt> + <dd>ããã¯ãã£ãã·ã¥çšã«äœ¿çšããŸãããã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ã¯ã©ã€ã¢ã³ãã«å¯ŸããŠãã¬ã¹ãã³ã¹ã¯å€æŽãããŠããªãããšã瀺ããŸãããã£ãŠãã¯ã©ã€ã¢ã³ãã¯ãã£ãã·ã¥æžã¿ã®ã¬ã¹ãã³ã¹ã䜿ãç¶ããŸãã</dd> + <dt><code>305 Use Proxy</code> {{deprecated_inline}}</dt> + <dd>ããã¯æ§ããŒãžã§ã³ã® HTTP ä»æ§æžã§ããªã¯ãšã¹ããããã¬ã¹ãã³ã¹ã¯ãããã·ããã¢ã¯ã»ã¹ããªããã°ãªããªãããšã瀺ããŠããŸããããããã·ã®ã€ã³ãã³ãèšå®ã«é¢ããã»ãã¥ãªãã£ã®æžå¿µã«ããããã®ã¬ã¹ãã³ã¹ã³ãŒãã¯éæšå¥šã«ãªããŸããã</dd> + <dt><code>306 unused</code></dt> + <dd>ãã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ãã䜿çšããããäºçŽæžã¿ã§ãã HTTP/1.1 ä»æ§æžã®æ§ããŒãžã§ã³ã§ã¯äœ¿çšãããŠããŸããã</dd> + <dt>{{HTTPStatus(307, "307 Temporary Redirect")}}</dt> + <dd>ãµãŒããŒã¯ãã®ã¬ã¹ãã³ã¹ãããªã¯ãšã¹ãããããªãœãŒã¹ãå¥ã® URI ã§ãå
ã®ãªã¯ãšã¹ããšåãã¡ãœããã䜿çšããŠååŸããããã¯ã©ã€ã¢ã³ããèªå°ããããã«éä¿¡ããŸãããã㯠<code>302 Found</code> HTTP ã¬ã¹ãã³ã¹ã³ãŒããšåãæå³ãæã¡ãŸããããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯äœ¿çšãã HTTP ã¡ãœããã<em>å€æŽããŠã¯ãªããªã</em>ç¹ãç°ãªããŸããå§ãã®ãªã¯ãšã¹ã㧠<code>POST</code> ãçšããå Žåã¯ã次ã®ãªã¯ãšã¹ãã§ã <code>POST</code> ã䜿çšããªããã°ãªããŸããã</dd> + <dt>{{HTTPStatus(308, "308 Permanent Redirect")}}</dt> + <dd>ããã¯ããªãœãŒã¹ã <code>Location:</code> HTTP ã¬ã¹ãã³ã¹ããããŒã§æå®ããå¥ã® URI ãžæ°žç¶çã«çœ®ãããŠããããšã瀺ããŸãããã㯠<code>301 Moved Permanently</code> HTTP ã¬ã¹ãã³ã¹ã³ãŒããšåãæå³ãæã¡ãŸããããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯äœ¿çšãã HTTP ã¡ãœããã<em>å€æŽããŠã¯ãªããªã</em>ç¹ãç°ãªããŸããå§ãã®ãªã¯ãšã¹ã㧠<code>POST</code> ãçšããå Žåã¯ã次ã®ãªã¯ãšã¹ãã§ã <code>POST</code> ã䜿çšããªããã°ãªããŸããã</dd> +</dl> + +<h2 id="Client_error_responses" name="Client_error_responses">ã¯ã©ã€ã¢ã³ããšã©ãŒã¬ã¹ãã³ã¹</h2> + +<dl> + <dt>{{HTTPStatus(400, "400 Bad Request")}}</dt> + <dd>æ§æãç¡å¹ã§ãããããµãŒããŒããªã¯ãšã¹ããç解ã§ããªãããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(401, "401 Unauthorized")}}</dt> + <dd>HTTP æšæºã§ã¯ "unauthorized" (äžèš±å¯) ãšå®çŸ©ãããŠããŸãããæå³çã«ã¯ãã®ã¬ã¹ãã³ã¹ã¯ "unauthenticated" (æªèªèšŒ) ã§ããã€ãŸããã¯ã©ã€ã¢ã³ãã¯ãªã¯ãšã¹ããããã¬ã¹ãã³ã¹ãåŸãããã«ã¯èªèšŒãåããªããã°ãªããŸããã</dd> + <dt>{{HTTPStatus(402, "402 Payment Required")}} {{experimental_inline}}</dt> + <dd>ãã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ãå°æ¥ã®ããã«äºçŽãããŠããŸãããã®ã³ãŒãã¯åœåãããžã¿ã«æ±ºæžã·ã¹ãã ã§äœ¿çšããããã«äœæãããŸããããããçšã«ãã䜿çšãããŠããããæšæºçãªæ
£äŸã¯ãããŸããã</dd> + <dt>{{HTTPStatus(403, "403 Forbidden")}}</dt> + <dd>èªèšŒãããŠããªããªã©ã®çç±ã§ã¯ã©ã€ã¢ã³ãã«ã³ã³ãã³ãã®ã¢ã¯ã»ã¹æš©ããªãããµãŒããŒãé©åãªã¬ã¹ãã³ã¹ã®è¿ä¿¡ãæåŠããŠããããšã瀺ããŸãã 401 ãšã¯ç°ãªããã¯ã©ã€ã¢ã³ãã®èå¥åããµãŒããŒã«ç¥ãããŠããŸãã</dd> + <dt>{{HTTPStatus(404, "404 Not Found")}}</dt> + <dd>ãµãŒããŒããªã¯ãšã¹ãããããªãœãŒã¹ãçºèŠã§ããªãããšã瀺ããŸãããã©ãŠã¶ãŒã§ã¯ããã㯠URL ã解éã§ããªãã£ãããšãæå³ããŸãã API ã§ã¯ãããã¯éä¿¡å
ãæå¹ã§ãããã®ã®ããªãœãŒã¹èªäœãååšããªãããšãæå³ããããšããããŸãããµãŒããŒã¯èªèšŒãããŠããªãã¯ã©ã€ã¢ã³ããããªãœãŒã¹ã®ååšãé ãããã«ã 403 ã®ä»£ããã«ãã®ã¬ã¹ãã³ã¹ãè¿ãããšããããŸãããã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ãŠã§ãã§é »ç¹ã«èŠãããããããããããã£ãšãæåãªã³ãŒãã§ãããã</dd> + <dt>{{HTTPStatus(405, "405 Method Not Allowed")}}</dt> + <dd>ãµãŒããŒããªã¯ãšã¹ãã¡ãœãããç解ããŠãããã®ã®ãç¡å¹ã«ãããŠãã䜿çšããããšãã§ããŸãããäŸãã°ã API ããªãœãŒã¹ã DELETE ããããšãçŠæ¢ã§ããŸãã <code>GET</code> ããã³ <code>HEAD</code> ã®äºã€ã¯å¿
é ã§ãç¡å¹ã«ããããšãã§ããããã®ãšã©ãŒã³ãŒããè¿ããŠã¯ãããŸããã</dd> + <dt>{{HTTPStatus(406, "406 Not Acceptable")}}</dt> + <dd>ãã®ã¬ã¹ãã³ã¹ã¯ããŠã§ããµãŒããŒã <a href="/ja/docs/HTTP/Content_negotiation#Server-driven_negotiation">ãµãŒããŒé§ååã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³</a> ãè¡ã£ãçµæããŠãŒã¶ãŒãšãŒãžã§ã³ãããäžããããæ¡ä»¶ã«åãã³ã³ãã³ããèŠã€ãããªãå Žåã«éä¿¡ãããŸãã</dd> + <dt>{{HTTPStatus(407, "407 Proxy Authentication Required")}}</dt> + <dd>ãã㯠401 ã«äŒŒãŠããŸããããããã·ãµãŒããŒãèªèšŒãèŠæ±ããŠããç¹ãç°ãªããŸãã</dd> + <dt>{{HTTPStatus(408, "408 Request Timeout")}}</dt> + <dd>ãã®ã¬ã¹ãã³ã¹ã¯ã¯ã©ã€ã¢ã³ãã以åã«ãªã¯ãšã¹ããè¡ã£ãŠããªããã¢ã€ãã«ç¶æ
ã®ã³ãã¯ã·ã§ã³ã«ãããŠäžéšã®ãµãŒããŒãéä¿¡ããŸãããµãŒããŒã¯äœ¿çšããŠããªãã³ãã¯ã·ã§ã³ã®çµäºãæãããšã瀺ããŸãããã®ã¬ã¹ãã³ã¹ã¯ Chromeã Firefox 27 以éãIE9 ãªã©ãé²èŠ§ãé«éåããããã® HTTP äºåæ¥ç¶æ©èœã䜿çšããäžéšã®ãã©ãŠã¶ãŒã§ãã䜿çšããŸãããŸããäžéšã®ãµãŒããŒã¯ãã®ã¡ãã»ãŒãžãéããã«ã³ãã¯ã·ã§ã³ãéããããšã«æ³šæããŠãã ããã</dd> + <dt>{{HTTPStatus(409, "409 Conflict")}}</dt> + <dd>ãã®ã¬ã¹ãã³ã¹ã¯ããªã¯ãšã¹ãããµãŒããŒã®çŸåšã®ç¶æ
ãšççŸããå Žåã«éãããã§ãããã</dd> + <dt>{{HTTPStatus(410, "410 Gone")}}</dt> + <dd>ãã®ã¬ã¹ãã³ã¹ã¯ããªã¯ãšã¹ããããã³ã³ãã³ãããµãŒããŒããæ°žä¹
ã«åé€ããã転éå
ã¢ãã¬ã¹ããªãå Žåã«éãããŸããã¯ã©ã€ã¢ã³ãã¯ãã®ãªãœãŒã¹ãžã®ãã£ãã·ã¥ããªã³ã¯ãåé€ããããšãæåŸ
ãããŸãã HTTP ä»æ§æžã§ã¯ãã®ã³ãŒãããæééå®ã®ããã¢ãŒã·ã§ã³ãµãŒãã¹ãã«äœ¿çšããããšãæå³ããŠããŸãã API ã¯ãã®ã¹ããŒã¿ã¹ã³ãŒãã®å Žåãåé€ããããªãœãŒã¹ãç¡çã«ç€ºãããšããã¹ãã§ã¯ãããŸããã</dd> + <dt>{{HTTPStatus(411, "411 Length Required")}}</dt> + <dd>ãµãŒããŒã <code>Content-Length</code> ããããŒé
ç®ãèŠæ±ããŠãããããªã¯ãšã¹ãã§å®çŸ©ãããŠããªãããã«ããµãŒããŒããªã¯ãšã¹ããæåŠããããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(412, "412 Precondition Failed")}}</dt> + <dd>ãµãŒããŒåŽã§é©åããªãåææ¡ä»¶ããã¯ã©ã€ã¢ã³ãåŽã®ããããŒã«å«ãŸããŠããããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(413, "413 Payload Too Large")}}</dt> + <dd>ãªã¯ãšã¹ãã®æ¬äœããµãŒããŒã§å®ããŠããäžéãè¶
ããŠããããšã瀺ããŸãããµãŒããŒã¯ã³ãã¯ã·ã§ã³ãéãããã<code>Retry-After</code> ããããŒé
ç®ãè¿ããŸãã</dd> + <dt>{{HTTPStatus(414, "414 URI Too Long")}}</dt> + <dd>ã¯ã©ã€ã¢ã³ãããªã¯ãšã¹ããã URI ãããµãŒããŒã§æ±ããé·ããè¶
ããŠããããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(415, "415 Unsupported Media Type")}}</dt> + <dd>ãªã¯ãšã¹ããããããŒã¿ã®ã¡ãã£ã¢åœ¢åŒããµãŒããŒã察å¿ããŠãããããµãŒããŒã¯ãªã¯ãšã¹ããæåŠããããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(416, "416 Range Not Satisfiable")}}</dt> + <dd>ãªã¯ãšã¹ãå
ã® <code>Range</code> ããããŒé
ç®ã§æå®ãããç¯å²ãæºããããšãã§ããªãããšã瀺ããŸããæå®ããç¯å²ããç®çã® URI ã®ããŒã¿ãµã€ãºãè¶
ããŠããå¯èœæ§ããããŸãã</dd> + <dt>{{HTTPStatus(417, "417 Expectation Failed")}}</dt> + <dd>ãã®ã¬ã¹ãã³ã¹ã³ãŒãã¯ã<code>Expect</code> ãªã¯ãšã¹ãããããŒã§æå®ãããå
容ããµãŒããŒåŽãšé©åããªãããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(418, "418 I'm a teapot")}}</dt> + <dd>ãµãŒããŒã¯ããã£ãŒãããã§ã³ãŒããŒãæ·¹ããããšããè©Šã¿ãæåŠããŸãã</dd> + <dt>{{HTTPStatus(421, "421 Misdirected Request")}}</dt> + <dd>ãªã¯ãšã¹ãã¯ãã¬ã¹ãã³ã¹ãçæã§ããªããµãŒããŒã«éãããŸããããªã¯ãšã¹ãã® URI ã«å«ãŸããŠããã¹ããŒã ãæš©éã®çµã¿åããã«å¯ŸããŠã¬ã¹ãã³ã¹ãçæããããèšå®ãããŠããªããµãŒããŒãããã®ã³ãŒããéãããšããããŸãã</dd> + <dt>{{HTTPStatus(422, "422 Unprocessable Entity")}} ({{Glossary("WebDAV")}})</dt> + <dd>ãªã¯ãšã¹ãã¯é©æ£ã§ãããæå³ã誀ã£ãŠããããã«åŸãããšãã§ããŸããã</dd> + <dt>{{HTTPStatus(423, "423 Locked")}} ({{Glossary("WebDAV")}})</dt> + <dd>ã¢ã¯ã»ã¹äžã®ãªãœãŒã¹ã¯ããã¯ãããŠããŸãã</dd> + <dt>{{HTTPStatus(424, "424 Failed Dependency")}} ({{Glossary("WebDAV")}})</dt> + <dd>åã®ãªã¯ãšã¹ãã倱æããããããã®ãªã¯ãšã¹ãã倱æããŸããã</dd> + <dt>{{HTTPStatus(425, "425 Too Early")}}</dt> + <dd>ãµãŒããŒããç¹°ãè¿ãããå¯èœæ§ã®ãããªã¯ãšã¹ããåŠçãããªã¹ã¯ãæãŸãªãããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(426, "426 Upgrade Required")}}</dt> + <dd>ãµãŒããŒã¯çŸåšã®ãããã³ã«ã䜿çšãããªã¯ãšã¹ãã®å®è¡ãæåŠããŸããããã¯ã©ã€ã¢ã³ããå¥ã®ãããã³ã«ã«ã¢ããã°ã¬ãŒãããåŸã¯åãå
¥ããããšãã§ããŸãããµãŒããŒã¯å¿
èŠãªãããã³ã«ã瀺ãããã«ã426 ã®ã¬ã¹ãã³ã¹ã§ {{HTTPHeader("Upgrade")}} ããããŒé
ç®ãéä¿¡ããªããã°ãªããŸããã</dd> + <dt>{{HTTPStatus(428, "428 Precondition Required")}}</dt> + <dd>ãªãªãžã³ãµãŒããŒã¯ãªã¯ãšã¹ããæ¡ä»¶ä»ãã«ãªãããšãå¿
èŠãšããŠããŸãããã®ã¬ã¹ãã³ã¹ã¯ããã¹ãã¢ããããŒãåé¡ã (ã¯ã©ã€ã¢ã³ãããªãœãŒã¹ã®ç¶æ
ãååŸããŠå€æŽããã³ãµãŒããŒã«éä¿¡ããŠããéã«ã第äžè
ããµãŒããŒã®ç¶æ
ãå€æŽããŠç«¶åãçºçããããš) ãé²ãããšãããã®ã§ãã</dd> + <dt>{{HTTPStatus(429, "429 Too Many Requests")}}</dt> + <dd>ãŠãŒã¶ãŒã¯äžå®ã®æéå
ã«å€§éã®ãªã¯ãšã¹ããéä¿¡ããŸãã ("ã¬ãŒãå¶é")ã</dd> + <dt>{{HTTPStatus(431, "431 Request Header Fields Too Large")}}</dt> + <dd>ããããŒé
ç®ã倧ããããããããµãŒããŒã¯ãªã¯ãšã¹ãã®åŠçãæã¿ãŸãããããããŒé
ç®ã®ãµã€ãºãåæžããåŸã«ããªã¯ãšã¹ããåéä¿¡ã§ããŸãã</dd> + <dt>{{HTTPStatus(451, "451 Unavailable For Legal Reasons")}}</dt> + <dd>ãŠãŒã¶ãŒãšãŒãžã§ã³ããæ¿åºã«ãã£ãŠæ€é²ããããŠã§ãããŒãžãªã©ãéæ³ãªãªãœãŒã¹ããªã¯ãšã¹ãããŠããŸãã</dd> +</dl> + +<h2 id="Server_error_responses" name="Server_error_responses">ãµãŒããŒãšã©ãŒã¬ã¹ãã³ã¹</h2> + +<dl> + <dt>{{HTTPStatus(500, "500 Internal Server Error")}}</dt> + <dd>ãµãŒããŒåŽã§åŠçæ¹æ³ãããããªãäºæ
ãçºçããããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(501, "501 Not Implemented")}}</dt> + <dd>ãªã¯ãšã¹ãã¡ãœããããµãŒããŒã察å¿ããŠããããæ±ããªãããšã瀺ããŸãããµãŒããŒã察å¿ããªããã°ãªããªã (åŸã£ãŠããã®ã³ãŒããè¿ããŠã¯ãªããªã) ã¡ãœãã㯠<code>GET</code> ãš <code>HEAD</code> ã ãã§ãã</dd> + <dt>{{HTTPStatus(502, "502 Bad Gateway")}}</dt> + <dd>ãã®ãšã©ãŒã¬ã¹ãã³ã¹ã¯ããªã¯ãšã¹ãã®åŠçã«å¿
èŠãªã¬ã¹ãã³ã¹ãåãåãã²ãŒããŠã§ã€ãšããŠåäœãããµãŒããŒãç¡å¹ãªã¬ã¹ãã³ã¹ãåãåã£ãããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(503, "503 Service Unavailable")}}</dt> + <dd>ãµãŒããŒã¯ãªã¯ãšã¹ããåŠçããæºåãã§ããŠããªãããšã瀺ããŸããäžè¬çãªåå ã¯ããµãŒããŒãã¡ã³ããã³ã¹ãéè² è·ã§ããŠã³ããŠããããšã§ãããã®ã¬ã¹ãã³ã¹ãšãšãã«åé¡ã«ã€ããŠèª¬æããããŠãŒã¶ãŒã«ããããããããŒãžãéä¿¡ããã¹ãã§ããããšã«æ³šæããŠãã ããããã®ã¬ã¹ãã³ã¹ã¯äžæçãªç¶æ³ã«ã€ããŠäœ¿çšãããã®ã§ããããŸãå¯èœã§ããã°ããµãŒãã¹ã埩æ§ããåã« <code>Retry-After:</code> HTTP ããããŒã«äºå®æå»ãå«ããã¹ãã§ãããŸãããããäžæçãªç¶æ³ã®ã¬ã¹ãã³ã¹ã¯éåžžãã£ãã·ã¥ãããã¹ãã§ã¯ãªãããšããããŠã§ã管çè
ã¯ãã®ã¬ã¹ãã³ã¹ãšãšãã«éããããã£ãã·ã¥é¢é£ã®ããããŒã«æ³šæããªããã°ãªããŸããã</dd> + <dt>{{HTTPStatus(504, "504 Gateway Timeout")}}</dt> + <dd>ãã®ãšã©ãŒã¬ã¹ãã³ã¹ã¯ãã²ãŒããŠã§ã€ãšããŠåäœãããµãŒããŒãæéå
ã«ã¬ã¹ãã³ã¹ãåŸãããªãå Žåã«éãããŸãã</dd> + <dt>{{HTTPStatus(505, "505 HTTP Version Not Supported")}}</dt> + <dd>ãªã¯ãšã¹ãã§äœ¿çšãã HTTP ã®ããŒãžã§ã³ããµãŒããŒã察å¿ããŠããªãããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(506, "506 Variant Also Negotiates")}}</dt> + <dd>ãµãŒããŒã«å
éšæ§æãšã©ãŒãããããšã瀺ããŸããéžæããããªã¢ã³ããªãœãŒã¹ãééçã³ã³ãã³ãããŽã·ãšãŒã·ã§ã³èªäœã«æºããããèšå®ãããŠãããããŽã·ãšãŒã·ã§ã³ããã»ã¹ãæ£ããçµäºããªãã£ãããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(507, "507 Insufficient Storage")}} ({{Glossary("WebDAV")}})</dt> + <dd>ãµãŒããŒããªã¯ãšã¹ããå®äºãããã®ã«å¿
èŠãªè¡šçŸãä¿åããããšãã§ããªãã£ããããã¡ãœããããªãœãŒã¹ã«å¯ŸããŠå®è¡ã§ããªãã£ãããšã瀺ããŸãã</dd> + <dt>{{HTTPStatus(508, "508 Loop Detected")}} ({{Glossary("WebDAV")}})</dt> + <dd>ãµãŒããŒã¯ããªã¯ãšã¹ãã®åŠçäžã«ç¡éã«ãŒããæ€åºããŸããã</dd> + <dt>{{HTTPStatus(510, "510 Not Extended")}}</dt> + <dd>ãµãŒããŒããªã¯ãšã¹ããåŠçããããã«ããªã¯ãšã¹ããããã«æ¡åŒµããããšãå¿
èŠã§ãã</dd> + <dt>{{HTTPStatus(511, "511 Network Authentication Required")}}</dt> + <dd>ã¹ããŒã¿ã¹ã³ãŒã 511 ã¯ãã¯ã©ã€ã¢ã³ãããããã¯ãŒã¯ã§ã¢ã¯ã»ã¹ããããã«èªèšŒãå¿
èŠã§ããããšã瀺ããŸãã</dd> +</dl> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ãã©ãŠã¶ãŒã®äºææ§</h2> + +<div class="hidden">ãã®ããŒãžã®äºææ§äžèŠ§è¡šã¯æ§é åããŒã¿ããçæãããŠããŸããããŒã¿ã«ååããŠããã ããã®ã§ããã°ã <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ããã§ãã¯ã¢ãŠãããŠãã«ãªã¯ãšã¹ããéä¿¡ããŠãã ããã</div> + +<p>{{Compat("http.status")}}</p> + +<h2 id="See_also" name="See_also">é¢é£æ
å ±</h2> + +<ul> + <li><a href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes">Wikipedia ã®ãHTTP ã¹ããŒã¿ã¹ã³ãŒãã®äžèŠ§</a></li> + <li><a href="http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP ã¹ããŒã¿ã¹ã³ãŒãã®ãIANA å
¬åŒã¬ãžã¹ããªãŒ</a></li> +</ul> |