WebPagetest Forums
Is file ETag important? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Optimization Discussions (/forumdisplay.php?fid=5)
+--- Thread: Is file ETag important? (/showthread.php?tid=13287)

Is file ETag important? - postcd - 10-11-2014 10:49 AM


having server with 7k rpm HDD, its transactions per second are quite heavilly used.

i have currently Expires headers set in Apache:

Quote:<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType image/jpeg "access plus 1 hour"
ExpiresByType image/png "access plus 1 hour"
ExpiresByType image/gif "access plus 1 hour"
ExpiresByType text/css "access plus 5 minutes"
ExpiresByType text/javascript "access plus 1 week"


im curious if it would be beneficial to turn on File ETag?

RE: Is file ETag important? - pmeenan - 10-13-2014 11:00 PM

Does your server respond with Last-Modified headers? Usually you only really need to have that or ETags but not both so when the browser goes to do an if-modified-since request it can do it efficiently.

If you want to offload a lot of requests and you tend to serve a lot of the same content, using a CDN for all of your static content will just about eliminate them entirely (and there are good, free options like Cloudflare if costs are a concern).

RE: Is file ETag important? - postcd - 10-15-2014 12:02 AM

thx, i found that on my server is installed mod_expires apache module (httpd -M | grep exp) so part of this module is probably putting Last-modiffied into headers.

and indeed when i add url of my website image into http://http-headers.online-domain-tools.com/
it returns:
Quote:HTTP/1.1 200 OK
Date: Tue, 14 Oct 2014 13:04:38 GMT
Server: Apache
Last-Modified: Thu, 16 May 2013 19:23:50 GMT
Accept-Ranges: bytes
Content-Length: 4966
Cache-Control: max-age=604800, public
Expires: Thu, 13 Nov 2014 13:04:38 GMT
Content-Type: image/jpeg

There i noticed some colission of Expires and Cache-Control:
Cache control sets cache to 7 days(max-age=604800) and Expires is set to 13 Nov (approx. 27 days?)

but i found here that w3.org says "max-age directive takes priority over Expires"

so as Patrick M. says i think i dont need etag when i have last modiffied there Idea