HTTP core directives

etag directive

Controls automatic static-resource ETag generation. Default on; http, server, location. Not a general upstream header remover.

Formal Syntax & Structure

nginx syntaxnginx
etag on | off;

Parameters & Attributes

NameTypeDescription
stateon | offChoose whether Nginx generates an ETag for a static file.

Working Example

Example Snippetnginx
etag on;
Nginx Reference