Have you just run your WordPress site using a speed test tool and been told that you need to add the "estimated title" to your WordPress site?
The finished title can help you use browser caching, thereby speeding up site loading time. In addition, they are also part of YSlow’s performance recommendations, which means they will have an impact on your performance on devices such as GTmetrix.
In this article, we will explain what the final titles are and how they affect your website. Next, we will show you step by step how to add a complete title in WordPress in several different ways.
But first, we need to find a way to quickly hide another problem-browser caching.
Before finishing the title, we first need to introduce the concept of browser caching. This is important because the finished title can help you control and implement browser caching-so if you don’t understand browser caching, you may not be able to understand the finished title.
In short, browser caching allows your site to tell visitors that the browser saves some files to the visitor's local computer and uploads these local files for later access, instead of downloading them from their server every time the page loads .
Have you just launched your website using the quick test tool, only to be told that you need to "add a certification title"? Girt, you have closed this post and can tweet
By eliminating the need to download files each time, you can speed up site loading time and reduce bandwidth usage.
Let's look at an example-your website logo image. Your logo is the same on every page, so this doesn’t mean you have to force the guest browser to reload the same logo file on every page. By caching the browser, you can save the logo file on the visitor's local computer. Visitors still need to take photos of your logo on their first visit. But for future page views, the file will be loaded from their local browser cache.
The completed header lets you tell the web browser if it needs to load the specified source from the local browser cache (as described above), or if it needs to download a new version from the web server.
Specifically, it allows you to specify a time for cached versions of different file types before the file is "finished", and the browser must download it from the server again.
Let's see an example...
Suppose you want to control the browser caching of PNG image files on your website. If you specify the expiration title of the PNG file as one month, this means that the guest browser will:
You can set different expiration titles for different file types, so you can maximize control of the Web browser cache.
Header for the cache control side
Although using expired titles is one way to control browser caching on WordPress, it is not the only way. There is another technique called cache control.
Cache control is a more modern technology and provides slightly smoother cache control. Many websites today use cache control-although we have our own custom Nginx configuration at Atakdomain.
However, Expires headers still provide everything that most websites need, so they are a good choice for browser caching. You can also use both at the same time, although in most cases the title of your cache control will take precedence. If you use both at the same time, you will definitely set the same time value in each.
If you want to learn more about how to implement cache control in WordPress, check out our guide on how to use browser caching in WordPress.
## EXPIRES HEADER CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/svg "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>
## EXPIRES HEADER CACHING ##
Although custom values should be suitable for most websites, you can adjust the timing of different types of files in the code snippets as needed.
How to add an existing header file to the file settings on the Nginx web server
If your host uses the Nginx web server, you can control the expiration title by modifying your server configuration file. How you edit this file depends on your host-if you need help, you can visit host support.
Atakdomain uses the Nginx web server-but remember, we have already configured it for you, so you don't need to add any code yourself.
Here is the code you need to use:
location ~* \.(jpg|jpeg|gif|png|svg)$ {
expires 365d;
}
location ~* \.(pdf|css|html|js|swf)$ {
expires 2d;
}
You can adjust the expiration time of different file types according to your needs.
Want to know how we increased traffic by 1000%?
Join over 20,000 people to receive my weekly newsletter, which includes a built-in WordPress plugin!
If you feel uncomfortable adding code to your finished title, you can also find some WordPress plugins that are right for you. Some of these plugins add finished titles, while others use cache controls. However, the end result is that your WordPress site can benefit from browser caching.
If your host has not withdrawn money for you, one solution is to use a cache plugin. An important choice here is WP Rocket, which is fully compatible with Atakdomain. Just like you enable the WP Rocket plugin, it will automatically activate browser caching for you-no other settings are required.
Here are some other caching plugins that can help you complete the completed title and/or browser caching:
Jilin
Except for WP Rocket, Atakdomain does not allow most of these plugins because they conflict with our built-in caching and performance optimization, but if your site is hosted elsewhere, they are a good choice.
If you already have a dedicated cache and just want a more targeted plugin, here are two good free plugins:
The Leverage Browser cache plugin has no settings-you just need to enable it and it will start working immediately.
The add expired title plugin allows you to control the expired titles of different file types-you can make these choices from the newly added expired titles area of the WordPress dashboard:
You can set different expiration rules for different file types
You can use this free tool from GiftOfSpeed to test whether your expired title is set correctly. When you enter the website address, the tool will tell you two things:
Are you looking for a high-performance WordPress host powered by Google Cloud Platform’s fast servers? Check out our plan.
1. Cache time for all files on your website.
2. Cache type (it should say Headers Finishes because this is the method you use, but you may also see the cache, depending on your site configuration).
You can also use any speed test tool you are using (e.g. GTmetrix) to run your website and check if you still see the "Done Title" message.
If you prefer to use a more technical option to test the completed header, you can make a query request on the static page of your website in the terminal and directly check the HTTP header. For example, if the cache runs out or the CSS file is restored, you can make a hollow request as shown below.
curl -I https://atakdomainlife.com/wp-includes/css/dist/block-library/style.min.css
In our example, the curl request from the style.min.css file provides the following answer.
HTTP/2 200
server: nginx
date: Wed, 27 Jan 2021 01:11:05 GMT
content-type: text/css; charset=UTF-8
content-length: 51433
last-modified: Tue, 12 Jan 2021 20:17:48 GMT
vary: Accept-Encoding
etag: "5ffe03ec-c8e9"
expires: Thu, 31 Dec 2037 23:55:55 GMT
cache-control: max-age=315360000
access-control-allow-origin: *
accept-ranges: bytes
x-edge-location-klb: HaIXowU1oNczJ391oDE9zVvZ7279840b5d30a89472f57253756b3e63
As you can see, the response includes an expires and cache-control headers. Specifically, the cache-control header shows a max-age of 315360000 seconds, which indicates an expiration time of one year.
The method we showed above will allow you to check the completed headers of all files on the WordPress web server. However, these methods do not allow you to check the completed title of third-party texts that you can upload, such as Google Fonts, Google Analytics, etc.
Therefore, even if you have implemented the Expires header using the above guidelines, some speed testing tools may still indicate it as a potential issue.
Here are some solutions for common third-party articles...
Many WordPress sites link to Google Fonts for custom fonts. This usually involves uploading files from Google’s CDN, which means you won’t be able to set expired titles through server configuration.
A simple solution is to host the font files locally instead of relying on Google’s CDN. To install it, you can use the free Optimize My Google Fonts (OMGF) plugin on WordPress.org.
You can also follow my complete guide on locally hosted fonts in WordPress to learn more about the pros and cons of this approach.
Learn how to add expired titles to Google Analytics
If you find issues related to browser caching and Google Analytics, you can also consider hosting Google Analytics instead of the Google fonts we show you.
Here are some WordPress plugins to make this easy:
Finally, the completed header will help you control the browser cache of various files on the WordPress site.
Many websites now rely on cache control titles rather than expired titles, because cache control is a more modern option that provides greater flexibility. However, the finished title still works on most websites, and you can use the finished title and cache control at the same time.
However, if you do not follow the full title, some speed testing tools will lower your site score, which may be your main motivation for installing this strategy.
If you host your WordPress site on Atakdomain, you don’t need to worry about the completed title, as we will take care of everything for you. However, if your website is hosted elsewhere, you can use the code snippets we provide or one of the plugins we added to add the finished title in WordPress.
Save time, money, and improve website performance by: