{"id":28596,"date":"2018-10-18T03:39:49","date_gmt":"2018-10-18T08:39:49","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=28596"},"modified":"2022-12-07T10:48:58","modified_gmt":"2022-12-07T16:48:58","slug":"configure-apache-2-to-control-browser-caching","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/","title":{"rendered":"Configure Apache 2 to Control Browser Caching"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-28767\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configure-Apache-2-to-Control-Browser-Caching.jpg\" alt=\"Configure Apache 2 to Control Browser Caching\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configure-Apache-2-to-Control-Browser-Caching.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configure-Apache-2-to-Control-Browser-Caching-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configure-Apache-2-to-Control-Browser-Caching-300x150.jpg 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-28766\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configuring-Apache-2-to-Control-Browser-Caching.jpg\" alt=\"Configuring Apache 2 to Control Browser Caching\" width=\"150\" height=\"83\" \/>In this article, we are going to talk about<strong> how to configure Apache2 to control browser caching<\/strong>. If you want to reduce the consumption of your server&#8217;s resources, improved responsiveness, bandwidth utilization, availability of content during network interruptions, and give your end users a faster experience, then you need to use the caching that will allow all of this.<\/p>\n<p>A cache is a method for temporarily storing the most requested content so that future requests for that content will be more quickly served by temporary storage (cache) than from the primary location. By using caching, you are efficiently reusing the previously retrieved data.\u00a0Today we are <strong>configuring browser caching control on Apache 2<\/strong>. Let&#8217;s get started.<!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69fcb7aca0e04\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69fcb7aca0e04\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#1-Prerequisites\" >1. Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#2-Verify-Modules\" >2. Verify Modules<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#3-Enable-File-Caching\" >3.\u00a0 Enable File Caching<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#4-Enable-File-Caching-on-Ubuntu\" >4. Enable File Caching on Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#5-Enable-File-Caching-on-CentOS\" >5. Enable File Caching on CentOS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#6-Edit-the-Apache-main-configuration-file\" >6. Edit the Apache main configuration file<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"1-Prerequisites\"><\/span>1. Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>ssh access in VPS;<\/li>\n<li>installed Apache2 web server;<\/li>\n<li>Basic Linux knowledge (navigating, opening files, editing files, saving files etc&#8230;);<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"2-Verify-Modules\"><\/span>2. Verify Modules<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-28768\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/How-to-Configure-Apache-2-to-Control-Browser-Caching.jpg\" alt=\"How to Configure Apache 2 to Control Browser Caching\" width=\"150\" height=\"99\" \/>Usually, our servers already have included file_cache that is needed to control the cache of the browser. However, we need to make sure that our Apache2 together with our module are installed and ready to accept the directives. There is a simple way to verify our module. To list the Apache modules, we will use the apachectl command to list the modules and pipe with the grep command to filter out our results and show only the modules we need.<\/p>\n<p>We can verify the file_cache module with the following command:<\/p>\n<pre>apachectl -M | grep file_cache<\/pre>\n<p>the output should be:<\/p>\n<pre>file_cache_module (shared)<\/pre>\n<p>If you do not have anything in the output after running these commands or it&#8217;s simply blank then the module is not installed. You need to have it installed in order to continue with this tutorial.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"3-Enable-File-Caching\"><\/span>3.\u00a0 Enable File Caching<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-28770\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/How-To-Control-Browser-Caching-with-Apache-2.jpg\" alt=\"How To Control Browser Caching with Apache 2\" width=\"120\" height=\"87\" \/>To use the functionality of the file_cache module you need to enable it first. If you are running CentOS 7 or Ubuntu 16.04, this module by default it is not configured in the Apache so this module will not load. We will show you how to configure and enable the file_cache module in CentOS 7 and Ubuntu 16.04.<\/p>\n<h2><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"4-Enable-File-Caching-on-Ubuntu\"><\/span>4. Enable File Caching on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you are using Ubuntu 16.04. you can enable the file_cache module with the following command:<\/p>\n<pre>a2enmod file_cache<\/pre>\n<p>Next step is to edit the Apache main configuration file. Open the Apache main configuration file by typing:<\/p>\n<pre>nano \/etc\/apache2\/apache2.conf<\/pre>\n<p>To use CacheFile add this line in the configuration file:<\/p>\n<pre>CacheFile \/var\/www\/html\/index.html \/var\/www\/html\/somefile.index<\/pre>\n<p>If you want to use MMapFile directive instead you should add this line in the configuration file:<\/p>\n<pre>MMapFile \/var\/www\/html\/index.html \/var\/www\/html\/somefile.index<\/pre>\n<p>There should be no reason to configure both CacheFile and MMapFile for the same files, but you can also use them on different files instead. When you finish with configuring the file save and close it.<\/p>\n<p>You can check the Apache configuration file for syntax error with the following command:<\/p>\n<pre>apachectl configtest<\/pre>\n<p>In the end when you receive <strong>Syntax OK<\/strong> you can restart the Apache by typing the command:<\/p>\n<pre>service apache2 restart<\/pre>\n<p>After the Apache will restart, you will start to use the file_cache module on the files you configured.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"5-Enable-File-Caching-on-CentOS\"><\/span>5. Enable File Caching on CentOS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For CentOS 7 we will create a file in the \/etc\/httpd\/conf.modules.d directory with name 00-cache:<\/p>\n<pre>nano \/etc\/httpd\/conf.modules.d\/00-cache.conf<\/pre>\n<p>Insert the following line in your new configuration file:<\/p>\n<pre>LoadModule file_cache_module modules\/mod_file_cache.so<\/pre>\n<p>Save and close the file.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"6-Edit-the-Apache-main-configuration-file\"><\/span>6. Edit the Apache main configuration file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now you should edit the Apache main configuration file. Open the Apache main configuration file with nano editor with this command:<\/p>\n<pre>nano \/etc\/httpd\/conf\/httpd.conf<\/pre>\n<p>If you want to use the CacheFile directive to handle caching, you should insert the following line in the Apache configuration file.<\/p>\n<pre>CacheFile \/var\/www\/html\/index.html \/var\/www\/html\/somefile.index<\/pre>\n<p>If you want to use MMapFile directive instead you should add this line in the configuration file:<\/p>\n<pre>MMapFile \/var\/www\/html\/index.html \/var\/www\/html\/somefile.index<\/pre>\n<p>In practice, there is no need both CacheFile and MMapFile directives to be configured for the same files, but you can use them both in the configuration file for a deferent set of files.<\/p>\n<p>When you finish with configuring the file save and close it. You can check the Apache configuration file for syntax error with the following command:<\/p>\n<pre>apachectl configtest<\/pre>\n<p>You should receive <strong>a Syntax OK<\/strong> message, which means that your configuration is correct and you can restart the Apache by executing the command:<\/p>\n<pre>systemctl restart httpd<\/pre>\n<p>In this tutorial, in the first part, we showed you how to check if your file_cache module is enabled on your server. In the second part, we presented how to enable and configure Apache2 to control browser caching on Ubuntu and CentOS.<\/p>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-28769\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Set-Up-Apache-2-to-Control-Browser-Caching.jpg\" alt=\"Set Up Apache 2 to Control Browser Caching\" width=\"120\" height=\"96\" \/>Of course, you don\u2019t have to<strong> configure Apache2 to control browser caching<\/strong>, if you use one of our <a href=\"https:\/\/www.rosehosting.com\/vps-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to do this for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS<\/strong><\/span>. If you liked this post on <strong>configuring Apache2 to control browser caching<\/strong>, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we are going to talk about how to configure Apache2 to control browser caching. If you want &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Configure Apache 2 to Control Browser Caching\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#more-28596\" aria-label=\"Read more about Configure Apache 2 to Control Browser Caching\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":28767,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1709,1699,1698],"tags":[37,1761],"class_list":["post-28596","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-caching","category-centos","category-ubuntu","tag-apache","tag-browser-cache","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Configure Apache 2 to Control Browser Caching | RoseHosting<\/title>\n<meta name=\"description\" content=\"Configure Apache 2 to Control Browser Caching | RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Configure Apache 2 to Control Browser Caching\" \/>\n<meta property=\"og:description\" content=\"Configure Apache 2 to Control Browser Caching | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-18T08:39:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-07T16:48:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configure-Apache-2-to-Control-Browser-Caching.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Configure Apache 2 to Control Browser Caching\",\"datePublished\":\"2018-10-18T08:39:49+00:00\",\"dateModified\":\"2022-12-07T16:48:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/\"},\"wordCount\":804,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Configure-Apache-2-to-Control-Browser-Caching.jpg\",\"keywords\":[\"apache\",\"browser cache\"],\"articleSection\":[\"Caching\",\"CentOS\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/\",\"name\":\"Configure Apache 2 to Control Browser Caching | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Configure-Apache-2-to-Control-Browser-Caching.jpg\",\"datePublished\":\"2018-10-18T08:39:49+00:00\",\"dateModified\":\"2022-12-07T16:48:58+00:00\",\"description\":\"Configure Apache 2 to Control Browser Caching | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Configure-Apache-2-to-Control-Browser-Caching.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Configure-Apache-2-to-Control-Browser-Caching.jpg\",\"width\":742,\"height\":372,\"caption\":\"Configure Apache 2 to Control Browser Caching\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-apache-2-to-control-browser-caching\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configure Apache 2 to Control Browser Caching\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Configure Apache 2 to Control Browser Caching | RoseHosting","description":"Configure Apache 2 to Control Browser Caching | RoseHosting","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:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/","og_locale":"en_US","og_type":"article","og_title":"Configure Apache 2 to Control Browser Caching","og_description":"Configure Apache 2 to Control Browser Caching | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2018-10-18T08:39:49+00:00","article_modified_time":"2022-12-07T16:48:58+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configure-Apache-2-to-Control-Browser-Caching.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Configure Apache 2 to Control Browser Caching","datePublished":"2018-10-18T08:39:49+00:00","dateModified":"2022-12-07T16:48:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/"},"wordCount":804,"commentCount":2,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configure-Apache-2-to-Control-Browser-Caching.jpg","keywords":["apache","browser cache"],"articleSection":["Caching","CentOS","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/","url":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/","name":"Configure Apache 2 to Control Browser Caching | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configure-Apache-2-to-Control-Browser-Caching.jpg","datePublished":"2018-10-18T08:39:49+00:00","dateModified":"2022-12-07T16:48:58+00:00","description":"Configure Apache 2 to Control Browser Caching | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configure-Apache-2-to-Control-Browser-Caching.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/Configure-Apache-2-to-Control-Browser-Caching.jpg","width":742,"height":372,"caption":"Configure Apache 2 to Control Browser Caching"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/configure-apache-2-to-control-browser-caching\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Configure Apache 2 to Control Browser Caching"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/28596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=28596"}],"version-history":[{"count":3,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/28596\/revisions"}],"predecessor-version":[{"id":43777,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/28596\/revisions\/43777"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/28767"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=28596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=28596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=28596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}