apache tutorial - How to disable entity tags (ETags) - apache - apache web server - apache server - apache2



Entity tags

  • Entity tags (ETags) are used in HTTP headers to manage web caching behavior.
  • They provide a way for web clients to determine if their cache content matches the content on the web server.
  • If the entity tags for a particular resource (such as an image file) do not match, the web client sends a request to the server to download the most recent version.
  • By default, entity tags are enabled on your hosting account. However, there may be scenarios where you do not want to send entity tag headers.
  • For example, you might want to disable entity tags during site development or to test web caching.

Disabling entity tags

  • To disable sending entity tags in the HTTP headers, add the following two lines to an .htaccess file in your account's public_html directory:
Header unset ETag
FileETag None
click below button to copy the code. By Apache tutorial team
  • The changes take effect immediately. To re-enable entity tags, comment out or delete the two lines in the .htaccess file.
  • To verify the entity tag settings in the .htaccess file are working correctly, examine the raw HTTP headers sent between the browser and web server.
  • To do this, use a browser plugin that displays the raw headers such as Live HTTP headers for Mozilla Firefox, or the Developer Tools feature in Google Chrome.

Related Searches to How to disable entity tags