?????????Щ??鯔???????????????????????±?????????Щ??顣??Щ???????????????????а????????????????????????????????-enable -module=expires??-enable-module=headers???(??apache 1.3??????汾)?? ?ο?Apache???????е?INSTALL???;

????Apache????????????????飬???????.htaccess????????????????access.conf????????mod_expires???????? ??????????????ù???????????????????儷??????????????????????????????????ο???????????????????????????????????????????apache???????

???????Cache-Control??????????????mod_headers?????????????????????HTTP???????ο?mod_headers??????????????????;

?????????и????????????????????

????.htaccess???????web????????????????????????????????????????????????????;??????????????????????????????????????

????### ???? mod_expires

????ExpiresActive On

????### ???? .gif ??????????1???1????

????ExpiresByType image/gif A2592000

????### ????????????????????1??????

????### (???????????)

????ExpiresDefault "modification plus 1 day"

????### ??index.html?????? Cache-Control?????

????Header append Cache-Control "public?? must-revalidate"

??????? ??????????mod_expires?????????????Cache-Control:max-age ????

????Apache 2.0?????ú?1.3????????????????ο?2.0??mod_expires??mod_headers???;

????Microsoft IIS??????

????Microsoft??IIS??????????????????????????????IIS 4.0?????????????????NT???????????С?

?????????????????????????????????????????????У????????????????HTTP Header??????????2??????????????????????????HTTP????????????????????????????????????????Cache-Control????;

????????asp????????????ο??????ASP????????????ISAPI??????????????????ο?MSDN??

????Netscape/iPlanet?????????

????3.6?汾???Netscape/iPlanet???????????Expires???????????3.0?汾??????HTTP 1.1??????????ζ??HTTP 1.1?????(?????????/?????)???????????????Cache-Control????????á?

???????Cache-Control????????????????????????????|?????????????????????????????????????????????????????????????????“OK”???????????ο?Netscape/iPlanet??????????????

??????????????????????????

?????????????????????????????HTTP?????????????????????????????????á?

???????????????????????????????????????????????????????棬???????????????????????????????????????????????????????? ???????????Cache-Control: max-age????;??????????????????η???????檔???磺 ??????“????”????????????????????????????δ?????????????????

????CGI????

????CGI????????????????е?????????????????????????????????HTTP????;????CGI?????????д Content-Type?????????????Perl?????

????#!/usr/bin/perl

????print "Content-type: text/html ";

????print "Expires: Thu?? 29 Oct 1998 17:04:19 GMT ";

????print " ";

????### ????????????...

????????????????????????????????ú???????Expires????????????????????????????Cache-Control: max-age;?????;

????print "Cache-Control: max-age=600 ";

?????????????????????????10????;????????????“????”??????????????????????;

????CGI??淶??????????????????????????????????‘HTTP_’????;?????????????????????If-Modified-Since?????????????

????HTTP_IF_MODIFIED_SINCE = Fri?? 30 Oct 1998 14:19:41 GMT

?????ο????cgi_buffer????????????ETag???????У????????Content-Length?????????????gzip???????Python???????????????;

??????????????? Server Side Includes

????SSI(???????.shtml?????)???????????????????????????????????????????????????????????????HTML????;

????????SSI????????????У????????????????檔????Apache???????????????????????????????????????????????SSI?????????;???XbitHack?????????????????????ο?mod_include?????

????PHP

????PHP??????????web???????е????????????????????HTML?????????????SSI???????и???????PHP?????????Web?????????????CGI?????У????????Apache?????;

??????PHP??????????????У?????????????????棬???????????????Header()??????????HTTP??????;

???????磺???′???????????Cache-Control?????????????3?????????Expires????;

????Header("Cache-Control: must-revalidate");

????$offset = 60 * 60 * 24 * 3;

????$ExpStr = "Expires: " . gmdate("D?? d M Y H:i:s"?? time() + $offset) . " GMT";

????Header($ExpStr);

?????>

????????? Header()?????????????????????HTML?????;