Tuesday 1 July 2014

Spring MVC filter-ShallowEtagHeaderFilter

If you want to use optimization with communication between server and browser if your web application use Spring then you can use filter ShallowEtagHeaderFilter.

Filter that generates an ETag value based on the content on the response. This ETag is compared to the If-None-Match header of the request. If these headers are equal, the response content is not sent, but rather a 304 "Not Modified" status instead.

Since the ETag is based on the response content, the response (or View) is still rendered. As such, this filter only saves bandwidth, not server performance.

Source: http://docs.spring.io/spring/docs/3.0.x/api/org/springframework/web/filter/ShallowEtagHeaderFilter.html