Support for ETag is part of the Apache Core and it is enabled by default. Ex. These are the response headers that i get when i try to access cachesample.gif, which is a static image file on disk from Apache Server
The value of ETag header in this case is combination of three things
INode MTime
SizeYou can configure the behavior of the ETag using the FileETag directive which configures the file attributes that are used to create the ETag (entity tag) response header field when the document is based on a file. (The ETag value is used in cache management to save network bandwidth.) In Apache 1.3.22 and earlier, the ETag value was always formed from the file's inode, size, and last-modified time (mtime). The FileETag directive allows you to choose which of these -- if any -- should be used. The recognized keywords are:
- INode : The file's i-node number will be included in the calculation. i-node is the number generated by OS to keep track of the file, it includes things like access level, creation time,... You can configure apache to use only INode by adding this line to httpd.conf
FileETag INode
This is screen of how the INode only ETag looks like - MTime: The date and time the file was last modified will be included. You can configure apache to use only Last-Modified date of the file to generate ETag by adding this line to httpd.conf
FileETag MTime
This is how my cachecontrol.gif response headers look like when i use MTime for ETag generation - Size: The number of bytes in the file will be included. You can configure Apache to use only size of the file for generating ETag by adding this line to httpd.conf
FileETag Size
This screen shot of headers when Apache is configured to use only file Size for calculating ETag
- All: All available fields will be used. This is equivalent to:
FileETag INode MTime Size
- None: You can disable generation of ETag by Apache Http Server by adding this line
FileETag None
THis is screen shot of headers after ETag is disabled
Hi , The httpd.conf in my case is empty (Apache/2.2.22 ) . Where can I find this configuration ?
ReplyDeleteImpressive! I really like your blog. Thanks for the post.
ReplyDeleteseo company in nagpur
website services in nagpur
Nice blog..! I really loved reading through this article. Thanks for sharing such
ReplyDeletea amazing post with us and keep blogging...
digital marketing services in khammam
seo services in khammam
smm services in khammam
Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
ReplyDeletedigital marketing services in kothagudem
seo services in kothagudem
Useful Information, your blog is sharing unique information....
ReplyDeleteThanks for sharing!!!
php developers in kphb
php developers in ameerpet
php development companies in hyderabad
lampung Info
ReplyDeleteLampung
Kursus
Maspion
iphoneiphone
oppo
Vivo
Axioo
Thanks for info
ReplyDeleteWeb Design Company in Bangalore
Website development in Bangalore
great post.
ReplyDelete