{"id":139,"date":"2017-02-17T22:22:49","date_gmt":"2017-02-17T13:22:49","guid":{"rendered":"https:\/\/pocolog.bass-world.net\/tech\/?p=139"},"modified":"2017-02-17T22:22:49","modified_gmt":"2017-02-17T13:22:49","slug":"apache-browser-cache","status":"publish","type":"post","link":"https:\/\/pocolog.bass-world.net\/tech\/2017\/apache-browser-cache\/","title":{"rendered":"Apache\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u3067\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u7b49\u3092\u30d6\u30e9\u30a6\u30b6\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u305b\u308b"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\u30d6\u30e9\u30a6\u30b6\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6d3b\u7528\u3059\u308b<\/h3>\n\n\n\n<p><a href=\"https:\/\/www.google.com\/intl\/ja_jp\/analytics\/\">Google \u30a2\u30ca\u30ea\u30c6\u30a3\u30af\u30b9<\/a>\u306e\u30ec\u30dd\u30fc\u30c8\u2192\u884c\u52d5\u2192\u30b5\u30a4\u30c8\u306e\u901f\u5ea6\u2192\u901f\u5ea6\u306e\u63d0\u6848\u3067\u3001<\/p>\n\n\n\n<blockquote><p><strong>\u30d6\u30e9\u30a6\u30b6\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6d3b\u7528\u3059\u308b<\/strong><br>\u9759\u7684\u30ea\u30bd\u30fc\u30b9\u306e HTTP \u30d8\u30c3\u30c0\u30fc\u5185\u3067\u3001\u6709\u52b9\u671f\u65e5\u3084\u6700\u5927\u7d4c\u904e\u6642\u9593\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u30d6\u30e9\u30a6\u30b6\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304b\u3089\u3067\u306f\u306a\u304f\u30ed\u30fc\u30ab\u30eb \u30c7\u30a3\u30b9\u30af\u304b\u3089\u4ee5\u524d\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30ea\u30bd\u30fc\u30b9\u3092\u8aad\u307f\u8fbc\u3080\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br>\u6b21\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u53ef\u80fd\u306a\u30ea\u30bd\u30fc\u30b9\u3067\u30d6\u30e9\u30a6\u30b6\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6d3b\u7528\u3057\u3066\u304f\u3060\u3055\u3044:<\/p><\/blockquote>\n\n\n\n<p>\u3067\u3001\u3069\u3046\u3059\u308c\u3070\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u305b\u308b\u304b\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p><a href=\"http:\/\/qiita.com\/hkusu\/items\/468cc0ee0d767e7cc790\">\u300c\u9759\u7684\u30ea\u30bd\u30fc\u30b9(HTML,JS,CSS,\u753b\u50cf)\u306e\u30d6\u30e9\u30a6\u30b6\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5236\u5fa1\u300d<\/a>\u3092\u5927\u3044\u306b\u53c2\u8003\u306b\u3055\u305b\u3066\u3082\u3089\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<blockquote><pre class=\"wp-block-preformatted\"># For dynamic contents<br>\nHeader set Cache-Control \"no-cache\" env=X_CACHE_PATTERN1<br>\nHeader unset Expires env=X_CACHE_PATTERN1<br>\nHeader unset Last-Modified env=X_CACHE_PATTERN1<br>\nHeader unset Etag env=X_CACHE_PATTERN1<br><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># For HTML files<br>\nHeader set Cache-Control \"max-age=0\" env=X_CACHE_PATTERN2<br>\nHeader set Expires \"Mon, 26 Jul 1997 05:00:00 GMT\" env=X_CACHE_PATTERN2<br><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># For CSS,JavaScript files<br>\nHeader set Cache-Control \"max-age=600\" env=X_CACHE_PATTERN3<br><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># For Image files<br>\nHeader set Cache-Control \"max-age=86400\" env=X_CACHE_PATTERN4<\/pre><\/blockquote>\n\n\n\n<p>\u3067\u3001\u4f55\u79d2\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u305b\u308b\u306e\u304c\u3044\u3044\u306e\u304b?\u3068\u601d\u3063\u3066\u8abf\u3079\u305f\u306e\u3067\u3059\u304c\u3001\u306a\u304b\u306a\u304b\u7b54\u3048\u306e\u3042\u308b\u30b5\u30a4\u30c8\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br>\u4e0a\u8a18\u30b5\u30a4\u30c8\u3068\u540c\u3058\u3067\u3044\u3044\u304b\u306a\u3001\u3068\u3082\u601d\u3063\u305f\u3093\u3067\u3059\u304c\u3001\u3053\u308c\u3082\u3084\u306f\u308a<a href=\"https:\/\/www.google.com\/intl\/ja_jp\/analytics\/\">Google \u30a2\u30ca\u30ea\u30c6\u30a3\u30af\u30b9<\/a>\u306ePageSpeed Insights\u306b\u66f8\u3044\u3066\u3042\u308a\u307e\u3057\u305f\u3002<br>\u56de\u7b54\u306f\u306a\u3093\u3068!<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306f1\u9031\u9593\u304b\u30891\u5e74<\/li><li>JS\u30d5\u30a1\u30a4\u30eb\u30fbCSS\u30d5\u30a1\u30a4\u30eb\u306f1\u65e5\u4ee5\u4e0a<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\u30d6\u30e9\u30a6\u30b6\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6d3b\u7528\u3059\u308b<\/h4>\n\n\n\n<p><strong>\u63a8\u5968\u3055\u308c\u308b\u89e3\u6c7a\u65b9\u6cd5<\/strong><br>\u30b5\u30fc\u30d0\u30fc\u3067\u30d6\u30e9\u30a6\u30b6\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002\u9759\u7684\u306a\u30ea\u30bd\u30fc\u30b9\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u6709\u52b9\u671f\u9593\u306f 1 \u9031\u9593\u4ee5\u4e0a\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5e83\u544a\u3084\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306a\u3069\u306e\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3 \u30ea\u30bd\u30fc\u30b9\u306e\u5834\u5408\u306f\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u6709\u52b9\u671f\u9593\u3092 1 \u65e5\u4ee5\u4e0a\u306b\u3057\u307e\u3059\u3002\u30ad\u30e3\u30c3\u30b7\u30e5\u53ef\u80fd\u306a\u3059\u3079\u3066\u306e\u30ea\u30bd\u30fc\u30b9\u3067\u3001\u6b21\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059:<\/p>\n\n\n\n<p>\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306e1\u9031\u9593\u306f\u9577\u3059\u304e\u308b\u3001\u3068\u601d\u3063\u305f\u3051\u3069\u3001\u30b5\u30a4\u30c8\u30c7\u30b6\u30a4\u30f3\u3067\u80cc\u666f\u306b\u753b\u50cf\u3092\u4f7f\u3046\u3088\u3046\u306a\u30b5\u30a4\u30c8(\u79c1\u306e\u30b5\u30a4\u30c8\u304c\u305d\u3046\u3067\u3059)\u306a\u30891\u9031\u9593\u3067\u3082\u3044\u3044\u304b\u306a\u3001\u3068\u3002<br>\u5dee\u3057\u66ff\u3048\u305f\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u5909\u66f4\u3059\u308b\u904b\u7528\u3067\u3044\u3051\u3070\u3044\u3044\u304b\u3068\u3002\u5b9f\u969b\u3001<a href=\"https:\/\/www.google.com\/intl\/ja_jp\/analytics\/\">Google \u30a2\u30ca\u30ea\u30c6\u30a3\u30af\u30b9<\/a>\u306b\u3082\u305d\u306e\u3088\u3046\u306a\u3053\u3068\u304c\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">URL \u30d5\u30a3\u30f3\u30ac\u30fc\u30d7\u30ea\u30f3\u30c8\u306e\u4f7f\u7528<\/h4>\n\n\n\n<p>\n\u3068\u304d\u3069\u304d\u5909\u66f4\u3055\u308c\u308b\u30ea\u30bd\u30fc\u30b9\u306e\u5834\u5408\u3001\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u30ea\u30bd\u30fc\u30b9\u304c\u5909\u66f4\u3055\u308c\u3001\u30b5\u30fc\u30d0\u30fc\u304c\u30d6\u30e9\u30a6\u30b6\u306b\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u63d0\u4f9b\u3055\u308c\u305f\u3053\u3068\u3092\u901a\u77e5\u3059\u308b\u307e\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u30ea\u30bd\u30fc\u30b9\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3066\u304a\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30ea\u30bd\u30fc\u30b9\u306e\u5404\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u4e00\u610f\u306e URL \u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u3053\u306e\u65b9\u6cd5\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u300cmy_stylesheet.css\u300d\u3068\u3044\u3046\u30ea\u30bd\u30fc\u30b9\u304c\u3042\u308b\u3068\u3057\u307e\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u300cmy_stylesheet_fingerprint.css\u300d\u306b\u5909\u66f4\u3067\u304d\u307e\u3059\u3002\u30ea\u30bd\u30fc\u30b9\u304c\u5909\u66f4\u3055\u308c\u308b\u3068\u3001\u30d5\u30a3\u30f3\u30ac\u30fc\u30d7\u30ea\u30f3\u30c8\u3082\u5909\u66f4\u3055\u308c\u308b\u305f\u3081\u3001URL \u3082\u5909\u308f\u308a\u307e\u3059\u3002URL \u304c\u5909\u66f4\u3055\u308c\u308b\u3068\u3059\u3050\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u306f\u30ea\u30bd\u30fc\u30b9\u306e\u518d\u53d6\u5f97\u3092\u5f37\u5236\u3055\u308c\u307e\u3059\u3002\u30d5\u30a3\u30f3\u30ac\u30fc\u30d7\u30ea\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u983b\u7e41\u306b\u5909\u66f4\u3055\u308c\u308b\u30ea\u30bd\u30fc\u30b9\u3067\u3082\u3001\u6709\u52b9\u671f\u9650\u3092\u305d\u308c\u3088\u308a\u5148\u306e\u65b9\u306e\u65e5\u4ed8\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d5\u30a3\u30f3\u30ac\u30fc\u30d7\u30ea\u30f3\u30c8\u306e\u4e00\u822c\u7684\u306a\u65b9\u6cd5\u3068\u3057\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u30cf\u30c3\u30b7\u30e5\u3092\u30b3\u30fc\u30c9\u5316\u3057\u305f 128 \u30d3\u30c3\u30c8\u306e 16 \u9032\u6570\u304c\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3093\u306a\u8a33\u3067\u3001\u81ea\u5206\u306a\u308a\u306b\u5c0e\u304d\u51fa\u3057\u305fApache\u306e\u8a2d\u5b9a\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092httpd.conf\u306eVirtualHost\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306b\u66f8\u304f\u304b\u3001.htaccess\u306b\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<blockquote><pre class=\"wp-block-preformatted\">RewriteEngine on<br><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteRule \\.(php|pl|cgi)$ - [L,E=x_dynamic_file:]<br>\nRewriteRule \\.html$ - [L,E=x_html_file:]<br>\nRewriteRule \\.(css|js)$ - [L,E=x_static_file:]<br>\nRewriteRule \\.(gif|jpe?g|png)$ - [L,E=x_image_file:]<br><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># dynamic files<br>\nHeader set Cache-Control \"no-cache\" env=x_dynamic_file<br>\nHeader unset Expires env=x_dynamic_file<br>\nHeader unset Last-Modified env=x_dynamic_file<br>\nHeader unset Etag env=x_dynamic_file<br><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># html files<br>\nHeader set Cache-Control \"max-age=0\" env=x_html_file<br>\nHeader set Expires \"Sat, 1 Jan 2000 00:00:00 GMT\" env=x_html_file<br><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># CSS, JavaScript files - 10 minutes<br>\nHeader set Cache-Control \"max-age=600\" env=x_static_file<br><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># Image files - 1 week<br>\nHeader set Cache-Control \"max-age=604800\" env=x_image_file<\/pre><\/blockquote>\n\n\n\n<ul class=\"wp-block-list\"><li>\u52d5\u7684\u30da\u30fc\u30b8(.php, .pl, .cgi)\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u305b\u306a\u3044\u3002<\/li><li>html\u30d5\u30a1\u30a4\u30eb\u3082\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u305b\u306a\u3044\u3002<\/li><li>CSS, JavaScript\u306f10\u5206\u9593\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u305b\u308b\u3002\u30b5\u30a4\u30c8\u306e\u6ede\u5728\u6642\u9593\u304b\u3089\u305d\u3093\u306a\u3082\u3093\u304b\u306a\u3001\u3068\u8003\u3048\u307e\u3057\u305f\u3002<\/li><li>\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306f1\u9031\u9593\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u305b\u308b\u3002<\/li><\/ul>\n\n\n\n<p>\u3053\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u3001<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u753b\u50cf\u304c10\u500b\u7a0b\u5ea6\u306e\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u306e<em>PageSpeed\u30b9\u30b3\u30a2\u304c\u3001(\u524d\u56de70\u2192)86\u219296\u306b!<\/em><\/li><li>\u5168\u90e8\u3092Perl\u3067\u66f8\u3044\u3066\u3042\u308bWiki\u30da\u30fc\u30b8\u306f\u300184\u219286\u306b<\/li><\/ul>\n\n\n\n<p>\u306a\u308a\u307e\u3057\u305f\u3002<br>\u4ed6\u306e\u30da\u30fc\u30b8\u308290\u8d8a\u3048\u304c\u591a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<br>\u5f53\u5206\u306e\u9593\u3001\u3053\u308c\u3067\u904b\u7528\u3057\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d6\u30e9\u30a6\u30b6\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6d3b\u7528\u3059\u308b Google \u30a2\u30ca\u30ea\u30c6\u30a3\u30af\u30b9\u306e\u30ec\u30dd\u30fc\u30c8\u2192\u884c\u52d5\u2192\u30b5\u30a4\u30c8\u306e\u901f\u5ea6\u2192\u901f\u5ea6\u306e\u63d0\u6848\u3067\u3001 \u30d6\u30e9\u30a6\u30b6\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6d3b\u7528\u3059\u308b\u9759\u7684\u30ea\u30bd\u30fc\u30b9\u306e HTTP \u30d8\u30c3\u30c0\u30fc\u5185\u3067\u3001\u6709\u52b9\u671f\u65e5\u3084\u6700\u5927\u7d4c\u904e\u6642\u9593\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u30d6\u30e9\u30a6 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/pocolog.bass-world.net\/tech\/2017\/apache-browser-cache\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Apache\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u3067\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u7b49\u3092\u30d6\u30e9\u30a6\u30b6\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u305b\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,6,7,10,11,12,16,17],"tags":[],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-apache","category-css","category-gmo-cloud","category-html","category-linux","category-perl","category-php","category-wordpress","category-17"],"_links":{"self":[{"href":"https:\/\/pocolog.bass-world.net\/tech\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pocolog.bass-world.net\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pocolog.bass-world.net\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pocolog.bass-world.net\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pocolog.bass-world.net\/tech\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":0,"href":"https:\/\/pocolog.bass-world.net\/tech\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"wp:attachment":[{"href":"https:\/\/pocolog.bass-world.net\/tech\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pocolog.bass-world.net\/tech\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pocolog.bass-world.net\/tech\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}