Specifically in JAX-RS (I’m not sure that is relevant) there are methods that allow you to add EntityTags to the response. What exactly are entity tags and what practical ways are they used?
Specifically in JAX-RS (I’m not sure that is relevant) there are methods that allow
Share
Entity Tags are a way of incorporating caching into the HTTP Protocol. When a server returns a response it can attach an
ETagheader which gives a value which represents the state of the object returned in response to the client’s request.When the client makes subsequent requests for the same response it can send back the ETag in it’s request using the
If-None-Matchheader and the server can use this to determine whether it needs to send a new response (i.e. the state of the requested object has changed) or whether it can respond with a 304 Not Modified response which instructs the client to use its local cached copy.This is most often used in RESTful APIs and applications where caching and object state are relevant.
See http://en.wikipedia.org/wiki/HTTP_ETag