How to configure entity tags etags in WordPress

//

Keith Rainz

Learn How to configure entity tags etags in WordPress

What are Entity tags in WordPress?

Entity Tags, or Etags, is another way to treat 304 replies. 304 responses are a way for the web server to tell the user that the latest version of the cache is the version it has, even though the cache time may expire. There is no need to access the file again, waste of time and bandwidth in this situation.

The way it works is that when a browser requests a page that they have already accessed in the past, the browsers send, for example, an HTTP request header in the If-Modified-Since header with the cache date.
It basically means “Hey web server, I have a copy of this file I’m asking you for, but it’s 11:28zm from 1 September 2015-is that okay to use or is there a newer version of this page available?” If there’s a newer file, the web server will send that one to the browser, and if not just tell me to start using the one I’ve got.

Advantages of ETags in WordPress

  • Effective filtering and quicker loading times Lower disk load and bandwidth used.
  • ETags are part of the HTTP/1.1 specification and web browsers and web servers receive broad support. Nevertheless the utility of ETags depends on implementation and this has some problems (see downsides below).

Disadvantages of ETags in WordPress

  • Lower load times, and multiple caching of the same resource.
  • Higher load and bandwidth used on server

The whole point of using ETags is that they are intended to give us a more precise indication as to whether a file has changed, rather than merely based it on a timestamp. By theory this sounds fantastic, but the way they were implemented also significantly undermines their effectiveness.

READ ALSO  Three Easy Ways to Make Money As a Student Abroad

Original implementations on Apache used this to be based on inode by default, which is essentially a connection to the server’s physical file, so if you had two or more load-balanced web servers, then the ETag was different for each site. It meant that if you ended up jumping back and forth between various servers for whatever reason, you would have different ETags and restore the file even though it hadn’t changed. It is no longer valid as the defaults have changed a while ago, but you are always coming across blog sites advising that you should not use ETags for this purpose-there are far better reasons not to use ETags! 🙂 & nbsp;

ETags are a fantastic idea in principle, and you’ll find plenty of performance tips to turn them on, but I’m going to go against the flow and suggest they aren’t worth the trouble in the latest web browser implementations and encourage you to turn them off. The default If-Modified-Since time-based headers are nearly as fine, and do not suffer from above problems.

Even 304 responses, compared with normal caching, are not that big a performance gain. These are helpful when people directly reload a page and don’t have to reload assets (which I believe people would be more forgiving about slowness), or when an asset is already in the cache but expired (which might not be too often depending on how the web browser manages it’s cache). They will also need a network request and answer-which would take almost as long to get a 304 answer as to get the full 200 update, unless it’s a big file.

READ ALSO  How To Reduce TTFB In WordPress in 2025

So, all in all, I will go with advising that I do not use ETags. If you agree, or disagree, let me know below.

And if you find all these too difficult at your level of knowledge, getting a WordPress developer to help you with your website is recommended. You can check the WordPress developer rates and decide if this is viable for you.

Does GTmetrix or Pingdomshowing you the following: Configure Entity Tags (ETags) in WordPress?

Some of the most common problems in repairing a website’s pace is configuring ETags. This error will be shown in GTmetrix or Pingdom if your web server does not configure the Etags correctly.

How to fix or Configure Entity Tags (ETags) in WordPress

There are two methods for fixing or to configure entity tags (ETags) in WordPress.

Fix or Configure entity tags (ETags) from Apache config in WordPress

Open your: httpd.conf if you have root access to your domain, or access to SSH.

How to open your httpd.conf: /usr / local / apache / conf / httpd.conf and add the lines of code that follow:

<directory>
    FileETag MTime Size
</directory>

Fix or Configure entity tags (ETags) from htaccess in WordPress

If you do not have access to SSH then you can use htaccess to repair configure entity tags (ETags). In your.htaccess add these lines of code:

Header unset Etag
FileETag none

Need help speeding up your WordPress site? contact me

2 thoughts on “How to configure entity tags etags in WordPress”

  1. This post is titled “How to configure etags in wordpress” but it really failed to deliver. Most of the post is focused on disabling ETags, not in properly configuring them and the configuration you’re suggesting is to change an Apache config, not some configuration “in wordpress”. Notably, I *WANT* to use ETags, as standard “Last-Modified” headers don’t take into account dynamic changes within a page due to a Query Block (or Elementor’s Post widget), so moving away from document modification time to version (or even checksum) would be far preferable. Additionally, even if I did want to disable ETags, the server runs on nginx and your only suggested configs relate to configuring apache, so again, your post title is extremely misleading.

    Reply

Leave a Comment

 

Keith Rainz

Contact me

Along Kafue Road, Chilanga, Lusaka Zambia.

Contact me

Connect with me

Review Your Cart
0
Add Coupon Code
Subtotal