{"id":34670,"date":"2018-01-19T14:17:34","date_gmt":"2018-01-19T20:17:34","guid":{"rendered":"https:\/\/wpengine.com\/?post_type=resource&#038;p=34670"},"modified":"2025-11-21T13:15:55","modified_gmt":"2025-11-21T19:15:55","slug":"wordpress-browser-caching","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/","title":{"rendered":"How To: WordPress Browser Caching"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Browser caching is a sore subject among many WordPress<sup>\u00ae<\/sup> developers. Caching in your end-user\u2019s web browser is hard to see and even harder to control at times, yet it can affect their entire experience.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What\u2019s more, page performance testing will often instruct developers to \u201cleverage browser caching,\u201d and this makes the problem more complex. How can developers leverage browser caching when they barely understand it?&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note: WP Engine Customers <span style=\"text-decoration: underline\">do not<\/span> need a browser caching plugin!<\/strong> We handle it on the server side which is far more efficient than using a plugin based caching solution!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this guide we will explain what browser caching is, how it works, and the ways you can manipulate it on your WordPress website.<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">What is Browser Caching?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Simply put, browser caching is when your web browser stores a copy of your web page, or elements within that page (like images, Cascading Style Sheet (CSS), and JavaScript files) on your local machine. That way, the browser can bring up those files more quickly the next time they are requested.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is great, because it means a faster experience for returning users on your website. However, it can mean that the browser cache might hold on to elements of your site for longer than you\u2019d like.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, what if you replace an image with a new one that has the same name? How will the web browser know to load the new image? How many users are getting the old one? These are all questions developers struggle to answer when it comes to browser caching.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Does It Mean to Leverage Browser Caching?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you leverage browser caching, you\u2019re taking full advantage of this technology to speed up your page loading times. This means tailoring the caching\u2019s configuration to tell browsers how long they should retain certain website files. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As a result, users\u2019 browsers should be able to load the saved versions of your pages much faster than if they had to request them from your server again. However, the cache can be updated frequently enough to avoid showing old content to users.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We\u2019ll cover several different ways to do this shortly. Typically, in order to&nbsp; leverage browser caching,&nbsp;you\u2019ll need to edit some of your website files. Regardless of the method, however, your goal is to specify the storage duration and cache behavior for specific file types.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Does Leveraging Browser Caching Speed Up WordPress?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you visit a website, clicking on a link or typing in a web address initiates a call to that site\u2019s server. The server gets the call, retrieves the necessary information (which can include images, coded files like HTML and CSS, and so on) and sends them out to be displayed for the user.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While this usually takes moments, a delay of only two or three seconds puts you at risk of losing traffic. Fortunately, browser caching can improve page speeds for WordPress websites.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Browser Caching on WP Engine<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400\">With WP Engine, our robust caching layers mean your site is very cacheable, making it speedier for your users. Our web servers add headers to your website, telling it how long to cache each page:<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1776\" height=\"656\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2018\/01\/cache_control_headers.png\" alt=\"How To: WordPress Browser Caching\" class=\"wp-image-34672\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/01\/cache_control_headers.png 1776w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/01\/cache_control_headers-300x111.png 300w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/01\/cache_control_headers-768x284.png 768w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/01\/cache_control_headers-1024x378.png 1024w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/01\/cache_control_headers-1500x554.png 1500w\" sizes=\"auto, (max-width: 1776px) 100vw, 1776px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">By default, web pages are cached for ten minutes (600 seconds), and static resources like your images, JavaScript, and CSS files are cached for 30 days (as they rarely change).&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Web browsers respect the headers we set for our server-level caching. This means they will also cache pages for ten minutes, and static resources for 30 days.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Leverage Browser Caching by Editing Your <em>.htaccess<\/em> File<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you aren\u2019t hosting your website with WP Engine, but you are using Apache (one of the <a href=\"https:\/\/wordpress.org\/about\/requirements\/\" target=\"_blank\" rel=\"noreferrer noopener\">recommended servers for WordPress<\/a>) you can manually manage your browser cache settings. This is accomplished by configuring a header in your website\u2019s <a href=\"https:\/\/wordpress.org\/support\/article\/htaccess\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>.htaccess<\/em> file<\/a>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>.htaccess<\/em> is a configuration file that contains important directives for your WordPress server. To access it, you\u2019ll need to use a File Transfer Protocol (FTP) application such as <a href=\"https:\/\/filezilla-project.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">FileZilla<\/a> or <a href=\"https:\/\/www.globalscape.com\/cuteftp\" target=\"_blank\" rel=\"noreferrer noopener\">CuteFTP<\/a>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your host offers <a href=\"https:\/\/wpengine.com\/resources\/how-to-access-wordpress-files-using-sftp\/\" target=\"_blank\" rel=\"noreferrer noopener\">Secure FTP (SFTP) access<\/a>, it\u2019s best to use that to locate and edit the file in the root directory of your WordPress website. Since the file name begins with a period, you may have to <a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/why-you-cant-find-htaccess-file-on-your-wordpress-site\/\" target=\"_blank\" rel=\"noreferrer noopener\">enable hidden files<\/a> in your FTP\/SFTP client.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Editing this file directly offers more granular control to developers who want to leverage browser caching, but don\u2019t want to be constrained by limited plugin options. To get you started, let\u2019s walk through the three steps in the process.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Note: WP Engine no longer supports the .htaccess file and has deprecated it across our platform. Sites using custom .htaccess directives outside of default WordPress rules can convert them using the guidance in <a href=\"https:\/\/wpengine.com\/support\/htaccess-deprecation\/\" target=\"_blank\" rel=\"noreferrer noopener\">this support article<\/a>.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Add Expire Headers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Expire headers involve a snippet of code that tells your server when a cache duration is set to expire for specific file types. Essentially, you\u2019re setting the expiration date for the cache storage.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you locate the <em>.htaccess<\/em> file, you can add the following <a href=\"https:\/\/catswhocode.com\/add-expires-headers\/\" target=\"_blank\" rel=\"noreferrer noopener\">expires header code<\/a>:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>## EXPIRES CACHING ##\n\nExpiresActive On\n\n## EXPIRES CACHING ##<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This turns on the expires header, and enables you to add instructions for each of the file types you want to extend the cache duration for.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, if you want all image files with a <em>.jpg<\/em> extension to remain cached for one month from the date of a user\u2019s last browser access, you can add the following code to the line below the \u201cOn\u201d command:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ExpiresByType image\/jpg \"access plus 1 month\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019ll need to repeat the \u201cExpiresByType\u201d directive for every file type you want to cache. Each type should be on a separate line. Then you can add the following code at the end before you close out, to set a default cache for anything that slips through the cracks:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ExpiresDefault \"access plus 2 days\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This represents a basic expire headers code. It\u2019s important to note that this is a somewhat dated approach to leveraging browser caching. However, it\u2019s okay to pair it with our next method, as long as you do not set conflicting expiration parameters.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Add Cache-Control Headers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Cache-Control is a directive used for both requests and responses in the browser. In order to create a valid cache-control header, there are a few rules you\u2019ll need to follow:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Directives are case-sensitive, but it\u2019s recommended that you use all lowercase letters.<\/li>\n\n\n\n<li>Use commas to separate multiple directives.<\/li>\n\n\n\n<li>Certain directives have either token or quoted-string optional arguments.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">With this directive, you can set different rules for various file types. If you always want <em>.html<\/em> and <em>.php<\/em> files to be revalidated and never cached, for example, you can use cache-control to do so. The following are examples of <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Cache-Control\" target=\"_blank\" rel=\"noreferrer noopener\">cache-control request directives<\/a>:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Cache-Control: max-age=&lt;seconds&gt;\nCache-Control: max-stale&#091;=&lt;seconds&gt;]\nCache-Control: min-fresh=&lt;seconds&gt;\nCache-Control: no-cache \nCache-Control: no-store\nCache-Control: no-transform\nCache-Control: only-if-cached<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note that the unit of time is configured in seconds. In our example above, the \u201cmax-age\u201d has been set to ten minutes (or 600 seconds). If you wanted to set the expiration at four hours, you would replace that number with \u201c14400.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By using both the request and <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Cache-Control\" target=\"_blank\" rel=\"noreferrer noopener\">responsive directives<\/a>, you can configure how you want all of your website\u2019s files to respond to user activity. This means you can exclude items like your <em>wp-admin<\/em> files from caching, as you\u2019ll always want to have access to the most recent versions from your server.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Disable the ETag Headers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An Entity Tag (ETag) is a response header used to identify or \u2018tag\u2019 different versions of your website\u2019s files. ETags enable the native browser cache to be more efficient and effective.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This technique helps to cut down on unnecessary revalidation by the server, by identifying files that have not changed and don\u2019t need to be refreshed. <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/ETag\" target=\"_blank\" rel=\"noreferrer noopener\">ETags are assigned<\/a> whenever a resource file for a given URL changes. The tags are then used for comparison, to see if there are differences between the old and new versions.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since you\u2019ve just added expires and cache-control headers to your <em>.htaccess<\/em> file, however, you don\u2019t really need ETag to do its job anymore. To avoid conflicts, it\u2019s best to disable this header. You can do so by adding <a href=\"https:\/\/www.askapache.com\/htaccess\/apache-speed-etags\/\" target=\"_blank\" rel=\"noreferrer noopener\">the following code<\/a> after your cache-control header:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Header unset ETag\nFileETag None<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This forces browsers to rely on the cache-control and expires headers you\u2019ve already configured.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Server Configuration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you are not using Apache to run WordPress, it\u2019s likely you might be <a href=\"https:\/\/wordpress.org\/about\/requirements\/\" target=\"_blank\" rel=\"noreferrer noopener\">using Nginx<\/a>. This is the other server that is recommended by WordPress. In this case, you still have some control over how long your files are cached by the browser.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, you\u2019ll need to do some server configuration first. If you\u2019re not familiar with Nginx, this will require using <a href=\"https:\/\/en.wikipedia.org\/wiki\/Terminal_emulator\" target=\"_blank\" rel=\"noreferrer noopener\">Terminal<\/a> to execute instructions and changes through the command line.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Leverage Browser Caching on NGINX Servers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Your first step is to check your current cache settings. You can do that by sending a request in Terminal to an image file on your website. You should receive the header information in return.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you decide you want to make adjustments to your cache settings, you can start with the following two directives to enable basic caching with Nginx:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/nginx.org\/en\/docs\/http\/ngx_http_proxy_module.html?&amp;_ga=2.118143241.101391355.1587676626-1815800600.1587676626#proxy_cache_path\" target=\"_blank\" rel=\"noreferrer noopener\">Proxy_cache_path<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/nginx.org\/en\/docs\/http\/ngx_http_proxy_module.html#proxy_cache\" target=\"_blank\" rel=\"noreferrer noopener\">Proxy_cache<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The first directive is how you\u2019ll set the path and configuration for the cache, and the second directive is what activates the new caching rules.<br>Nginx also has <a href=\"https:\/\/www.nginx.com\/blog\/nginx-caching-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\">an in-depth guide available<\/a> for more ways to enhance your cache options. It includes directives for establishing shared memory zones for storing cache keys, and much more.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Leverage Browser Caching with WordPress Browser Caching Plugins<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When hosting on WP Engine, our caching layers take care of cumbersome configurations and fine-tuning on your behalf. If you do not host with WP Engine, you can use one of the following WordPress plugins to set and configure caching settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>As noted above, you <span style=\"text-decoration: underline\">do not<\/span> need a caching plugin if your sites are hosted on WP Engine<\/strong>, we handle it for you more efficiently on the server side.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"331\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.57.15-PM-1024x331.png\" alt=\"w3 Total Cache plugin. WordPress browser caching\" class=\"wp-image-146775\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.57.15-PM-1024x331.png 1024w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.57.15-PM-540x174.png 540w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.57.15-PM-768x248.png 768w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.57.15-PM-1536x496.png 1536w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.57.15-PM-1500x485.png 1500w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.57.15-PM.png 1876w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/wordpress.org\/plugins\/w3-total-cache\/\" target=\"_blank\" rel=\"noreferrer noopener\">W3 Total Cache<\/a><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/wordpress.org\/plugins\/w3-total-cache\/\" target=\"_blank\" rel=\"noreferrer noopener\">W3 Total Cache<\/a> plugin is one of the most-widely used caching plugins in the WordPress.org repository.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pros:<\/strong> Not only does this plugin help users easily configure server and browser caching preferences, it also offers cacheability statistics for performance insights, and offers minification of static resources for faster access.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Cons:<\/strong> Finding the right configuration to optimize performance but not conflict with developer workflows can be a struggle. There are many configuration options, which can be confusing for less advanced users.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: This is on our <a href=\"https:\/\/wpengine.com\/support\/disallowed-plugins\/\" target=\"_blank\" rel=\"noreferrer noopener\">disallowed plugins list<\/a>, since it conflicts with and duplicates our server-side caching technology.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"334\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.56.46-PM-1024x334.png\" alt=\"WP Super Cache plugin. WordPress browser caching\" class=\"wp-image-146774\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.56.46-PM-1024x334.png 1024w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.56.46-PM-540x176.png 540w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.56.46-PM-768x251.png 768w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.56.46-PM-1536x501.png 1536w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.56.46-PM-1500x489.png 1500w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.56.46-PM.png 1870w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/wordpress.org\/plugins\/wp-super-cache\/\" target=\"_blank\" rel=\"noreferrer noopener\">WP Super Cache<\/a><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/wordpress.org\/plugins\/wp-super-cache\/\" target=\"_blank\" rel=\"noreferrer noopener\">WP Super Cache<\/a> uses the same style of directives that you can set manually in your configuration files, and has a wide user base.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pros:<\/strong> Unlike W3 Total Cache, WP Super Cache offers the ability to get granular about which users get cached pages and which don\u2019t, with only a few simple configuration options for ease of use.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Cons:<\/strong> WP Super Cache stores a static file copy of each page on your web server as it is cached. While it offers a \u2018cleanup\u2019 option to periodically clean out your cached files, this can bulk up your storage quickly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: This is on our <a href=\"https:\/\/wpengine.com\/support\/disallowed-plugins\/\" target=\"_blank\" rel=\"noreferrer noopener\">disallowed plugins list<\/a>, since it conflicts with and duplicates our server-side caching technology.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"270\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2020\/05\/wp-rocket-1024x270.jpg\" alt=\"WP Rocket WordPress plugin. WordPress browser caching\" class=\"wp-image-105894\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/wp-rocket-1024x270.jpg 1024w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/wp-rocket-300x79.jpg 300w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/wp-rocket-768x203.jpg 768w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/wp-rocket.jpg 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/wp-rocket.me\/\" target=\"_blank\" rel=\"noreferrer noopener\">WP Rocket<\/a><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A premium plugin, <a href=\"https:\/\/wp-rocket.me\/\" target=\"_blank\" rel=\"noreferrer noopener\">WP Rocket<\/a> offers paid licensing at the single site, three-site, and unlimited website-per-year levels.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pros:<\/strong> This plugin <em>can<\/em> be used in conjunction with WP Engine\u2019s caching layers, and offers preloading of content and lazy-loading for images with minimal manual configuration needed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Cons:<\/strong> WP Rocket also stores static files on the web server, which can clutter your web server storage space. Some users have also found the pre-built options to be limiting, and have developed extra add-on plugins to add the functionality they need.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"922\" height=\"298\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2020\/05\/wp-fastest-cache.jpg\" alt=\"WP Fastest Cache plugin. WordPress browser caching\" class=\"wp-image-105895\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/wp-fastest-cache.jpg 922w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/wp-fastest-cache-300x97.jpg 300w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/wp-fastest-cache-768x248.jpg 768w\" sizes=\"auto, (max-width: 922px) 100vw, 922px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/wordpress.org\/plugins\/wp-fastest-cache\/\" target=\"_blank\" rel=\"noreferrer noopener\">WP Fastest Cache<\/a><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">While <a href=\"https:\/\/wordpress.org\/plugins\/wp-fastest-cache\/\" target=\"_blank\" rel=\"noreferrer noopener\">WP Fastest Cache<\/a> doesn\u2019t have quite as many downloads as the other options on our list, over 500,000 users have given it a solid five-star rating.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pros:<\/strong> Use of this plugin is very simple, as it automatically edits the <em>.htaccess<\/em> file on your behalf. Pages and posts can be excluded from the cache by using a shortcode. It also works for browser caching, minification, and compression.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Cons:<\/strong> WP Fastest Cache also stores files on the web server, which can bulk up your disk space usage. It is also not compatible with multisite.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: This is on our <a href=\"https:\/\/wpengine.com\/support\/disallowed-plugins\/\" target=\"_blank\" rel=\"noreferrer noopener\">disallowed plugins list<\/a>, since it conflicts with and duplicates our server-side caching technology.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"335\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.54.08-PM-1024x335.png\" alt=\"Leverage Browser Caching plugin. WordPress browser caching\" class=\"wp-image-146773\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.54.08-PM-1024x335.png 1024w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.54.08-PM-540x177.png 540w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.54.08-PM-768x251.png 768w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.54.08-PM-1536x503.png 1536w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.54.08-PM-1500x491.png 1500w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-03-at-2.54.08-PM.png 1876w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/wordpress.org\/plugins\/leverage-browser-caching\/\" target=\"_blank\" rel=\"noreferrer noopener\">Leverage Browser Caching<\/a><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/wordpress.org\/plugins\/leverage-browser-caching\/\" target=\"_blank\" rel=\"noreferrer noopener\">Leverage Browser Caching<\/a> plugin is a straightforward, free tool. Its main focus is to improve your page speeds, by establishing better browser caching for your website\u2019s files.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pros:<\/strong> This an easy-to-use plugin. It adds expire headers directives directly into your <em>.htaccess<\/em> file, so you don\u2019t have to find and edit the code yourself.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Cons: <\/strong>There is no settings interface for this plugin. Once you install it, the header will be automatically added to your file. Additionally, there is no way to know what the default cache settings are unless you look them up in your <em>.htaccess<\/em> file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: This is not on our disallowed plugins list. However, it\u2019s best to check with our support technicians before you install it. Its essential features may duplicate or conflict with our server-side caching technology.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why WP Engine for Caching?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The WP Engine <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress hosting<\/a> platform architecture is finely-tuned to provide the best website performance and <a href=\"https:\/\/wpengine.com\/scale-to-millions-of-hits-a-day-or-hour\/\" target=\"_blank\" rel=\"noreferrer noopener\">highest cacheability<\/a>. This means your website will be more agile when floods of traffic come to your website, while still responding quickly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our <a href=\"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/\" target=\"_blank\" rel=\"noreferrer noopener\">intelligent traffic shaping system<\/a> also ensures that even highly un-cacheable sites will stay up under high-traffic conditions. Ready to dive in? Check out our <a href=\"https:\/\/wpengine.com\/plans\/\" target=\"_blank\" rel=\"noreferrer noopener\">WP Engine hosting plans<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Browser caching is a sore subject among many WordPress\u00ae developers. Caching in your end-user\u2019s web browser is hard to see and even harder to control at times, yet it can affect their entire experience.\u00a0 What\u2019s more, page performance testing will often instruct developers to \u201cleverage browser caching,\u201d and this makes the problem more complex. How<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":1,"featured_media":34673,"template":"","resource-topic":[912,898,901],"resource-role":[896],"resource-type":[916],"class_list":["post-34670","resource","type-resource","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To: WordPress Browser Caching<\/title>\n<meta name=\"description\" content=\"Browser caching improves site speed. Learn what WordPress browser caching is, plugins, and how WP Engine sets up browser caching for you.\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To: WordPress Browser Caching\" \/>\n<meta property=\"og:description\" content=\"Browser caching improves site speed. Learn what WordPress browser caching is, plugins, and how WP Engine sets up browser caching for you.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-21T19:15:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/01\/browser_caching_banner.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How To: WordPress Browser Caching\" \/>\n<meta name=\"twitter:description\" content=\"Browser caching improves site speed. Learn what WordPress browser caching is, plugins, and how WP Engine sets up browser caching for you.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/01\/browser_caching_banner.png\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/\",\"name\":\"How To: WordPress Browser Caching\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2018-01-19T20:17:34+00:00\",\"dateModified\":\"2025-11-21T19:15:55+00:00\",\"description\":\"Browser caching improves site speed. Learn what WordPress browser caching is, plugins, and how WP Engine sets up browser caching for you.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How To: WordPress Browser Caching\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/f5301455463371a10d1fc290e9ad0085\",\"name\":\"WP Engine\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"caption\":\"WP Engine\"},\"sameAs\":[\"https:\/\/wpengine.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To: WordPress Browser Caching","description":"Browser caching improves site speed. Learn what WordPress browser caching is, plugins, and how WP Engine sets up browser caching for you.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"How To: WordPress Browser Caching","og_description":"Browser caching improves site speed. Learn what WordPress browser caching is, plugins, and how WP Engine sets up browser caching for you.","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2025-11-21T19:15:55+00:00","og_image":[{"width":1100,"height":400,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/01\/browser_caching_banner.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_title":"How To: WordPress Browser Caching","twitter_description":"Browser caching improves site speed. Learn what WordPress browser caching is, plugins, and how WP Engine sets up browser caching for you.","twitter_image":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/01\/browser_caching_banner.png","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/","name":"How To: WordPress Browser Caching","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2018-01-19T20:17:34+00:00","dateModified":"2025-11-21T19:15:55+00:00","description":"Browser caching improves site speed. Learn what WordPress browser caching is, plugins, and how WP Engine sets up browser caching for you.","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-browser-caching\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"How To: WordPress Browser Caching"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/f5301455463371a10d1fc290e9ad0085","name":"WP Engine","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","caption":"WP Engine"},"sameAs":["https:\/\/wpengine.com"]}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/01\/browser_caching_resource_grid.png","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Developer","topic":"<strong>Topics:<\/strong> Performance, Scalability, WordPress","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/34670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/1"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media\/34673"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=34670"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=34670"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=34670"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=34670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}