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