Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eTags misconfigured [duplicate]

Tags:

apache

etag

yslow

YSlow gives me the "There are 94 components with misconfigured ETags" -message. I have configured them with .htaccess "FileETag MTime Size" on Apache. Images show etags in this format: 245975c-3f4-9d8ae780. We are not going to scale or use a CDN.

How can I make them correct and functional? For me they seem correct, and I have no idea why YSlow is marking them as misconfigured.

Or should I just disable them and go for the expires? This is something I have found suggested elsewhere.

like image 861
Sampsa Avatar asked Nov 05 '12 14:11

Sampsa


1 Answers

When YSlow complains that your ETags are "misconfigured", it really means that ETags are present. If you read through the Yahoo Performance Rules regarding ETags, you'll see their basis for recommending that they be turned off.

You could test this by running YSlow on your site after turning off ETags with this setting in your .htaccess file:

FileETag none

In general I wouldn't worry too much about trying to keep ETags turned off. Yahoo's advice is more geared towards a multi-server site, so the rule doesn't necessarily apply in all cases.

Further reading:

  • Good answers on this SO question: Why does google pagespeed asks to specify ETag even when cache headers are set
  • Google PageSpeed has a good writeup on best practices for caching, including some explanations for proper use of ETags
like image 125
BrianC Avatar answered Oct 20 '22 20:10

BrianC