{"id":1449,"date":"2022-05-12T12:56:35","date_gmt":"2022-05-12T12:56:35","guid":{"rendered":"http:\/\/magemart.com\/blog\/?p=1449"},"modified":"2022-06-11T08:21:38","modified_gmt":"2022-06-11T08:21:38","slug":"magento-optimization","status":"publish","type":"post","link":"https:\/\/magemart.com\/blog\/magento-optimization\/","title":{"rendered":"Six Ways to do Magento TTFB optimization"},"content":{"rendered":"<div class=\"blog_detail\">\n<div class=\"para_top\">\n<p>\nDoes your website loading slow? This problem can slow down your Magento 2 store performance. It happens because of the increased TTFB value.<\/p>\n<p>\nTTFB stands for the time to the first byte. It is the main metric that decides the website&#8217;s performance. This metric tells how much your Magento 2 takes to generate the HTML page for the users.<\/p>\n<p>\nIf your online website struggle with poor performance, consider the Magento TTFB optimization audit to handle the problem. It can also improve the user experience and website speed.<\/p>\n<\/div>\n<div class=\"tbl_content\">\n<p><span class=\"tbl_lbl\">Table of Contents<\/span><\/p>\n<ul>\n<li><a class=\"tocxref\" href=\"#h-12.1\">What is Time to First Byte (TTFB)?<\/a><\/li>\n<li><a class=\"tocxref\" href=\"#h-12.2\">What is Magento TTFB optimization?<\/a><\/li>\n<li><a class=\"tocxref\" href=\"#h-12.3\">How to Calculate Magento TTFB?<\/a><\/li>\n<li><a class=\"tocxref\" href=\"#h-12.4\">How to Reduce TTFB in Magento 2?<\/a><\/li>\n<\/ul>\n<\/div>\n<p>But before that, let\u2019s learn about this TERM &#8211; time to the first byte and how minimization of TTFB can increase the loading speed of pages.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_23 counter-hierarchy counter-decimal ez-toc-grey\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/magemart.com\/blog\/magento-optimization\/#What_is_Time_to_First_Byte_TTFB\" title=\"What is Time to First Byte (TTFB)\">What is Time to First Byte (TTFB)<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/magemart.com\/blog\/magento-optimization\/#What_is_Magento_2_TTFB_optimization\" title=\"What is Magento 2 TTFB optimization?\">What is Magento 2 TTFB optimization?<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/magemart.com\/blog\/magento-optimization\/#How_to_Calculate_your_Magento_TTFB\" title=\"How to Calculate your Magento TTFB\">How to Calculate your Magento TTFB<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/magemart.com\/blog\/magento-optimization\/#How_to_reduce_TTFB_in_Magento_2\" title=\"How to reduce TTFB in Magento 2?\">How to reduce TTFB in Magento 2?<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/magemart.com\/blog\/magento-optimization\/#To_Sum_up\" title=\"To Sum up!\">To Sum up!<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"What_is_Time_to_First_Byte_TTFB\"><\/span><a name=\"h-12.1\"><\/a>What is Time to First Byte (TTFB)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>TTFB is the server response time to load the web page and display its content. A standard loading time should be milliseconds, which shows the server responsiveness. The TTFB depends on three major tasks which are:<\/p>\n<ul>\n<li><span class=\"sub_label_bold\">Requesting to the server: <\/span>When a user visits the website and an HTTP request is sent to the server. While building the connection between server and browser, many factors arise that further cause any delays.<\/li>\n<li><span class=\"sub_label_bold\">Processing and generating the request: <\/span>As soon as the server gets the request, it will process the request and generate the response. This process includes making calls to the database, running scripts, and communicating with other networked systems.<\/li>\n<li><span class=\"sub_label_bold\">Send a response to the browser: <\/span>After the server processes the request, it will be sent as a response to the browser. Both server and client speed will affect the time taken to send the response to the user.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"What_is_Magento_2_TTFB_optimization\"><\/span><a name=\"h-12.2\"><\/a>What is Magento 2 TTFB optimization?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nAccording to Google, a web store should load within 0.2 seconds. If your Magento 2 store loads in 0.6 seconds, it still passes as an excellent site. But once TTFB is over 0.6s, then it is a red flag for your website.\n<\/p>\n<p>\nSo, it is time to lower the server response time by following the TTFB optimization method. Now you understand that the higher the TTFB score, the lower the speed of the Magento 2 web store. However, there are a lot of factors that may affect your TTFB:\n<\/p>\n<ul>\n<li><span class=\"sub_label_bold\">Web server configuration and resources: <\/span>Disabled compression or poor configuration and non-optimal server location.<\/li>\n<li><span class=\"sub_label_bold\">Unoptimized code <\/span>can increase the delay. An unoptimized store may have heavy and irrelevant PHP code, no caching, and too many SQL queries.<\/li>\n<li><span class=\"sub_label_bold\">No backend caching <\/span>can cause slow server response time. A Magento 2 store cannot cache requests, logs, and files to retrieve the information faster.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"How_to_Calculate_your_Magento_TTFB\"><\/span><a name=\"h-12.3\"><\/a>How to Calculate your Magento TTFB<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>There are various ways to measure your Magento time to the first byte. But we have listed the common methods to check your Magento store speed.<\/p>\n<ul class=\"ul_list\">\n<li>Lighthouse, Gtmetrix, or Webpage test can work with a server and good internet connection ;<\/li>\n<li>Google PageSpeed Insights is used to collect the data from real users and find the real Page speed on Google.<\/li>\n<li>Chrome User Experience Report or <a href=\"https:\/\/search.google.com\/search-console\/about\">Google Search Console<\/a> will show how your web pages perform, based on real-world data.<\/li>\n<li>Browsers can also show the speed performance and verify the time taken for the first page to load.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"How_to_reduce_TTFB_in_Magento_2\"><\/span><a name=\"h-12.4\"><\/a>How to reduce TTFB in Magento 2?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul class=\"ul_list\">\n<li><strong>Improve Browser Caching<\/strong>\n<div class=\"bottom_h4\">\n<p>\n\tCaching plays a significant role in reducing the loading time. You can set the expiry times of different files. Enabling browser caching can boost the TTFB. You can apply three tactics to enable smooth browser caching:<\/p>\n<ul>\n<li>Full-page caching to cache all pages.<\/li>\n<li>Static content caching method to cache all the images and files, such as JS, CSS, fonts, etc.<\/li>\n<li>Block caching to cache the header and footer.<\/li>\n<\/ul>\n<p>You can use Redis and varnish caching solutions for full-page caching. They ensure the fast speed of all the pages. CDN or content delivery network can help in static content caching to retrieve the content quickly to the user.<\/p>\n<\/p><\/div>\n<\/li>\n<li>\n\t<strong>PHP optimization<\/strong><\/p>\n<div class=\"bottom_h4\">\n<p>Slow PHP code can increase the server response time. Work on PHP code to execute faster and reduce the time taken by the first byte.<\/p>\n<p>Also, PHP modules like Xdebug profiler can slow down the whole Magento 2 website.<\/p>\n<p>It is important to disable this component when your store is live. You can update the PHP to the new and latest version as per your platform.<\/p>\n<\/p><\/div>\n<\/li>\n<li><strong>Web Server Optimization<\/strong>\n<p>The most common problem is still using HTTP 1 for your website. Updating to HTTP2 can handle many requests at a time. Second, enabling Gzip compression will help to speed up the content delivery process on the browser.<\/p>\n<\/li>\n<li><strong>Upgrade the Server: <\/strong>\n<p>TTFB can increase because of a lack of server resources. So, it is necessary to upgrade the server to the new one. You make sure that it can handle large live traffic on the website.<\/p>\n<\/li>\n<li><strong>Enable Lazy Loader<\/strong>\n<p>Implementing a Lazy loader can optimize the images, which takes much server time to load. Magento image optimization can be done by using web image format, which offers the most lossless image compression. WebP images are 26% smaller than PNGs.<\/p>\n<\/li>\n<li><strong>Remove the Unused Extensions<\/strong>\n<p>Magento extensions or third-party add more functionality to your eCommerce store. But, there could be various unused extensions that make your site heavy to load. It is good to disable them since they make it complicated for the server.<\/p>\n<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"To_Sum_up\"><\/span>To Sum up!<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"final_para\">\n<p>\nIn conclusion, these are common ways to reduce the time to the first byte. However, Magento 2 TTFB optimization takes a lot of time and work. Investing time in optimizing TTFB not only improves speed performance but also enhances the conversion rates.<\/p>\n<p>\nFor more details, you can check out our previous article on <a href=\"https:\/\/magemart.com\/blog\/23-simple-ways-to-improve-magento-2-performance\/\">23 ways to Magento speed optimization<\/a>. Also, our Magento development services can help in lowering the TTFB for user experience. If you need any help, we are here to help you.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Does your website loading slow? This problem can slow down your Magento 2 store performance. It happens because of the increased TTFB value. TTFB stands for the time to the first byte. It is the main metric that decides the&#8230;<\/p>\n","protected":false},"author":2,"featured_media":2162,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[71,322],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Six Ways to Magento TTFB Optimization<\/title>\n<meta name=\"description\" content=\"If your online website struggle with poor performance, consider the Magento TTFB optimization audit to handle the problem.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/magemart.com\/blog\/magento-optimization\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Six Ways to Magento TTFB Optimization\" \/>\n<meta property=\"og:description\" content=\"If your online website struggle with poor performance, consider the Magento TTFB optimization audit to handle the problem.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/magemart.com\/blog\/magento-optimization\/\" \/>\n<meta property=\"og:site_name\" content=\"Magento 2 Blog - Tutorials \/ Devdocs | Magemart-AheadGroups\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-12T12:56:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-11T08:21:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/magemart.com\/blog\/wp-content\/uploads\/2022\/05\/42.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Any Atkinson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/magemart.com\/blog\/#website\",\"url\":\"https:\/\/magemart.com\/blog\/\",\"name\":\"Magento 2 Blog - Tutorials \/ Devdocs | Magemart-AheadGroups\",\"description\":\"Magento 2 Blog - Tutorials\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/magemart.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/magemart.com\/blog\/magento-optimization\/#primaryimage\",\"url\":\"https:\/\/magemart.com\/blog\/wp-content\/uploads\/2022\/05\/42.jpg\",\"contentUrl\":\"https:\/\/magemart.com\/blog\/wp-content\/uploads\/2022\/05\/42.jpg\",\"width\":1200,\"height\":630},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/magemart.com\/blog\/magento-optimization\/#webpage\",\"url\":\"https:\/\/magemart.com\/blog\/magento-optimization\/\",\"name\":\"Six Ways to Magento TTFB Optimization\",\"isPartOf\":{\"@id\":\"https:\/\/magemart.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/magemart.com\/blog\/magento-optimization\/#primaryimage\"},\"datePublished\":\"2022-05-12T12:56:35+00:00\",\"dateModified\":\"2022-06-11T08:21:38+00:00\",\"author\":{\"@id\":\"https:\/\/magemart.com\/blog\/#\/schema\/person\/1a93ce9f4356af9a8637e9ee970a4300\"},\"description\":\"If your online website struggle with poor performance, consider the Magento TTFB optimization audit to handle the problem.\",\"breadcrumb\":{\"@id\":\"https:\/\/magemart.com\/blog\/magento-optimization\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/magemart.com\/blog\/magento-optimization\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/magemart.com\/blog\/magento-optimization\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/magemart.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Six Ways to do Magento TTFB optimization\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/magemart.com\/blog\/#\/schema\/person\/1a93ce9f4356af9a8637e9ee970a4300\",\"name\":\"Any Atkinson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/magemart.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2a0a5aa37ea9188eac65d593ca5e6b99?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2a0a5aa37ea9188eac65d593ca5e6b99?s=96&d=mm&r=g\",\"caption\":\"Any Atkinson\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Six Ways to Magento TTFB Optimization","description":"If your online website struggle with poor performance, consider the Magento TTFB optimization audit to handle the problem.","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:\/\/magemart.com\/blog\/magento-optimization\/","og_locale":"en_US","og_type":"article","og_title":"Six Ways to Magento TTFB Optimization","og_description":"If your online website struggle with poor performance, consider the Magento TTFB optimization audit to handle the problem.","og_url":"https:\/\/magemart.com\/blog\/magento-optimization\/","og_site_name":"Magento 2 Blog - Tutorials \/ Devdocs | Magemart-AheadGroups","article_published_time":"2022-05-12T12:56:35+00:00","article_modified_time":"2022-06-11T08:21:38+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/magemart.com\/blog\/wp-content\/uploads\/2022\/05\/42.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Any Atkinson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/magemart.com\/blog\/#website","url":"https:\/\/magemart.com\/blog\/","name":"Magento 2 Blog - Tutorials \/ Devdocs | Magemart-AheadGroups","description":"Magento 2 Blog - Tutorials","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/magemart.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/magemart.com\/blog\/magento-optimization\/#primaryimage","url":"https:\/\/magemart.com\/blog\/wp-content\/uploads\/2022\/05\/42.jpg","contentUrl":"https:\/\/magemart.com\/blog\/wp-content\/uploads\/2022\/05\/42.jpg","width":1200,"height":630},{"@type":"WebPage","@id":"https:\/\/magemart.com\/blog\/magento-optimization\/#webpage","url":"https:\/\/magemart.com\/blog\/magento-optimization\/","name":"Six Ways to Magento TTFB Optimization","isPartOf":{"@id":"https:\/\/magemart.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/magemart.com\/blog\/magento-optimization\/#primaryimage"},"datePublished":"2022-05-12T12:56:35+00:00","dateModified":"2022-06-11T08:21:38+00:00","author":{"@id":"https:\/\/magemart.com\/blog\/#\/schema\/person\/1a93ce9f4356af9a8637e9ee970a4300"},"description":"If your online website struggle with poor performance, consider the Magento TTFB optimization audit to handle the problem.","breadcrumb":{"@id":"https:\/\/magemart.com\/blog\/magento-optimization\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/magemart.com\/blog\/magento-optimization\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/magemart.com\/blog\/magento-optimization\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/magemart.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Six Ways to do Magento TTFB optimization"}]},{"@type":"Person","@id":"https:\/\/magemart.com\/blog\/#\/schema\/person\/1a93ce9f4356af9a8637e9ee970a4300","name":"Any Atkinson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/magemart.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2a0a5aa37ea9188eac65d593ca5e6b99?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2a0a5aa37ea9188eac65d593ca5e6b99?s=96&d=mm&r=g","caption":"Any Atkinson"}}]}},"_links":{"self":[{"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/posts\/1449"}],"collection":[{"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/comments?post=1449"}],"version-history":[{"count":14,"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/posts\/1449\/revisions"}],"predecessor-version":[{"id":1885,"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/posts\/1449\/revisions\/1885"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/media\/2162"}],"wp:attachment":[{"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/media?parent=1449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/categories?post=1449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/magemart.com\/blog\/wp-json\/wp\/v2\/tags?post=1449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}