{"id":28272,"date":"2023-03-22T11:00:24","date_gmt":"2023-03-22T11:00:24","guid":{"rendered":"https:\/\/wpdatatables.com\/?p=28272"},"modified":"2023-12-29T18:44:37","modified_gmt":"2023-12-29T18:44:37","slug":"leverage-browser-caching","status":"publish","type":"post","link":"https:\/\/wpdatatables.com\/leverage-browser-caching\/","title":{"rendered":"How to Leverage Browser Caching in WordPress"},"content":{"rendered":"<p>If you want to leverage browser caching in WordPress, you already know about the main benefit it has \u2013 it improves website loading speed.<\/p>\n<p>This detail is highly important for people who encounter this issue. Luckily, there are tools such as <a href=\"https:\/\/developers.google.com\/speed\/pagespeed\/insights\/\">Google PageSpeed Insights<\/a> or <a href=\"https:\/\/gtmetrix.com\/\">GT matrix<\/a>. These can tell you exactly what you want to know about your website\u2019s performance, what you need to change if you have or don&#8217;t have browser caching enabled already, and a lot more.<\/p>\n<p><!--more--><\/p>\n<p><a href=\"https:\/\/developers.google.com\/speed\/pagespeed\/insights\/\"><noscript><img decoding=\"async\" class=\"alignnone wp-image-28297 size-full\" src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/Untitled-1-2.jpg\" alt width=\"800\" height=\"304\" srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/Untitled-1-2.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/Untitled-1-2-300x114.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\"><\/noscript><img decoding=\"async\" class=\"alignnone wp-image-28297 size-full lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20304%22%3E%3C%2Fsvg%3E\" alt width=\"800\" height=\"304\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20304%22%3E%3C%2Fsvg%3E 800w\" sizes=\"(max-width: 800px) 100vw, 800px\" data-srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/Untitled-1-2.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/Untitled-1-2-300x114.jpg 300w\" data-src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/Untitled-1-2.jpg\"><\/a><\/p>\n<p>Ok, ok. So, what&#8217;s the big deal? Why do you need to leverage browser caching in WordPress?<\/p>\n<p>This matter is discussed in detail below by our <strong><a href=\"https:\/\/wpdatatables.com\/\">wpDataTables <\/a><\/strong>team, so continue reading and you will manage to leverage browser caching by the end of this article (fingers crossed).<\/p>\n<p>Creating a visually pleasing website is no longer paramount when the loading times are so bad that they make users leave it in seconds.<\/p>\n<p>You need to <a href=\"https:\/\/www.founderjar.com\/best-website-builder\/\">build a website<\/a> with fast-loading pages and quality content. Every single person in contact with the Internet should know this. And the easiest way to make a website faster is if you leverage browser caching.<\/p>\n<p><a href=\"https:\/\/gtmetrix.com\/\"><noscript><img decoding=\"async\" class=\"alignnone wp-image-28275 size-full\" src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/gt-metrix.jpg\" alt width=\"800\" height=\"409\" srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/gt-metrix.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/gt-metrix-300x153.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\"><\/noscript><img decoding=\"async\" class=\"alignnone wp-image-28275 size-full lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20409%22%3E%3C%2Fsvg%3E\" alt width=\"800\" height=\"409\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20409%22%3E%3C%2Fsvg%3E 800w\" sizes=\"(max-width: 800px) 100vw, 800px\" data-srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/gt-metrix.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/gt-metrix-300x153.jpg 300w\" data-src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/gt-metrix.jpg\"><\/a><\/p>\n<p>This concept will be explained later, but you should know that is the top recommendation of Google when it comes to loading times.<\/p>\n<p>Normally, the loading speed of your website can be improved by up to 50%, as long as you use the proper methods.<\/p>\n<p>What does browser caching have to do with it?<\/p>\n<p>Let&#8217;s dig in.<\/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<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<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=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#Table_of_Contents\">Table of Contents<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#Leverage_Browser_Caching_What_do_you_mean_by_that\">Leverage Browser Caching? What do you mean by that?<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#How_does_Leverage_Browser_Caching_in_WordPress_work\">How does Leverage Browser Caching in WordPress work?<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#Differences_between_server_caching_and_browser_caching\">Differences between server caching and browser caching<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#Leverage_Browser_Caching_in_WordPress\">Leverage Browser Caching in WordPress<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#NGINX_Server_and_Browser_Caching\">NGINX Server and Browser Caching<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#Leverage_Browsing_in_WordPress_using_plugins\">Leverage Browsing in WordPress using plugins<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#W3_Total_Cache_%E2%80%93_WordPress_plugin\">W3 Total Cache \u2013 WordPress plugin<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#WP_Fastest_Cache\">WP Fastest Cache<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#Cache_Enabler_%E2%80%93_WordPress_Cache\">Cache Enabler \u2013 WordPress Cache<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#Use_Yoast_SEO_to_edit_the_htaccess_file\">Use Yoast SEO to edit the .htaccess file<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-12\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#Caching_third-party_resources\">Caching third-party resources<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-13\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#FAQs_about_leveraging_browser_caching\">FAQs about leveraging browser caching<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-14\" href=\"#\" data-href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/#Ending_thoughts_on_how_to_leverage_browser_caching_in_WordPress\">Ending thoughts on how to leverage browser caching in WordPress<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Table_of_Contents\"><\/span><strong>Table of Contents<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>Leverage Browser Caching? What is that?<\/li>\n<li>How does Leverage Browser Caching in WordPress work?<\/li>\n<li>Differences between server caching and browser caching<\/li>\n<li>Leverage Browser Caching in WordPress<\/li>\n<li>NGINX Server and Browser Caching<\/li>\n<li>Leverage Browser Caching in WordPress using plugins<\/li>\n<li>Use Yoast SEO to edit the .htaccess file<\/li>\n<li>Caching third-party resources<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Leverage_Browser_Caching_What_do_you_mean_by_that\"><\/span><strong>Leverage Browser Caching? What do you mean by that?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For those who don\u2019t know why you need to leverage browser caching, it\u2019s best to explain it in simpler words.<\/p>\n<p>Caching represents the amount of time that browsers locally store the cacheable resources available on a website.<\/p>\n<p>These resources include images, JavaScript, CSS, and others. Whenever a person accesses the website, the cacheable resources which are stored on your computer are uploaded back. The loading speed of the website is thus improved visibly. This is the reason why people want to leverage browser caching in WordPress.<\/p>\n<p>Different browsers utilize different caching mechanisms. When optimizing your WordPress site for browser caching, keep in mind that the <a href=\"https:\/\/en.softonic.com\/articles\/brave-vs-firefox\">difference between Brave and Firefox<\/a> is that Brave browser prioritizes privacy while Firefox aims for a balance between privacy and performance in handling cached content.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_does_Leverage_Browser_Caching_in_WordPress_work\"><\/span><strong>How does Leverage <\/strong><strong>Browser <\/strong><strong>Caching in WordPress work?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/developers.google.com\/speed\/pagespeed\/insights\/\"><noscript><img decoding=\"async\" class=\"alignnone wp-image-28277 size-full\" src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pagespeed.jpg\" alt width=\"800\" height=\"530\" srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pagespeed.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pagespeed-300x199.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\"><\/noscript><img decoding=\"async\" class=\"alignnone wp-image-28277 size-full lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20530%22%3E%3C%2Fsvg%3E\" alt width=\"800\" height=\"530\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20530%22%3E%3C%2Fsvg%3E 800w\" sizes=\"(max-width: 800px) 100vw, 800px\" data-srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pagespeed.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pagespeed-300x199.jpg 300w\" data-src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pagespeed.jpg\"><\/a><\/p>\n<p>When a person accesses a certain domain, there are multiple processes happening in the background. Everything that composes your WordPress website is transmitted to the user\u2019s browser, making the site visible. These components of the website include content, images, stylesheets, scripts, and more. They must be moved from the website\u2019s server to the user\u2019s browser whenever it is required. The steps behind this process are:<\/p>\n<ol>\n<li>The visitor types a URL in his browser<\/li>\n<li>The browser generates a request to the server where your website is hosted (the HTTP request)<\/li>\n<li>The server puts all data together and sends it to the user. This is the step where users notice a slowdown. To prevent this slowdown, people can reduce the size of the scrips, optimize the image sizes and so on.<\/li>\n<li>Once the data is transmitted, the browser is finally able to display the website. The process repeats when visitors access other pages. The server requests can be very numerous at once, which can lead to low performance. This is why people need to optimize their website, to keep it fast.<\/li>\n<\/ol>\n<p>Cache content is used in both web browsers and software applications. It is stored temporarily on your local disk. This data is called \u2018 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Web_cache\">Web Cache<\/a>\u2019 or \u2018<a href=\"https:\/\/developers.google.com\/web\/fundamentals\/performance\/optimizing-content-efficiency\/http-caching\">HTTP Cache<\/a>\u2018. Whenever you visit the same website, the browser will upload the information stored on your computer and download the content from the website.<\/p>\n<p>In order to check whether your WordPress website leverages browser caching correctly, you need to use a specific tool. The most popular one is Google PageSpeed Insights. Find out if everything works correctly by typing in your site\u2019s URL.<\/p>\n<p>Then, click Analyze and let the tool do its magic. PageSpeed should tell you what score your website has in terms of optimization for mobile and desktop. The score ranges from 0 to 100, and you will also get suggestions on how to improve your website after. One of the most common suggestions is to opt to leverage browser caching in WordPress.<\/p>\n<div style=\"background-color: #d6efff; padding: 30px; margin: 25px 0; border-radius: 8px; font-size: 20px; line-height: 1.7; color: #212848;\">\n<h3>Hey, did you know data can be beautiful too?<\/h3>\n<p><a href=\"https:\/\/wpdatatables.com\/?utm_source=articlewidget\"><strong>wpDataTables<\/strong><\/a> can make it that way. There&#8217;s a good reason why it&#8217;s the #1 WordPress plugin for creating responsive tables and charts.<\/p>\n<div id=\"attachment_41741\" style=\"width: 810px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/wpdatatables.com\/?utm_source=articlewidget\"><noscript><img decoding=\"async\" aria-describedby=\"caption-attachment-41741\" class=\"wp-image-41741 size-full\" src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2021\/08\/wpdt_example.png\" alt width=\"800\" height=\"450\" srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2021\/08\/wpdt_example.png 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2021\/08\/wpdt_example-300x169.png 300w\" sizes=\"(max-width: 800px) 100vw, 800px\"><\/noscript><img decoding=\"async\" aria-describedby=\"caption-attachment-41741\" class=\"wp-image-41741 size-full lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20450%22%3E%3C%2Fsvg%3E\" alt width=\"800\" height=\"450\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20450%22%3E%3C%2Fsvg%3E 800w\" sizes=\"(max-width: 800px) 100vw, 800px\" data-srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2021\/08\/wpdt_example.png 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2021\/08\/wpdt_example-300x169.png 300w\" data-src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2021\/08\/wpdt_example.png\"><\/a><p id=\"caption-attachment-41741\" class=\"wp-caption-text\">An actual example of wpDataTables in the wild<\/p><\/div>\n<p>And it&#8217;s really easy to do something like this:<\/p>\n<ol>\n<li>You provide the table data<\/li>\n<li>Configure and customize it<\/li>\n<li>Publish it in a post or page<\/li>\n<\/ol>\n<p>And it&#8217;s not just pretty, but also practical. You can make large tables with <a href=\"https:\/\/wpdatatables.com\/documentation\/creating-wpdatatables\/creating-mysql-based-wpdatatables-with-server-side-processing\/?utm_source=articlewidget\">up to millions of rows<\/a>, or you can use <a href=\"https:\/\/wpdatatables.com\/documentation\/table-features\/advanced-filtering\/?utm_source=articlewidget\">advanced filters and search<\/a>, or you can go wild and <a href=\"https:\/\/wpdatatables.com\/documentation\/front-end-editing\/creating-editable-tables\/?utm_source=articlewidget\">make it editable<\/a>.<\/p>\n<p>&#8220;Yeah, but I just like Excel too much and there&#8217;s nothing like that on websites&#8221;. Yeah, there is. You can use <a href=\"https:\/\/wpdatatables.com\/documentation\/table-features\/conditional-formatting\/\">conditional formatting<\/a> like in Excel or Google Sheets.<\/p>\n<p>Did I tell you you can <a href=\"https:\/\/wpdatatables.com\/documentation\/wpdatacharts\/creating-charts-wordpress-wpdatachart-wizard\/?utm_source=articlewidget\">create charts too<\/a> with your data? And that&#8217;s only a small part. There are <a href=\"https:\/\/wpdatatables.com\/features\/?utm_source=articlewidget\">lots of other features<\/a> for you.<\/p>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Differences_between_server_caching_and_browser_caching\"><\/span><strong>Differences between server caching and browser caching <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Any WordPress user should know more about server caching. This is a process that involves generating cached web pages for your website through the webserver. The steps above represent website caching, which is mainly on the server-side.<\/p>\n<p>There are some ways in which you can improve the server caching system. The most recommended option would be updating headers on Apache. Using WordPress plugins would be the next step, and adding CDN follows it.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Leverage_Browser_Caching_in_WordPress\"><\/span><strong>Leverage Browser Caching in WordPress<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In order to leverage browser caching in WordPress, you need to use a bit of code. Don\u2019t worry \u2013 it\u2019s not as difficult as you may believe.<\/p>\n<p>You just have to reach the .<a href=\"https:\/\/muffingroup.com\/blog\/wordpress-htaccess\/\" target=\"_blank\" rel=\"noopener noreferrer\">htaccess file<\/a>, add a given piece of code and that\u2019s it. Leveraging Browser Caching with the Htaccess file is the easiest and most effective method you should learn about.<\/p>\n<p>The easiest and fastest way to make sure that your WordPress website is making the most out of both server-side and browser caching is to use a <a href=\"https:\/\/kinsta.com?kaid=LUAHHLEJMLMT\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">managed WordPress hosting<\/a>, which pre-configures all the necessary settings for you.<\/p>\n<p>Leverage browser caching in WordPress manually by doing these:<\/p>\n<ol>\n<li>Add Expires Headers<\/li>\n<li>Add Cache-Control Headers<\/li>\n<li>Turn ETags off<\/li>\n<\/ol>\n<p>To do that, you need to follow the steps below:<\/p>\n<ol>\n<li>\n<h4>Access the website files<\/h4>\n<\/li>\n<\/ol>\n<p><noscript><img decoding=\"async\" class=\"alignnone wp-image-28298 size-full\" src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pl_file_manager_26.jpg\" alt width=\"800\" height=\"499\" srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pl_file_manager_26.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pl_file_manager_26-300x187.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\"><\/noscript><img decoding=\"async\" class=\"alignnone wp-image-28298 size-full lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20499%22%3E%3C%2Fsvg%3E\" alt width=\"800\" height=\"499\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20499%22%3E%3C%2Fsvg%3E 800w\" sizes=\"(max-width: 800px) 100vw, 800px\" data-srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pl_file_manager_26.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pl_file_manager_26-300x187.jpg 300w\" data-src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/pl_file_manager_26.jpg\"><\/p>\n<p>Start by logging in to your hosting account\/cPanel. Navigate to the file manager. Here, you will find the website\u2019s settings, where you need to Turn On the Hidden File option. Then, go to the website\u2019s root directory and reach your .htaccess file.<\/p>\n<p>It is usually located in \/public_html\/.htaccess. If the domain of your website is custom, you will find it under domainname\/public_html\/.htaccess. Right-click the file and edit it using the instructions you are given.<\/p>\n<ol start=\"2\">\n<li>\n<h4>Add the browser caching code in your .htaccess file<\/h4>\n<\/li>\n<\/ol>\n<p>The next step is the simplest. Copy the code below and paste it at the end of your .htaccess file content. Don\u2019t make any other changes in the file.<\/p>\n<pre>#Customize expires cache start - adjust the period according to your needs\n&lt;IfModule mod_expires.c&gt;\n&nbsp; FileETag MTime Size\n&nbsp; AddOutputFilterByType DEFLATE text\/plain text\/html text\/xml text\/css application\/xml application\/xhtml+xml application\/rss+xml application\/javascript application\/x-javascript\n&nbsp; ExpiresActive On\n&nbsp; ExpiresByType text\/html \"access 600 seconds\"\n&nbsp; ExpiresByType application\/xhtml+xml \"access 600 seconds\"\n&nbsp; ExpiresByType text\/css \"access 1 month\"\n&nbsp; ExpiresByType text\/javascript \"access 1 month\"\n&nbsp; ExpiresByType text\/x-javascript \"access 1 month\"\n&nbsp; ExpiresByType application\/javascript \"access 1 month\"\n&nbsp; ExpiresByType application\/x-javascript \"access 1 month\"\n&nbsp; ExpiresByType application\/x-shockwave-flash \"access 1 month\"\n&nbsp; ExpiresByType application\/pdf \"access 1 month\"\n&nbsp; ExpiresByType image\/x-icon \"access 1 year\"\n&nbsp; ExpiresByType image\/jpg \"access 1 year\"&nbsp; \n&nbsp; ExpiresByType image\/jpeg \"access 1 year\"\n&nbsp; ExpiresByType image\/png \"access 1 year\"\n&nbsp; ExpiresByType image\/gif \"access 1 year\"\n&nbsp; ExpiresDefault \"access 1 month\"\n\n&lt;\/IfModule&gt;\n#Expires cache end<\/pre>\n<p>The settings included in the code above include a 600-second refresh\/expiration time for HTML, and one month for CSS and JavaScript.<\/p>\n<p>The purpose of this expiration period is to avoid having your visitors redownload the assets too often. If you perform changes in terms of assets more often, you can change the period according to your needs.<\/p>\n<p>For people who want to leverage browser caching, altering the .htaccess file is the best option.<\/p>\n<p>As you may see in the piece of code, images will expire after one year has passed. To add expires headers .htaccess, you need to change the file without damaging anything else.<\/p>\n<p>However, some people don\u2019t want to mess with their .htaccess file. If that is your situation, you can simply use a browser caching plugin. You will find out more about such plugins later in this article.<\/p>\n<ol start=\"3\">\n<li>\n<h4>Add cache-control headers via Apache<\/h4>\n<\/li>\n<\/ol>\n<p>Copy the code below:<\/p>\n<pre># BEGIN Cache-Control Headers\n\n&lt;IfModule mod_expires.c&gt;\n  &lt;IfModule mod_headers.c&gt;\n &nbsp;&nbsp; &lt;filesMatch \"\\.(ico|jpe?g|png|gif|swf)$\"&gt;\n &nbsp;&nbsp;&nbsp;&nbsp; Header append Cache-Control \"public\" \n &nbsp;&nbsp; &lt;\/filesMatch&gt;\n &nbsp;&nbsp; &lt;filesMatch \"\\.(css)$\"&gt;\n &nbsp;&nbsp;&nbsp;&nbsp; Header append Cache-Control \"public\"\n &nbsp;&nbsp; &lt;\/filesMatch&gt;\n &nbsp;&nbsp; &lt;filesMatch \"\\.(js)$\"&gt;\n &nbsp;&nbsp;&nbsp;&nbsp; Header append Cache-Control \"private\"\n &nbsp;&nbsp; &lt;\/filesMatch&gt;\n &nbsp;&nbsp; &lt;filesMatch \"\\.(x?html?|php)$\"&gt;\n &nbsp;&nbsp;&nbsp;&nbsp; Header append Cache-Control \"private, must-revalidate\"\n &nbsp;&nbsp; &lt;\/filesMatch&gt;\n  &lt;\/IfModule&gt;\n&lt;\/IfModule&gt;<\/pre>\n<p>Setting an expiry date or a maximum age in the HTTP headers is no longer required because it was already set during the previous step, which means you don\u2019t need to repeat it here.<\/p>\n<ol start=\"4\">\n<li>\n<h4>Turn Etags off<\/h4>\n<\/li>\n<\/ol>\n<p>Etags stands for Entity Tags and they refer to new versions of cached files. Because you have already set cache-control headers, there is no need to use ETags, so you can switch them off to improve the loading times. Add the following piece of code to the .htaccess file:<\/p>\n<pre>&lt;IfModule mod_headers.c&gt;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Header unset ETag\n&lt;\/IfModule&gt;\nFileETag None<\/pre>\n<p>Save the .htaccess file and you are done!<\/p>\n<h2><span class=\"ez-toc-section\" id=\"NGINX_Server_and_Browser_Caching\"><\/span><strong>NGINX Server and Browser Caching <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If your website uses NGINX, you will need to use other pieces of code because you won\u2019t be able to find the .htaccess file. Again, it is a very easy process that doesn\u2019t require much tech knowledge. Go to \/etc\/nginx\/sites-enabled\/default and paste this code there:<\/p>\n<pre>server {\n&nbsp;&nbsp;&nbsp; listen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 80;\n &nbsp;&nbsp; server_name&nbsp; localhost;\n &nbsp;&nbsp; location \/ {\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp; \/usr\/share\/nginx\/html;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; index&nbsp; index.html index.htm;\n &nbsp;&nbsp; }\n &nbsp;&nbsp; location ~*&nbsp; \\.(jpg|jpeg|png|gif|ico|css|js)$ {\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expires 365d;\n &nbsp;&nbsp; }\n &nbsp;&nbsp; location ~*&nbsp; \\.(pdf)$ {\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expires 30d;\n &nbsp;&nbsp; }\n}\n\nAdd Cache-Control Headers (NGINX)\nlocation ~* \\.(jpg|jpeg|png|gif|ico|css|js)$ {\nexpires 90d;\nadd_header Cache-Control \"public, no-transform\";\n}<\/pre>\n<p>You probably can tell that the expiry time for the image files is set to 365 days, the equivalent of one year. PDFs will expire after only 30 days. You can customize the code the way you want, just as in the previous case.<\/p>\n<p>After editing NGINX, save the file and you can rest assured knowing that you activated browser caching on the NGINX server.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Leverage_Browsing_in_WordPress_using_plugins\"><\/span><strong>Leverage Browsing in WordPress using plugins <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Tweaking the .htaccess file where you don\u2019t need it can ruin your entire website. Making one single mistake will lead to blank pages and errors, so it is perfectly understandable if you don\u2019t want to alter the file yourself.<\/p>\n<p>Luckily, there are plugins that can be useful, without you needing to learn how to enable Leverage Browser Caching in WordPress<\/p>\n<p>manually. Installing a plugin can be done like this:<\/p>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/leverage-browser-caching\/\"><noscript><img decoding=\"async\" class=\"alignnone wp-image-28301 size-full\" src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/WP-leverage-plugin-1.jpg\" alt width=\"800\" height=\"351\" srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/WP-leverage-plugin-1.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/WP-leverage-plugin-1-300x132.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\"><\/noscript><img decoding=\"async\" class=\"alignnone wp-image-28301 size-full lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20351%22%3E%3C%2Fsvg%3E\" alt width=\"800\" height=\"351\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20351%22%3E%3C%2Fsvg%3E 800w\" sizes=\"(max-width: 800px) 100vw, 800px\" data-srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/WP-leverage-plugin-1.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/WP-leverage-plugin-1-300x132.jpg 300w\" data-src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/WP-leverage-plugin-1.jpg\"><\/a><\/p>\n<ol>\n<li>Download the plugin \u2013 one example can be found here<\/li>\n<li>Navigate to Dashboard, Plugins and Add New<\/li>\n<li>Find \u201cLeverage Browser Caching\u201d<\/li>\n<li>Click Install Now<\/li>\n<li>Activate the plugin<\/li>\n<li>Test your website<\/li>\n<\/ol>\n<p>There are other plugins you can use as well, and some of them are listed below. Choose them according to your requirements:<\/p>\n<h2><span class=\"ez-toc-section\" id=\"W3_Total_Cache_%E2%80%93_WordPress_plugin\"><\/span>W3 Total Cache \u2013 WordPress plugin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/w3-total-cache\/\"><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-28292\" src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/W3.jpg\" alt width=\"800\" height=\"344\" srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/W3.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/W3-300x129.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-28292 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20344%22%3E%3C%2Fsvg%3E\" alt width=\"800\" height=\"344\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20344%22%3E%3C%2Fsvg%3E 800w\" sizes=\"(max-width: 800px) 100vw, 800px\" data-srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/W3.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/W3-300x129.jpg 300w\" data-src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/W3.jpg\"><\/a><\/p>\n<p>Fixing Leverage Browser Caching in WordPress with the W3 Total Cache can be done by following the steps listed below:<\/p>\n<ol>\n<li>Download and install the W3 Total Cache WordPress plugin<\/li>\n<li>Navigate to General Settings and select Enable Browser Cache<\/li>\n<li>Click save and navigate to Browser Cache Settings (top of the page)<\/li>\n<li>Choose the cache headers available<\/li>\n<li>Set expires headers, cache-control, and ETag headers (based on the settings done before)<\/li>\n<li>Save all settings and refresh your website<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"WP_Fastest_Cache\"><\/span>WP Fastest Cache<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/wp-fastest-cache\/\"><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-28293\" src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/wpfasset.jpg\" alt width=\"800\" height=\"351\" srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/wpfasset.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/wpfasset-300x132.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-28293 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20351%22%3E%3C%2Fsvg%3E\" alt width=\"800\" height=\"351\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20351%22%3E%3C%2Fsvg%3E 800w\" sizes=\"(max-width: 800px) 100vw, 800px\" data-srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/wpfasset.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/wpfasset-300x132.jpg 300w\" data-src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/wpfasset.jpg\"><\/a><\/p>\n<p>WP Fastest Cache is another plugin that you can use to enable browser caching in WordPress.<\/p>\n<ol>\n<li>Download and install the WP Fastest Cache.<\/li>\n<li>Go to plugin settings<\/li>\n<li>Select Browser Caching by checking the box<\/li>\n<li>Click on submit to apply the changes and that\u2019s it<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Cache_Enabler_%E2%80%93_WordPress_Cache\"><\/span>Cache Enabler \u2013 WordPress Cache<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/cache-enabler\/\"><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-28294\" src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/cacheenabler.jpg\" alt width=\"800\" height=\"344\" srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/cacheenabler.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/cacheenabler-300x129.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-28294 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20344%22%3E%3C%2Fsvg%3E\" alt width=\"800\" height=\"344\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20344%22%3E%3C%2Fsvg%3E 800w\" sizes=\"(max-width: 800px) 100vw, 800px\" data-srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/cacheenabler.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/cacheenabler-300x129.jpg 300w\" data-src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/cacheenabler.jpg\"><\/a><\/p>\n<p>This plugin comes with more features that you might find helpful in the future: you can automate the cache cleaning process, or you can do it by hand, you can Purge Page manually, you can minify HTML and JavaScript, and many more. To use it, simply:<\/p>\n<ol>\n<li>Install the plugin and activate it<\/li>\n<li>Go to settings<\/li>\n<li>Click on Enable Leverage Browser Caching<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Use_Yoast_SEO_to_edit_the_htaccess_file\"><\/span><strong>Use Yoast SEO to edit the .htaccess file<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/wordpress-seo\/\"><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-28295\" src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/yoast.jpg\" alt width=\"800\" height=\"341\" srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/yoast.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/yoast-300x128.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-28295 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20341%22%3E%3C%2Fsvg%3E\" alt width=\"800\" height=\"341\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20341%22%3E%3C%2Fsvg%3E 800w\" sizes=\"(max-width: 800px) 100vw, 800px\" data-srcset=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/yoast.jpg 800w, https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/yoast-300x128.jpg 300w\" data-src=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/yoast.jpg\"><\/a><\/p>\n<p>You can also edit the .htaccess file in a safer method by using Yoast SEO Plugin. To ensure you don&#8217;t lose your original .htaccess file, we recommend creating a backup before making any changes. This can be done by saving a copy of the file to your hard drive, <a href=\"https:\/\/platinumdatarecovery.com\/blog\/what-is-ssd\" target=\"_blank\" rel=\"noopener\">solid-state drive<\/a>, or cloud storage. By doing this, you&#8217;ll have a safety net in case any mistakes are made during the editing process. The most commonly used WordPress plugin is SEO by Yoast. By using this plugin, you can edit the .htaccess file easily. If you don\u2019t already have Yoast, you need to install it and activate it beforehand. After that, you need to:<\/p>\n<ol>\n<li>Access SEO, then Tools.<\/li>\n<li>Navigate to File Editor<\/li>\n<li>The .htaccess file will be opened in a text editor where you can paste the pieces of code listed above<\/li>\n<li>Save changes<\/li>\n<\/ol>\n<p>After making the changes you can use Google PageSpeed Insights to check if everything is fine after making the changes. If your website leverages browser caching properly, you are good to go. If not, you should go through the process again and see what you\u2019ve missed.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Caching_third-party_resources\"><\/span><strong>Caching third-party resources <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>After performing all of the changes described in this article, you might still obtain a bad score when testing your website\u2019s speed using various tools. Google PageSpeed Insights can give you a bad score because of many third-party scripts or services that run behind your website. These scripts don\u2019t have a long expiration time because of a multitude of reasons.<\/p>\n<p>If you will still get messages to Leverage Browser Caching in WordPress after following all possible tips, there is nothing much you can do besides eliminating scripts that you don\u2019t use. A maximum of three scripts should be just enough for a website, so make sure to clean your list.<\/p>\n<p>After making this change, everything should work fine, and the loading time of your website is supposed to be as close as possible to perfection. In case you encounter a problem that is very specific, and it doesn\u2019t have anything to do with third-party scripts, you should get informed about it and see what setting causes the issue.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"FAQs_about_leveraging_browser_caching\"><\/span>FAQs about leveraging browser caching<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3>1. What is browser caching and how does it work?<\/h3>\n<p>By using a method called &#8220;browser caching,&#8221; web browsers can temporarily store website files including pictures, CSS, and JavaScript on the user&#8217;s local computer. The browser obtains the files from the cache rather than requesting them from the server when a user accesses the website again, resulting in quicker page loads.<\/p>\n<h3>2. How can I check if my website is utilizing browser caching?<\/h3>\n<p>By using browser tools like Google PageSpeed Insights or GTmetrix, you can determine whether your website makes use of browser caching. You can get a report from these tools that details which files are not cached and how to rectify them.<\/p>\n<h3>3. Why is leveraging browser caching important for website performance?<\/h3>\n<p>By speeding up the loading of pages, using browser caching can greatly enhance website performance. Users can quickly get the content they need without having to wait for the server to retrieve it by caching static assets like pictures, CSS, and JavaScript files.<\/p>\n<h3>4. What are the benefits of leveraging browser caching?<\/h3>\n<p>Using browser caching has advantages such as quicker page loads, reduced server load, better user experience, and higher search engine rankings. Caching can help cut bandwidth usage and data transfer by minimizing the number of queries made to the server, which lowers hosting costs.<\/p>\n<h3>5. How can I leverage browser caching for static resources like images and CSS files?<\/h3>\n<p>You can change the expiration date of static resources to a later period in order to benefit from browser caching. This can be accomplished by setting the Cache-Control header with a max-age value or by adding an Expires header to the resource response.<\/p>\n<h3>6. Can I leverage browser caching for dynamic content like user-generated comments and posts?<\/h3>\n<p>Because dynamic material is continuously changing, utilizing the browser cache for it might be difficult. However, there are some methods that can be used to cache dynamic material, including the use of HTTP cache headers, server-side caching of answers, and client-side caching methods like local storage or IndexedDB.<\/p>\n<h3>7. How long should I set the expiration time for cached resources?<\/h3>\n<p>The frequency of updates to the resources determines when cached resources expire. A longer expiration time, such as one year or more, can be chosen for static resources that don&#8217;t change frequently. A shorter expiration time, such as a few minutes or hours, should be utilized for dynamic content.<\/p>\n<h3>8. What happens if I change the content of a cached resource before its expiration time?<\/h3>\n<p>A cached resource&#8217;s users might not receive the updated content if you make changes to it before the cache expires. Cache-busting strategies, such as including a version number in the resource URL or setting the Last-Modified or ETag headers to the most recent version of the resource, will help you avoid this.<\/p>\n<h3>9. Are there any downsides to leveraging browser caching?<\/h3>\n<p>The risk that users won&#8217;t view the most recent version of the website exists when using browser caching. The consumption of local storage space by caching might also negatively affect device performance.<\/p>\n<h3>10. How can I override browser caching for specific resources or pages?<\/h3>\n<p>Cache control headers like no-cache, no-store, must-revalidate, or max-age=0 can be used to override browser caching for particular resources or pages. Even if the resource is still valid, these headers can tell the browser to get it from the server rather than the cache.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Ending_thoughts_on_how_to_leverage_browser_caching_in_WordPress\"><\/span><strong>Ending thoughts on how to leverage browser caching in WordPress<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Keep in mind that you might not notice the changes you make immediately after installing a plugin. The reason behind this delay is the CSS\/Stylesheet file. The browser cache you already saved in your computer will prevent you from seeing the changes you have done. To properly see the website after making several changes, it would be recommended to visit it using the Incognito function of your browser. By using this function, you won\u2019t use cache resources and you should be able to see the changes properly.<\/p>\n<p>At the end of the day, the method you choose to Leverage Browser Caching is not relevant. The only thing that matters is to see it in action. As long as Leverage Browser Caching in WordPress works as supposed, the way you got there doesn\u2019t matter. You can choose the method that you are comfortable with and the result will be the same. Either you decide to alter the .htaccess file or use a plugin, you will get better loading times by activating Leverage Browser Caching.<\/p>\n<p>If you enjoyed reading this article on how to leverage browser caching in WordPress, you should check out this one about how to <a href=\"https:\/\/wpdatatables.com\/speed-up-wordpress\/\">speed up WordPress<\/a>.<\/p>\n<p>We also wrote about a few related subjects like <a href=\"https:\/\/wpdatatables.com\/wordpress-database-plugin\/\">WordPress database plugin<\/a>, <a href=\"https:\/\/wpdatatables.com\/wordpress-lazy-load\/\">WordPress lazy load<\/a> plugin, <a href=\"https:\/\/wpdatatables.com\/wordpress-cache\/\">WordPress cache<\/a> plugin options and <a href=\"https:\/\/wpdatatables.com\/cdn-services\/\">CDN services<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to leverage browser caching in WordPress, you already know about the main benefit it has \u2013 it improves website loading speed. This detail is highly important for people who encounter this issue. Luckily, there are tools such as Google PageSpeed Insights or GT matrix. These can tell you exactly what you want [&hellip;]<\/p>\n","protected":false},"author":1687,"featured_media":28303,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[39],"tags":[],"class_list":["post-28272","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Leverage Browser Caching in WordPress<\/title>\n<meta name=\"description\" content=\"If you want to master Leverage Browser Caching in WordPress, you already know about the main benefit it has \u2013 it increases website loading speed.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Leverage Browser Caching in WordPress\" \/>\n<meta property=\"og:description\" content=\"If you want to master Leverage Browser Caching in WordPress, you already know about the main benefit it has \u2013 it increases website loading speed.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpdatatables.com\/leverage-browser-caching\/\" \/>\n<meta property=\"og:site_name\" content=\"wpDataTables - Tables and Charts WordPress Plugin\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpdatatables\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/wpdatatables\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-22T11:00:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-29T18:44:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/how-to-leverage-browser-caching.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Bogdan Radusinovic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wpdatatables\" \/>\n<meta name=\"twitter:site\" content=\"@wpdatatables\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bogdan Radusinovic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/\"},\"author\":{\"name\":\"Bogdan Radusinovic\",\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/#\\\/schema\\\/person\\\/bfb11239e7f3f85b89769badd4b7144c\"},\"headline\":\"How to Leverage Browser Caching in WordPress\",\"datePublished\":\"2023-03-22T11:00:24+00:00\",\"dateModified\":\"2023-12-29T18:44:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/\"},\"wordCount\":3143,\"publisher\":{\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wpdatatables.com\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/how-to-leverage-browser-caching.jpg\",\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/\",\"url\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/\",\"name\":\"How to Leverage Browser Caching in WordPress\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wpdatatables.com\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/how-to-leverage-browser-caching.jpg\",\"datePublished\":\"2023-03-22T11:00:24+00:00\",\"dateModified\":\"2023-12-29T18:44:37+00:00\",\"description\":\"If you want to master Leverage Browser Caching in WordPress, you already know about the main benefit it has \u2013 it increases website loading speed.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wpdatatables.com\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/how-to-leverage-browser-caching.jpg\",\"contentUrl\":\"https:\\\/\\\/wpdatatables.com\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/how-to-leverage-browser-caching.jpg\",\"width\":800,\"height\":450},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/leverage-browser-caching\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wpdatatables.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Leverage Browser Caching in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/#website\",\"url\":\"https:\\\/\\\/wpdatatables.com\\\/\",\"name\":\"wpDataTables - Tables and Charts WordPress Plugin\",\"description\":\"Tables and Charts Creator\",\"publisher\":{\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wpdatatables.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/#organization\",\"name\":\"wpDataTables\",\"url\":\"https:\\\/\\\/wpdatatables.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wpdatatables.com\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/wpDataTable-Horizontal.png\",\"contentUrl\":\"https:\\\/\\\/wpdatatables.com\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/wpDataTable-Horizontal.png\",\"width\":4120,\"height\":756,\"caption\":\"wpDataTables\"},\"image\":{\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/wpdatatables\\\/\",\"https:\\\/\\\/x.com\\\/wpdatatables\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCR-VfulTsxPa41S1D7fFKqg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wpdatatables.com\\\/#\\\/schema\\\/person\\\/bfb11239e7f3f85b89769badd4b7144c\",\"name\":\"Bogdan Radusinovic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c3ba2d05881670ed53ed0ca5555206df15ffea4a68245d87740d131288d755bd?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c3ba2d05881670ed53ed0ca5555206df15ffea4a68245d87740d131288d755bd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c3ba2d05881670ed53ed0ca5555206df15ffea4a68245d87740d131288d755bd?s=96&d=mm&r=g\",\"caption\":\"Bogdan Radusinovic\"},\"description\":\"Senior SEO and Marketing Specialist\",\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/wpdatatables\\\/\",\"https:\\\/\\\/www.instagram.com\\\/wpdatatables\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/bogdan-radusinovic\\\/\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/wpDataTables\"],\"url\":\"https:\\\/\\\/wpdatatables.com\\\/author\\\/bogdan\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Leverage Browser Caching in WordPress","description":"If you want to master Leverage Browser Caching in WordPress, you already know about the main benefit it has \u2013 it increases website loading speed.","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:\/\/wpdatatables.com\/leverage-browser-caching\/","og_locale":"en_US","og_type":"article","og_title":"How to Leverage Browser Caching in WordPress","og_description":"If you want to master Leverage Browser Caching in WordPress, you already know about the main benefit it has \u2013 it increases website loading speed.","og_url":"https:\/\/wpdatatables.com\/leverage-browser-caching\/","og_site_name":"wpDataTables - Tables and Charts WordPress Plugin","article_publisher":"https:\/\/www.facebook.com\/wpdatatables\/","article_author":"https:\/\/facebook.com\/wpdatatables\/","article_published_time":"2023-03-22T11:00:24+00:00","article_modified_time":"2023-12-29T18:44:37+00:00","og_image":[{"width":800,"height":450,"url":"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/how-to-leverage-browser-caching.jpg","type":"image\/jpeg"}],"author":"Bogdan Radusinovic","twitter_card":"summary_large_image","twitter_creator":"@wpdatatables","twitter_site":"@wpdatatables","twitter_misc":{"Written by":"Bogdan Radusinovic","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wpdatatables.com\/leverage-browser-caching\/#article","isPartOf":{"@id":"https:\/\/wpdatatables.com\/leverage-browser-caching\/"},"author":{"name":"Bogdan Radusinovic","@id":"https:\/\/wpdatatables.com\/#\/schema\/person\/bfb11239e7f3f85b89769badd4b7144c"},"headline":"How to Leverage Browser Caching in WordPress","datePublished":"2023-03-22T11:00:24+00:00","dateModified":"2023-12-29T18:44:37+00:00","mainEntityOfPage":{"@id":"https:\/\/wpdatatables.com\/leverage-browser-caching\/"},"wordCount":3143,"publisher":{"@id":"https:\/\/wpdatatables.com\/#organization"},"image":{"@id":"https:\/\/wpdatatables.com\/leverage-browser-caching\/#primaryimage"},"thumbnailUrl":"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/how-to-leverage-browser-caching.jpg","articleSection":["WordPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/wpdatatables.com\/leverage-browser-caching\/","url":"https:\/\/wpdatatables.com\/leverage-browser-caching\/","name":"How to Leverage Browser Caching in WordPress","isPartOf":{"@id":"https:\/\/wpdatatables.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wpdatatables.com\/leverage-browser-caching\/#primaryimage"},"image":{"@id":"https:\/\/wpdatatables.com\/leverage-browser-caching\/#primaryimage"},"thumbnailUrl":"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/how-to-leverage-browser-caching.jpg","datePublished":"2023-03-22T11:00:24+00:00","dateModified":"2023-12-29T18:44:37+00:00","description":"If you want to master Leverage Browser Caching in WordPress, you already know about the main benefit it has \u2013 it increases website loading speed.","breadcrumb":{"@id":"https:\/\/wpdatatables.com\/leverage-browser-caching\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpdatatables.com\/leverage-browser-caching\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpdatatables.com\/leverage-browser-caching\/#primaryimage","url":"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/how-to-leverage-browser-caching.jpg","contentUrl":"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/03\/how-to-leverage-browser-caching.jpg","width":800,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/wpdatatables.com\/leverage-browser-caching\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpdatatables.com\/"},{"@type":"ListItem","position":2,"name":"How to Leverage Browser Caching in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/wpdatatables.com\/#website","url":"https:\/\/wpdatatables.com\/","name":"wpDataTables - Tables and Charts WordPress Plugin","description":"Tables and Charts Creator","publisher":{"@id":"https:\/\/wpdatatables.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpdatatables.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wpdatatables.com\/#organization","name":"wpDataTables","url":"https:\/\/wpdatatables.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpdatatables.com\/#\/schema\/logo\/image\/","url":"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/02\/wpDataTable-Horizontal.png","contentUrl":"https:\/\/wpdatatables.com\/wp-content\/uploads\/2019\/02\/wpDataTable-Horizontal.png","width":4120,"height":756,"caption":"wpDataTables"},"image":{"@id":"https:\/\/wpdatatables.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/wpdatatables\/","https:\/\/x.com\/wpdatatables","https:\/\/www.youtube.com\/channel\/UCR-VfulTsxPa41S1D7fFKqg"]},{"@type":"Person","@id":"https:\/\/wpdatatables.com\/#\/schema\/person\/bfb11239e7f3f85b89769badd4b7144c","name":"Bogdan Radusinovic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c3ba2d05881670ed53ed0ca5555206df15ffea4a68245d87740d131288d755bd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c3ba2d05881670ed53ed0ca5555206df15ffea4a68245d87740d131288d755bd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c3ba2d05881670ed53ed0ca5555206df15ffea4a68245d87740d131288d755bd?s=96&d=mm&r=g","caption":"Bogdan Radusinovic"},"description":"Senior SEO and Marketing Specialist","sameAs":["https:\/\/facebook.com\/wpdatatables\/","https:\/\/www.instagram.com\/wpdatatables\/","https:\/\/www.linkedin.com\/in\/bogdan-radusinovic\/","https:\/\/www.youtube.com\/c\/wpDataTables"],"url":"https:\/\/wpdatatables.com\/author\/bogdan\/"}]}},"_links":{"self":[{"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/posts\/28272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/users\/1687"}],"replies":[{"embeddable":true,"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/comments?post=28272"}],"version-history":[{"count":31,"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/posts\/28272\/revisions"}],"predecessor-version":[{"id":48044,"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/posts\/28272\/revisions\/48044"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/media\/28303"}],"wp:attachment":[{"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/media?parent=28272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/categories?post=28272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpdatatables.com\/wp-json\/wp\/v2\/tags?post=28272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}