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