ETag (Entity Tag) is an HTTP header used for cache validation and conditional requests from browsers using persistent identification elements that are tagged to a users’ browser. It makes the cache to be more efficient, and saves data bandwidth. However, sometimes, you may want to disable ETag on your website, in case it uses multiple web servers and ETags are likely to differ per server. So let us take a look at how to disable ETags in Apache.
Please note : It is not advisable to disable ETags on your website. It can mess up caching.
How to Disable ETags in Apache
Here are the steps to disable ETags in Apache.
1. Open Apache config file
Open Apache config file in a text editor. You will find it at one of the following locations:
$ sudo vim /etc/apache2/httpd.conf
2. Disable ETag
Just add the following line in your Apache config file
3. Restart Apache web server
Restart Apache web server to apply changes
$ sudo /etc/init.d/apache2 start [Debian or Ubuntu] # sudo apachectl restart [RHEL, CentOS or Fedora]
That’s it! Apache will automatically disable ETags on your website.