{"id":391,"date":"2011-12-12T19:35:24","date_gmt":"2011-12-12T19:35:24","guid":{"rendered":"http:\/\/www.websitedesignwebsitedevelopment.com\/?p=391"},"modified":"2015-07-01T14:06:09","modified_gmt":"2015-07-01T14:06:09","slug":"caching-with-htaccess","status":"publish","type":"post","link":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/","title":{"rendered":"Caching with .htaccess"},"content":{"rendered":"<h2>Caching with .htaccess<\/h2>\n<p><img decoding=\"async\" class=\"default\" src=\"http:\/\/www.websitedesignwebsitedevelopment.com\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif\" alt=\"\" align=\"right\" \/><br \/>\n# Set the cache-control max-age<br \/>\n# For 1 year<br \/>\n&lt;FilesMatch &#8220;\\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$&#8221;&gt;<br \/>\nHeader set Cache-Control &#8220;max-age=31449600, public&#8221;<br \/>\n&lt;\/FilesMatch&gt;<\/p>\n<p># For 2 DAYS<br \/>\n&lt;FilesMatch &#8220;\\.(xml|txt)$&#8221;&gt;<br \/>\nHeader set Cache-Control &#8220;max-age=172800, public, must-revalidate&#8221;<br \/>\n&lt;\/FilesMatch&gt;<\/p>\n<p># For 4 HOURS<br \/>\n&lt;FilesMatch &#8220;\\.(html|htm|php)$&#8221;&gt;<br \/>\nHeader set Cache-Control &#8220;max-age=14400, must-revalidate&#8221;<br \/>\n&lt;\/FilesMatch&gt;<\/p>\n<p>Followings things should be considered as well:<\/p>\n<ul>\n<li>https:\/\/developers.google.com\/speed\/docs\/insights\/EnableCompression<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Caching with .htaccess # Set the cache-control max-age # For 1 year &lt;FilesMatch &#8220;\\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$&#8221;&gt; Header set Cache-Control &#8220;max-age=31449600, public&#8221; &lt;\/FilesMatch&gt; # For 2 DAYS &lt;FilesMatch &#8220;\\.(xml|txt)$&#8221;&gt; Header set Cache-Control &#8220;max-age=172800, public, must-revalidate&#8221; &lt;\/FilesMatch&gt; # For 4 HOURS &lt;FilesMatch &#8220;\\.(html|htm|php)$&#8221;&gt; Header set Cache-Control &#8220;max-age=14400, must-revalidate&#8221; &lt;\/FilesMatch&gt; Followings things should be considered as well: https:\/\/developers.google.com\/speed\/docs\/insights\/EnableCompression<\/p>\n","protected":false},"author":1,"featured_media":394,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[15],"tags":[],"class_list":["post-391","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-htaccess"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Caching with .htaccess<\/title>\n<meta name=\"description\" content=\"Caching with .htaccess is a useful bookmark post which helps a developer a lot when easily comes up on Google without delay.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Caching with .htaccess\" \/>\n<meta property=\"og:description\" content=\"Caching with .htaccess is a useful bookmark post which helps a developer a lot when easily comes up on Google without delay.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/\" \/>\n<meta property=\"og:site_name\" content=\"AndroidBubble Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453\" \/>\n<meta property=\"article:published_time\" content=\"2011-12-12T19:35:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-07-01T14:06:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"40\" \/>\n\t<meta property=\"og:image:height\" content=\"40\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Fahad\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fahad\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/\"},\"author\":{\"name\":\"Fahad\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"headline\":\"Caching with .htaccess\",\"datePublished\":\"2011-12-12T19:35:24+00:00\",\"dateModified\":\"2015-07-01T14:06:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/\"},\"wordCount\":80,\"image\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif\",\"articleSection\":[\".htaccess\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/\",\"url\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/\",\"name\":\"Caching with .htaccess\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif\",\"datePublished\":\"2011-12-12T19:35:24+00:00\",\"dateModified\":\"2015-07-01T14:06:09+00:00\",\"author\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"description\":\"Caching with .htaccess is a useful bookmark post which helps a developer a lot when easily comes up on Google without delay.\",\"breadcrumb\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#primaryimage\",\"url\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif\",\"contentUrl\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif\",\"width\":\"40\",\"height\":\"40\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/androidbubble.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Website Development\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\".htaccess\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/htaccess\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Caching with .htaccess\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\",\"url\":\"https:\/\/androidbubble.com\/blog\/\",\"name\":\"AndroidBubble Blog\",\"description\":\"Articles &amp; Posts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/androidbubble.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\",\"name\":\"Fahad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"caption\":\"Fahad\"},\"sameAs\":[\"http:\/\/www.androidbubbles.com\/\",\"https:\/\/x.com\/phpFlex\"],\"url\":\"https:\/\/androidbubble.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Caching with .htaccess","description":"Caching with .htaccess is a useful bookmark post which helps a developer a lot when easily comes up on Google without delay.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/","og_locale":"en_US","og_type":"article","og_title":"Caching with .htaccess","og_description":"Caching with .htaccess is a useful bookmark post which helps a developer a lot when easily comes up on Google without delay.","og_url":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/","og_site_name":"AndroidBubble Blog","article_publisher":"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453","article_published_time":"2011-12-12T19:35:24+00:00","article_modified_time":"2015-07-01T14:06:09+00:00","og_image":[{"width":40,"height":40,"url":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif","type":"image\/gif"}],"author":"Fahad","twitter_misc":{"Written by":"Fahad"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#article","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/"},"author":{"name":"Fahad","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"headline":"Caching with .htaccess","datePublished":"2011-12-12T19:35:24+00:00","dateModified":"2015-07-01T14:06:09+00:00","mainEntityOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/"},"wordCount":80,"image":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#primaryimage"},"thumbnailUrl":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif","articleSection":[".htaccess"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/","url":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/","name":"Caching with .htaccess","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#primaryimage"},"image":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#primaryimage"},"thumbnailUrl":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif","datePublished":"2011-12-12T19:35:24+00:00","dateModified":"2015-07-01T14:06:09+00:00","author":{"@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"description":"Caching with .htaccess is a useful bookmark post which helps a developer a lot when easily comes up on Google without delay.","breadcrumb":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#primaryimage","url":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif","contentUrl":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif","width":"40","height":"40"},{"@type":"BreadcrumbList","@id":"https:\/\/androidbubble.com\/blog\/website-development\/htaccess\/caching-with-htaccess\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/androidbubble.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Website Development","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/"},{"@type":"ListItem","position":3,"name":".htaccess","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/htaccess\/"},{"@type":"ListItem","position":4,"name":"Caching with .htaccess"}]},{"@type":"WebSite","@id":"https:\/\/androidbubble.com\/blog\/#website","url":"https:\/\/androidbubble.com\/blog\/","name":"AndroidBubble Blog","description":"Articles &amp; Posts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/androidbubble.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7","name":"Fahad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","caption":"Fahad"},"sameAs":["http:\/\/www.androidbubbles.com\/","https:\/\/x.com\/phpFlex"],"url":"https:\/\/androidbubble.com\/blog\/author\/admin\/"}]}},"views":1050,"jetpack_featured_media_url":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2011\/12\/wdwd_caching.gif","_links":{"self":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/comments?post=391"}],"version-history":[{"count":6,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/391\/revisions"}],"predecessor-version":[{"id":1988,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/391\/revisions\/1988"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media\/394"}],"wp:attachment":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media?parent=391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/categories?post=391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/tags?post=391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}