github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_2_34/manual/mod/mod_expires.html.ja.utf8 (about)

     1  <?xml version="1.0" encoding="UTF-8"?>
     2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     3  <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head>
     4  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
     5  <!--
     6          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     7                This file is generated from xml source: DO NOT EDIT
     8          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     9        -->
    10  <title>mod_expires - Apache HTTP サーバ バージョン 2.2</title>
    11  <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
    12  <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
    13  <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
    14  <script src="../style/scripts/prettify.min.js" type="text/javascript">
    15  </script>
    16  
    17  <link href="../images/favicon.ico" rel="shortcut icon" /><link href="http://httpd.apache.org/docs/current/mod/mod_expires.html" rel="canonical" /></head>
    18  <body>
    19  <div id="page-header">
    20  <p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
    21  <p class="apache">Apache HTTP サーバ バージョン 2.2</p>
    22  <img alt="" src="../images/feather.gif" /></div>
    23  <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
    24  <div id="path">
    25  <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.2</a> &gt; <a href="./">モジュール</a></div>
    26  <div id="page-content">
    27  <div class="retired"><h4>Please note</h4>
    28              <p> This document refers to a legacy release (<strong>2.2</strong>) of Apache httpd. The active release (<strong>2.4</strong>) is documented <a href="http://httpd.apache.org/docs/current">here</a>. If you have not already upgraded, please follow <a href="http://httpd.apache.org/docs/current/upgrading.html">this link</a> for more information.</p>
    29          <p>You may follow <a href="http://httpd.apache.org/docs/current/mod/mod_expires.html">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>Apache モジュール mod_expires</h1>
    30  <div class="toplang">
    31  <p><span>翻訳済み言語: </span><a href="../en/mod/mod_expires.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
    32  <a href="../ja/mod/mod_expires.html" title="Japanese">&nbsp;ja&nbsp;</a> |
    33  <a href="../ko/mod/mod_expires.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
    34  </div>
    35  <div class="outofdate">この日本語訳はすでに古くなっている
    36              可能性があります。
    37              最近更新された内容を見るには英語版をご覧下さい。
    38          </div>
    39  <table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td>ユーザの指定した基準に基づいた <code>Expires</code> と
    40  <code>Cache-Control</code> HTTP ヘッダの生成</td></tr>
    41  <tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
    42  <tr><th><a href="module-dict.html#ModuleIdentifier">モジュール識別子:</a></th><td>expires_module</td></tr>
    43  <tr><th><a href="module-dict.html#SourceFile">ソースファイル:</a></th><td>mod_expires.c</td></tr></table>
    44  <h3>概要</h3>
    45  
    46      <p>このモジュールはサーバ応答の <code>Expires</code> HTTP ヘッダ
    47      と <code>Cache-Control</code> ヘッダの <code>max-age</code> ディレクティブの
    48      設定を制御します。元のファイルが作成された時刻または
    49      クライアントのアクセス時刻のどちらかに基づいて期限切れ日を
    50      設定することができます。</p>
    51  
    52      <p>これらのヘッダはクライアントに文書の
    53      有効性と継続性を指示します。文書がキャッシュされた場合には、
    54      指定時刻に達するまでは、元の場所から取得する代わりに
    55      キャッシュされているものを使うことができます。その後は、
    56      キャッシュにあるコピーは期限切れ (expired) で無効であるとされ、
    57      元の場所から新しいものを取得する必要があります。</p>
    58  
    59      <p><code>max-age</code> 以外 (<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">RFC
    60      2616 section 14.9</a> 参照) の <code>Cache-Control</code> のディレクティブを
    61      操作するには <code class="directive"><a href="../mod/mod_headers.html#header">Header</a></code> ディレクティブを
    62      使うことができます。</p></div>
    63  <div id="quickview"><h3>トピック</h3>
    64  <ul id="topics">
    65  <li><img alt="" src="../images/down.gif" /> <a href="#AltSyn">代替期間指定構文</a></li>
    66  </ul><h3 class="directives">ディレクティブ</h3>
    67  <ul id="toc">
    68  <li><img alt="" src="../images/down.gif" /> <a href="#expiresactive">ExpiresActive</a></li>
    69  <li><img alt="" src="../images/down.gif" /> <a href="#expiresbytype">ExpiresByType</a></li>
    70  <li><img alt="" src="../images/down.gif" /> <a href="#expiresdefault">ExpiresDefault</a></li>
    71  </ul>
    72  <ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div>
    73  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
    74  <div class="section">
    75  <h2><a name="AltSyn" id="AltSyn">代替期間指定構文</a></h2>
    76     
    77      <p><code class="directive"><a href="#expiresdefault">ExpiresDefault</a></code> ディレクティブと
    78      <code class="directive"><a href="#expiresbytype">ExpiresByType</a></code> ディレクティブは
    79      以下のより読み易い構文を使って定義することができます:</p>
    80  
    81      <div class="example"><p><code>
    82        ExpiresDefault "&lt;base&gt; [plus] {&lt;num&gt;
    83        &lt;type&gt;}*"<br />
    84        ExpiresByType type/encoding "&lt;base&gt; [plus]
    85        {&lt;num&gt; &lt;type&gt;}*"
    86      </code></p></div>
    87  
    88      <p>&lt;base&gt; は以下のどれかです:</p>
    89  
    90      <ul>
    91        <li><code>access</code></li>
    92  
    93        <li><code>now</code> ('<code>access</code>' と等価)</li>
    94  
    95        <li><code>modification</code></li>
    96      </ul>
    97  
    98      <p><code>plus</code> キーワードは省略可能です。&lt;num&gt;
    99      は (<code>atoi()</code> が受け付ける) 整数値、
   100      &lt;type&gt; は以下のどれかです:</p>
   101  
   102      <ul>
   103        <li><code>years</code></li>
   104        <li><code>months</code></li>
   105        <li><code>weeks</code></li>
   106        <li><code>days</code></li>
   107        <li><code>hours</code></li>
   108        <li><code>minutes</code></li>
   109        <li><code>seconds</code></li>
   110      </ul>
   111  
   112      <p>例えば、以下のディレクティブはどれもデフォルトで文書がアクセスの 1 ヶ月後に
   113      期限が切れるようにするために使えます:</p>
   114  
   115      <div class="example"><p><code>
   116        ExpiresDefault "access plus 1 month"<br />
   117        ExpiresDefault "access plus 4 weeks"<br />
   118        ExpiresDefault "access plus 30 days"
   119      </code></p></div>
   120  
   121      <p>期限切れ時刻はいくつか
   122      '&lt;num&gt; &lt;type&gt;' 節を追加することでより細かく
   123      制御することができます:</p>
   124  
   125      <div class="example"><p><code>
   126        ExpiresByType text/html "access plus 1 month 15
   127        days 2 hours"<br />
   128        ExpiresByType image/gif "modification plus 5 hours 3
   129        minutes"
   130      </code></p></div>
   131  
   132      <p>修正時刻に基づいた設定を使用している場合、Expires ヘッダは
   133      ディスクのファイル以外のコンテンツには<strong>追加されない</strong>ことに注意
   134      してください。そのようなコンテンツには修正時刻は存在しないからです。</p>
   135  </div>
   136  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   137  <div class="directive-section"><h2><a name="ExpiresActive" id="ExpiresActive">ExpiresActive</a> <a name="expiresactive" id="expiresactive">ディレクティブ</a></h2>
   138  <table class="directive">
   139  <tr><th><a href="directive-dict.html#Description">説明:</a></th><td><code>Expires</code> ヘッダの生成を有効にする</td></tr>
   140  <tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ExpiresActive On|Off</code></td></tr>
   141  <tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
   142  <tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>Indexes</td></tr>
   143  <tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
   144  <tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_expires</td></tr>
   145  </table>
   146      <p>このディレクティブは対応するドキュメントの領域で
   147      <code>Expires</code> と <code>Cache-Control</code>ヘッダを
   148      有効にするか無効にするかを決めます。
   149      (例えば、<code>.htaccess</code> ファイルではそのディレクトリの
   150      文書のみに適用されるということです。) <code>Off</code> に
   151      設定された場合は対応領域でそれらのヘッダは
   152      生成されません (<code>.htaccess</code> がサーバ設定ファイルの設定を
   153      上書きする、というような下位レベルでの上書きがされていなければ)。
   154      <code>On</code> に設定されていれば、ヘッダは <code class="directive"><a href="#expiresbytype">ExpiresByType</a></code> ディレクティブと
   155      <code class="directive"><a href="#expiresdefault">ExpiresDefault</a></code> ディレクティブ
   156      の基準に従って文書にヘッダを追加します (各ディレクティブ参照)。</p>
   157  
   158      <p>このディレクティブは <code>Expires</code> と
   159      <code>Cache-Control</code> ヘッダの存在を
   160      保証するわけではないことに注意してください。基準が満たされて
   161      いない場合はヘッダは追加されず、結果としてこのディレクティブが
   162      指定されていなかったかのようにさえ見えることになります。</p>
   163  
   164  </div>
   165  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   166  <div class="directive-section"><h2><a name="ExpiresByType" id="ExpiresByType">ExpiresByType</a> <a name="expiresbytype" id="expiresbytype">ディレクティブ</a></h2>
   167  <table class="directive">
   168  <tr><th><a href="directive-dict.html#Description">説明:</a></th><td>MIME タイプによって設定される <code>Expires</code> ヘッダの値</td></tr>
   169  <tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ExpiresByType <var>MIME-type</var>
   170  <var>&lt;code&gt;seconds</var></code></td></tr>
   171  <tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
   172  <tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>Indexes</td></tr>
   173  <tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
   174  <tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_expires</td></tr>
   175  </table>
   176      <p>このディレクティブは指定されたタイプのドキュメント
   177      (<em>例えば</em> <code>text/html</code>)
   178      に対して生成される <code>Expires</code> ヘッダと <code>Cache-Control</code>
   179      ヘッダの <code>max-age</code> ディレクティブの値を定義します。
   180      二つ目の引数は期限切れの日時を生成するための基準時刻に追加される
   181      秒数を設定します。<code>Cache-Control:
   182      max-age</code> は期限切れの時刻からリクエスト時刻を引いたものを秒で
   183      表すことで生成されます。</p>
   184  
   185      <p>基準時刻はファイルの最終修正時刻か、クライアントのドキュメントへの
   186      アクセス時刻です。どちらを使うべきかは <code><var>&lt;code&gt;</var></code>
   187      によって指定します。<code>M</code> は基準時刻として
   188      ファイルの最終修正時刻をという意味で、<code>A</code> はクライアントの
   189      アクセス時刻を使うという意味になります。</p>
   190  
   191      <p>効果には微妙な違いがあります。<code>M</code> が使用された場合は、
   192      すべてのキャッシュにある現在のドキュメントキャッシュは同時に期限が
   193      切れます。これは同じ URL に毎週常に置かれる報せのようなものには
   194      非常に有効です。<code>A</code> が使用された場合は、期限切れの
   195      時間は各クライアントによって異なります。これはあまり変更されない
   196      画像ファイルなど、特に関連するドキュメント群がすべて同じ画像を
   197      参照するとき (<em>すなわち</em>画像が比較的短い期間内に繰り返し
   198      アクセスされるとき) に有効です。</p>
   199  
   200      <div class="example"><h3>例:</h3><p><code>
   201        # enable expirations<br />
   202        ExpiresActive On<br />
   203        # expire GIF images after a month in the client's cache<br />
   204        ExpiresByType image/gif A2592000<br />
   205        # HTML documents are good for a week from the<br />
   206        # time they were changed<br />
   207        ExpiresByType text/html M604800
   208      </code></p></div>
   209  
   210      <p>このディレクティブは <code>ExpiresActive On</code> が指定されている
   211      ときのみ有効であることに注意してください。これは、
   212      指定された MIME タイプに対して<em>のみ</em> <code class="directive"><a href="#expiresdefault">ExpiresDefault</a></code> ディレクティブで
   213      設定された期限切れ期日を上書きします。</p>
   214  
   215      <p>この文書の前の方で説明されている<a href="#AltSyn">代替構文</a>を
   216      使って期限切れ期日の計算方法を指定することもできます。</p>
   217  
   218  </div>
   219  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   220  <div class="directive-section"><h2><a name="ExpiresDefault" id="ExpiresDefault">ExpiresDefault</a> <a name="expiresdefault" id="expiresdefault">ディレクティブ</a></h2>
   221  <table class="directive">
   222  <tr><th><a href="directive-dict.html#Description">説明:</a></th><td>期限切れ期日を計算するデフォルトアルゴリズム</td></tr>
   223  <tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ExpiresDefault <var>&lt;code&gt;seconds</var></code></td></tr>
   224  <tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
   225  <tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>Indexes</td></tr>
   226  <tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
   227  <tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_expires</td></tr>
   228  </table>
   229      <p>このディレクティブは対応する範囲のすべてのドキュメントに対して
   230      デフォルトの期限切れ期日の計算アルゴリズムを設定します。<code class="directive"><a href="#expiresbytype">ExpiresByType</a></code> ディレクティブによって
   231      タイプ毎に上書きすることができます。引数の構文はそのディレクティブの
   232      説明を参照してください。また、<a href="#AltSyn">代替構文</a>も
   233      参照してください。</p>
   234  
   235  </div>
   236  </div>
   237  <div class="bottomlang">
   238  <p><span>翻訳済み言語: </span><a href="../en/mod/mod_expires.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
   239  <a href="../ja/mod/mod_expires.html" title="Japanese">&nbsp;ja&nbsp;</a> |
   240  <a href="../ko/mod/mod_expires.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
   241  </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
   242  <script type="text/javascript"><!--//--><![CDATA[//><!--
   243  var comments_shortname = 'httpd';
   244  var comments_identifier = 'http://httpd.apache.org/docs/2.2/mod/mod_expires.html';
   245  (function(w, d) {
   246      if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
   247          d.write('<div id="comments_thread"><\/div>');
   248          var s = d.createElement('script');
   249          s.type = 'text/javascript';
   250          s.async = true;
   251          s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
   252          (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
   253      }
   254      else { 
   255          d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
   256      }
   257  })(window, document);
   258  //--><!]]></script></div><div id="footer">
   259  <p class="apache">Copyright 2017 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
   260  <p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
   261  if (typeof(prettyPrint) !== 'undefined') {
   262      prettyPrint();
   263  }
   264  //--><!]]></script>
   265  </body></html>