Using ySlow, it recommends that I use eTags. I never heard of them before today. The question is now, how do I configure eTags?
I just spent the last 2 hours trying to figure this out. I tried adding various recommended scripts to my .htaccess file, but with no luck. ySlow keeps complaining...
My site is a secure site(https) on a litespeed web server. I seen some say you can't configure eTags on a litespeed web server. Is this true?
Thanks.
Best practice to configure the entity tags for Multiple servers for website running on Apache is to remove the INode portion of the Etag. With this code, the INode would be removed from the Entity tags. Without the Server component, the Etags can perform its function properly.
To use ETag for optimistic concurrency, we need to use the If-Match header. While sending a request to change the state (e.g. PUT), we should send the expected state version as the value of the If-Match header. The server should check if the ETag value is equal to the current one. If it equals, save succeed.
Etag Working Style in StepsRequestor request a resource from the server. The server generates an Etag value as a response header value. Requestor takes a 200 (Ok) status code for the resource and uses the Etag value for the If-None-Match request header. A requestor requests the same resource after a time.
The ETag is an identifier assigned to a data resource in a server, and if that resource is ever updated at the server, the ETag is changed. Whenever a resource is requested (via its URL), the data and ETag are retrieved and stored in the Web cache, and the ETag is sent along with subsequent requests.
Or, I don't know... Properly set them without the piece that makes them unique to a server.
FileETag MTime Size
I understand that it's easier to just tell people to not bother. But there is a lot of misinformation out there about ETags. They're not perfect, but can be handy when configured correctly.
Note (2021-05-14) :
While historically there has been somewhat valid reasons to disable ETags - mainly pushed by Yahoo serving things from server farms and unable to implement ETags properly across all servers - ETags should not be disabled by default and chances are Yahoo's problems do not apply to you.
I think you're supposed to disable ETags, not turn them on.
Try this:
Header unset Pragma
Header unset ETag
FileETag None
References:
How to turn off Etag with htaccess?
http://davidwalsh.name/yslow-htaccess
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With