{"id":17270,"date":"2021-11-08T16:15:26","date_gmt":"2021-11-08T22:15:26","guid":{"rendered":"https:\/\/www.dotcom-tools.com\/web-performance\/?page_id=17270"},"modified":"2021-11-10T20:06:08","modified_gmt":"2021-11-11T02:06:08","slug":"add-expires-headers","status":"publish","type":"page","link":"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/","title":{"rendered":"YSlow Optimizations &#8211; Add Expires Headers"},"content":{"rendered":"<p>[vc_row full_width=&#8221;stretch_row&#8221; gap=&#8221;25&#8243; equal_height=&#8221;yes&#8221; content_placement=&#8221;middle&#8221; css=&#8221;.vc_custom_1636408663624{padding-top: 100px !important;padding-bottom: 100px !important;background-image: url(https:\/\/www.dotcom-tools.com\/blog\/wp-content\/uploads\/2015\/09\/hero-section-with-description-3320.jpg?id=15799) !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}&#8221;][vc_column css=&#8221;.vc_custom_1636409653940{padding-top: 30px !important;padding-bottom: 30px !important;background-color: #e6eaef !important;}&#8221;][vc_custom_heading text=&#8221;<b>Add Expires Headers<\/b>&#8221; font_container=&#8221;tag:h1|font_size:40|text_align:center|color:%232b2b2b|line_height:1.5&#8243; use_theme_fonts=&#8221;yes&#8221; css=&#8221;.vc_custom_1636409141993{padding-top: 30px !important;padding-bottom: 30px !important;}&#8221;][\/vc_column][\/vc_row][vc_row margin_top=&#8221;40&#8243; margin_bottom=&#8221;30px&#8221; css=&#8221;.vc_custom_1636409410012{margin-bottom: 30px !important;}&#8221;][vc_column][vc_custom_heading text=&#8221;What are Expires Headers?&#8221; font_container=&#8221;tag:h2|font_size:35|text_align:center|color:%232b2b2b|line_height:1.5&#8243; use_theme_fonts=&#8221;yes&#8221;][vc_column_text]<\/p>\n<p style=\"text-align: left;\">Web page load speed is a huge factor, not only for SEO (Search Engine Optimization) purposes, but also for the user experience. Having to wait for assets and content to load on a page is frustrating for anyone, but today\u2019s users expect pages to load within a few seconds. If not, they are quickly left frustrated and will leave your page to find what they were looking for somewhere else. Expires headers are one way to help increase page load times, but before we talk about what expires headers are, we need to touch on browser caching. One way to increase web page load speed is to implement a type of browser caching. If you have ever run one of your pages through a website speed test tool, you may have seen a recommendation suggestion that tells you to implement a browser caching policy.<\/p>\n<p>[\/vc_column_text][vc_custom_heading text=&#8221;What is Browser Caching?&#8221; font_container=&#8221;tag:h3|font_size:30|text_align:center|color:%232b2b2b|line_height:1.5&#8243; use_theme_fonts=&#8221;yes&#8221;][vc_column_text]<\/p>\n<p style=\"text-align: left;\">Browser caching provides a way for web developers to tell the browser to save certain files to a user\u2019s browser, like images, such as company logos, background images, etc., so they do not have to be downloaded again on repeat visits. However, you can use browser caching on HTML (HyperText Markup Language), JavaScript, CSS (Cascading Style Sheets), etc. Any part of a web page can be cached, however, it is best practices to only cache assets that are not going to change often. You can see browser caching for yourself by visiting one of your most frequented sites and watching how quickly it loads. Next, clear your cache. Once you have cleared the cache, see how the page load speed time compares without content cached and compare it to your initial visit. Determining what assets to cache is entirely dependent on the needs of the business and the site itself. However, images typically tend to stay static for extended periods of time, so by implementing browser caching for specific images, you remove the download requirement, and reduce the page load time.<\/p>\n<p>[\/vc_column_text][vc_custom_heading text=&#8221;Expires Headers Explained&#8221; font_container=&#8221;tag:h2|font_size:30|text_align:center|color:%232b2b2b|line_height:1.5&#8243; use_theme_fonts=&#8221;yes&#8221;][vc_column_text]<\/p>\n<p style=\"text-align: left;\">Now that we have discussed browser caching a bit, let us get back to expires headers. Essentially, expires headers determine the length of time an asset is cached. Expires headers are one of the types of HTTP (Hypertext Transfer Protocol) headers used to indicate to a user\u2019s browser whether they are going to be served an asset from their local browser cache or whether the asset needs to be downloaded fresh from the server again. For example, if we use the example of images on a web page, you can control the browser caching for specific images by setting the expires headers. Images tend to stay static for longer periods of time, so a common expires header for images may be 30 days, or longer in some cases. So, if we set the expires header to 30 days from the current date, it tells the browser to serve the downloaded version of images for 30 days after the page has been accessed. Once those 30 days have passed, the images must be downloaded again from the server. For components that will not change, you can simply set them to not expire. For components that may change regularly, set short expiration dates.<\/p>\n<p>[\/vc_column_text][vc_custom_heading text=&#8221;How to Add Expire Headers&#8221; font_container=&#8221;tag:h3|font_size:30|text_align:center|color:%232b2b2b|line_height:1.5&#8243; use_theme_fonts=&#8221;yes&#8221;][vc_column_text]<\/p>\n<p style=\"text-align: left;\">Like we mentioned previously, the goal of setting the expires headers is to reduce not only the number of downloads from the server, but also to reduce the amount of HTTP requests to the web server. Early web pages consisted of a handful of images and some text. Today\u2019s websites are complex and dynamic, consisting of many third-party assets, high-resolution images, and script files. The cumulative effect of loading each of these assets can add up to a longer load time, which again, affects the user\u2019s perception of how the page is loading. All the little things add up to a lot. And that is not a good thing when you want to keep a visitor on your page and engaged in your offerings.<\/p>\n<p>The important thing about today\u2019s modern web development frameworks is that they now make implementing expire headers a straightforward process. And in some cases, if you are using a Content Delivery Network (CDN), it may already be enabled for you. Out of sight, out of mind. But it is always good practice to make sure the expires headers are working on a regular basis, so make sure to run tests to ensure that everything is operating as expected. Furthermore, Content Management Sytems (CMS), like WordPress, provide a user-friendly way of managing expires headers with an intuitive plugin. Simply point and click what elements, like specific image files, video files, audio files, fonts, and text, and input the expiration time in days.<\/p>\n<p>If you are using a web server, like Apache HTTP Server or Nginx Web Server, adding the expires headers may take a little more manual effort by accessing and editing the server\u2019s configuration files. For a novice, this may seem like a daunting and dangerous task, however, there is plenty of support and documentation articles to help assist with implementing expire headers properly within your specific environment.[\/vc_column_text][vc_custom_heading text=&#8221;Expires Headers: Final Thoughts&#8221; font_container=&#8221;tag:h2|font_size:30|text_align:center|color:%232b2b2b|line_height:1.5&#8243; use_theme_fonts=&#8221;yes&#8221;][vc_column_text]<\/p>\n<p style=\"text-align: left;\">Adding and configuring your expires headers may seem like an arbitrary task, but it is an extremely key factor for SEO. While more modern options, like the cache-control header, may provide better flexibility for today\u2019s websites, expires headers is still a great option to managing caching, and it can be used simultaneously with the cache-control header. Web performance is a continuous process. Taking the time to properly configure the expires headers for the appropriate content will provide for better page performance and enhance the user\u2019s experience with your pages.<\/p>\n<p>[\/vc_column_text][\/vc_column][\/vc_row][vc_row margin_top=&#8221;60&#8243; margin_bottom=&#8221;0&#8243; css=&#8221;.vc_custom_1636595147911{margin-bottom: 15px !important;}&#8221;][vc_column width=&#8221;1\/3&#8243; css=&#8221;.vc_custom_1636595227743{padding-top: 60px !important;padding-bottom: 60px !important;padding-left: 10px !important;background-color: #f6f6f6 !important;}&#8221;][vc_single_image image=&#8221;17233&#8243; alignment=&#8221;center&#8221; style=&#8221;vc_box_rounded&#8221;][vc_custom_heading text=&#8221;<b>Lighthouse<\/b>&#8221; font_container=&#8221;tag:p|font_size:20|text_align:center|color:%232b2b2b|line_height:1&#8243; use_theme_fonts=&#8221;yes&#8221;][vc_column_text]<\/p>\n<p style=\"text-align: center;\">Lighthouse is an open-source tool that is used to run an audit against your web pages and provides scores and suggestions for improving page performance, accessibility, SEO, and more.<\/p>\n<p>[\/vc_column_text][vc_btn title=&#8221;Learn More&#8221; style=&#8221;flat&#8221; color=&#8221;primary&#8221; align=&#8221;center&#8221; i_icon_fontawesome=&#8221;fas fa-location-arrow&#8221; add_icon=&#8221;true&#8221; link=&#8221;url:https%3A%2F%2Fwww.dotcom-tools.com%2Fweb-performance%2Flighthouse%2F&#8221;][\/vc_column][vc_column width=&#8221;1\/3&#8243; css=&#8221;.vc_custom_1636595173585{padding-top: 60px !important;padding-bottom: 60px !important;background-color: #f6f6f6 !important;}&#8221;][vc_single_image image=&#8221;17284&#8243; alignment=&#8221;center&#8221; style=&#8221;vc_box_rounded&#8221;][vc_custom_heading text=&#8221;<b>PageSpeed Terms<\/b>&#8221; font_container=&#8221;tag:p|font_size:20|text_align:center|color:%232b2b2b|line_height:1&#8243; use_theme_fonts=&#8221;yes&#8221;][vc_column_text]<\/p>\n<p style=\"text-align: center;\">PageSpeed Insights is a tool created by Google that reports on the performance of a page on both mobile and desktop devices, and provides suggestions on how that page may be improved.<\/p>\n<p>[\/vc_column_text][vc_btn title=&#8221;Learn More&#8221; style=&#8221;flat&#8221; color=&#8221;primary&#8221; align=&#8221;center&#8221; i_icon_fontawesome=&#8221;fas fa-location-arrow&#8221; add_icon=&#8221;true&#8221; link=&#8221;url:https%3A%2F%2Fwww.dotcom-tools.com%2Fweb-performance%2Fpagespeed%2F&#8221;][\/vc_column][vc_column width=&#8221;1\/3&#8243; css=&#8221;.vc_custom_1636595196399{padding-top: 60px !important;padding-right: 10px !important;padding-bottom: 60px !important;background-color: #f6f6f6 !important;}&#8221;][vc_single_image image=&#8221;17281&#8243; alignment=&#8221;center&#8221; style=&#8221;vc_box_rounded&#8221;][vc_custom_heading text=&#8221;<b>YSlow<\/b>&#8221; font_container=&#8221;tag:p|font_size:20|text_align:center|color:%232b2b2b|line_height:1&#8243; use_theme_fonts=&#8221;yes&#8221;][vc_column_text]<\/p>\n<p style=\"text-align: center;\">YSlow is an open-source website analysis tool that can be used to identify web page performance issues. Learn more about the YSlow to enhance your web pages and the user experience.<\/p>\n<p>[\/vc_column_text][vc_btn title=&#8221;Learn More&#8221; style=&#8221;flat&#8221; color=&#8221;primary&#8221; align=&#8221;center&#8221; i_icon_fontawesome=&#8221;fas fa-location-arrow&#8221; add_icon=&#8221;true&#8221; link=&#8221;url:https%3A%2F%2Fwww.dotcom-tools.com%2Fweb-performance%2Fyslow%2F&#8221;][\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[vc_row full_width=&#8221;stretch_row&#8221; gap=&#8221;25&#8243; equal_height=&#8221;yes&#8221; content_placement=&#8221;middle&#8221; css=&#8221;.vc_custom_1636408663624{padding-top: 100px !important;padding-bottom: 100px !important;background-image: url(https:\/\/www.dotcom-tools.com\/blog\/wp-content\/uploads\/2015\/09\/hero-section-with-description-3320.jpg?id=15799) !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}&#8221;][vc_column css=&#8221;.vc_custom_1636409653940{padding-top: 30px !important;padding-bottom: 30px !important;background-color: #e6eaef !important;}&#8221;][vc_custom_heading text=&#8221;Add Expires Headers&#8221; font_container=&#8221;tag:h1|font_size:40|text_align:center|color:%232b2b2b|line_height:1.5&#8243; use_theme_fonts=&#8221;yes&#8221; css=&#8221;.vc_custom_1636409141993{padding-top: 30px !important;padding-bottom: 30px !important;}&#8221;][\/vc_column][\/vc_row][vc_row margin_top=&#8221;40&#8243; margin_bottom=&#8221;30px&#8221; css=&#8221;.vc_custom_1636409410012{margin-bottom: 30px !important;}&#8221;][vc_column][vc_custom_heading text=&#8221;What are Expires Headers?&#8221; font_container=&#8221;tag:h2|font_size:35|text_align:center|color:%232b2b2b|line_height:1.5&#8243; use_theme_fonts=&#8221;yes&#8221;][vc_column_text] Web page load speed is a huge factor, not&hellip;<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":17257,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v17.6 (Yoast SEO v19.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>YSlow Optimizations - Add Expires Headers | Dotcom-Monitor Tools Blog<\/title>\r\n<meta name=\"description\" content=\"Are you getting an add expires headers recommendation after a speed test? Expires headers can reduce the amount of HTTP requests for faster pages. Learn more today!\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"YSlow Optimizations - Add Expires Headers\" \/>\r\n<meta property=\"og:description\" content=\"Are you getting an add expires headers recommendation after a speed test? Expires headers can reduce the amount of HTTP requests for faster pages. Learn more today!\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/\" \/>\r\n<meta property=\"og:site_name\" content=\"Dotcom-Monitor Tools Blog\" \/>\r\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dotcommonitor\" \/>\r\n<meta property=\"article:modified_time\" content=\"2021-11-11T02:06:08+00:00\" \/>\r\n<meta name=\"twitter:card\" content=\"summary\" \/>\r\n<meta name=\"twitter:site\" content=\"@dotcom_monitor\" \/>\r\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dotcom-tools.com\/web-performance\/#website\",\"url\":\"https:\/\/www.dotcom-tools.com\/web-performance\/\",\"name\":\"Dotcom-Monitor Tools Blog\",\"description\":\"Let&#039;s Make the Web a Faster Place.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dotcom-tools.com\/web-performance\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/#webpage\",\"url\":\"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/\",\"name\":\"YSlow Optimizations - Add Expires Headers | Dotcom-Monitor Tools Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dotcom-tools.com\/web-performance\/#website\"},\"datePublished\":\"2021-11-08T22:15:26+00:00\",\"dateModified\":\"2021-11-11T02:06:08+00:00\",\"description\":\"Are you getting an add expires headers recommendation after a speed test? Expires headers can reduce the amount of HTTP requests for faster pages. Learn more today!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.dotcom-tools.com\/web-performance\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"YSlow Optimizations\",\"item\":\"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"YSlow Optimizations &#8211; Add Expires Headers\"}]}]}<\/script>\r\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"YSlow Optimizations - Add Expires Headers | Dotcom-Monitor Tools Blog","description":"Are you getting an add expires headers recommendation after a speed test? Expires headers can reduce the amount of HTTP requests for faster pages. Learn more today!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/","og_locale":"en_US","og_type":"article","og_title":"YSlow Optimizations - Add Expires Headers","og_description":"Are you getting an add expires headers recommendation after a speed test? Expires headers can reduce the amount of HTTP requests for faster pages. Learn more today!","og_url":"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/","og_site_name":"Dotcom-Monitor Tools Blog","article_publisher":"https:\/\/www.facebook.com\/dotcommonitor","article_modified_time":"2021-11-11T02:06:08+00:00","twitter_card":"summary","twitter_site":"@dotcom_monitor","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.dotcom-tools.com\/web-performance\/#website","url":"https:\/\/www.dotcom-tools.com\/web-performance\/","name":"Dotcom-Monitor Tools Blog","description":"Let&#039;s Make the Web a Faster Place.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dotcom-tools.com\/web-performance\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/#webpage","url":"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/","name":"YSlow Optimizations - Add Expires Headers | Dotcom-Monitor Tools Blog","isPartOf":{"@id":"https:\/\/www.dotcom-tools.com\/web-performance\/#website"},"datePublished":"2021-11-08T22:15:26+00:00","dateModified":"2021-11-11T02:06:08+00:00","description":"Are you getting an add expires headers recommendation after a speed test? Expires headers can reduce the amount of HTTP requests for faster pages. Learn more today!","breadcrumb":{"@id":"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/add-expires-headers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dotcom-tools.com\/web-performance\/"},{"@type":"ListItem","position":2,"name":"YSlow Optimizations","item":"https:\/\/www.dotcom-tools.com\/web-performance\/yslow\/"},{"@type":"ListItem","position":3,"name":"YSlow Optimizations &#8211; Add Expires Headers"}]}]}},"_links":{"self":[{"href":"https:\/\/www.dotcom-tools.com\/web-performance\/wp-json\/wp\/v2\/pages\/17270"}],"collection":[{"href":"https:\/\/www.dotcom-tools.com\/web-performance\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.dotcom-tools.com\/web-performance\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.dotcom-tools.com\/web-performance\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dotcom-tools.com\/web-performance\/wp-json\/wp\/v2\/comments?post=17270"}],"version-history":[{"count":12,"href":"https:\/\/www.dotcom-tools.com\/web-performance\/wp-json\/wp\/v2\/pages\/17270\/revisions"}],"predecessor-version":[{"id":17350,"href":"https:\/\/www.dotcom-tools.com\/web-performance\/wp-json\/wp\/v2\/pages\/17270\/revisions\/17350"}],"up":[{"embeddable":true,"href":"https:\/\/www.dotcom-tools.com\/web-performance\/wp-json\/wp\/v2\/pages\/17257"}],"wp:attachment":[{"href":"https:\/\/www.dotcom-tools.com\/web-performance\/wp-json\/wp\/v2\/media?parent=17270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}