Current time: 12-15-2017, 12:52 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is file ETag important?
10-11-2014, 10:49 AM
Post: #1
Is file ETag important?
Hello,

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"

</IfModule>

im curious if it would be beneficial to turn on File ETag?
Find all posts by this user
Quote this message in a reply
10-13-2014, 11:00 PM
Post: #2
RE: Is file ETag important?
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).
Visit this user's website Find all posts by this user
Quote this message in a reply
10-15-2014, 12:02 AM (This post was last modified: 10-15-2014 12:05 AM by postcd.)
Post: #3
RE: Is file ETag important?
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
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)