Using .htaccess
to configure ETag response
The OP is specifically asking about configuring etags on a Litespeed web server, but anywhere .htaccess
can be used, the method(s) should remain the same.
Simple
FileETag All
This sets the response etag, for all files, calculated from all three possible components:
INode
The file's i-node number will be included in the calculation
MTime
The date and time the file was last modified will be included
Size
The number of bytes in the file will be included
i.e. Setting
All
All available fields will be used. This is equivalent to:
FileETag INode MTime Size
e.g. Our response might be something like ETag:"a020a81-1dd-55073fdbf86fe"
Specific
FileETag INode
,
FileETag MTime
,
FileETag Size
,
FileETag INode MTime
,
FileETag INode Size
or
FileETag MTime Size
may also be set.
Omitted
FileETag None
None
If a document is file-based, no ETag field will be included in the response
Targeted
Use of the FilesMatch directive allows us to set different rules for different files.