2.3.52 FileETag
FileETag specifies the attribute value of the file to be used for creating the ETag response header field.
Description
FileETag specifies the attribute value of the file to be used for creating the ETag response header field. If you do not specify this directive, the last updated time and number of bytes of the file are set in the ETag response header field.
If you do not specify +- for option, the attribute value specified for option is used.
If you specify +- for option, you can change the attribute value set by using the FileETag directive.
- +
-
Adds the attribute value specified for the option to the set attribute value
- -
-
Deletes the attribute value specified for the option from the set attribute value
The following shows a list of options that can be specified:
Option |
Description |
---|---|
Inode |
The unique ID assigned to the file is included. |
Mtime |
The last updated time of the file is included. |
Size |
The number of bytes of the file is included. |
All |
All of the Inode, Mtime, and Size options are enabled. |
None |
An Etag header is not attached. |
- Important note
-
-
If you enable the Inode option of the FileETag directive, a different IDEtag might be included in the header every time you request the same content in a web server environment that performs the load sharing activity. For this reason, the same contents might have different Etag header contents, causing inconvenience for caching in a browser or proxy. In this case, you can avoid this inconvenience by specifying settings so that the FileETag directive disables the Inode option.
-
If you specify this directive for multiple times without using +-, only the last specified directive is enabled.
-
If you only specify attribute values with - added, it is assumed that the All option is specified.
-
For the All option and the None option, you cannot specify +-.
-
If you specify -Inode -Mtime -Size for an option, it is assumed that this directive is not specified. For the ETag response header field, the inode number, last updated time, and number of bytes of the file are set.
-
Syntax
FileETag [{+|-}]option [[{+|-}]option ...]
Locations where it can be written
httpsd.conf, <VirtualHost>, <Directory>, and .htaccess
Overwrite permission
FileInfo level
Examples
- Example 1:
-
FileETag Inode Mtime Size FileETag -Inode
In this example, the last updated time and number of bytes of the file are used as attribute values.
- Example 2:
-
FileETag Inode Mtime FileETag Size
In this example, the number of bytes of the file is used as an attribute value.
- Example 3:
-
FileETag All FileETag -Inode -Mtime -Size
In this example, the unique ID, last updated time, and number of bytes of the file are used as attribute values.