Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Article doesn't mention there are strong and weak ETags, only presenting the strong variant (those hashes in double-quoted strings).

Weak ETags are rare(r) beasts that look like `ETag: W/"foobar"` and mean that while response may be not byte-to-byte identical (e.g. it's a dynamically generated JSON document), it's still semantically the same - which can be useful for APIs (if caches implement all the logic correctly, of course).



This is important, especially when compression is part of the picture. For example, NGINX automatically replaces strong ETags with weak ones if gzip compression is enabled. Something to be aware of, if you're using them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: