...
Note: We would only apply compression, if Accept-Encoding header is passed and
Code (Enabling G-zip):
public class Filters implements HttpFilters {
@Inject
GzipFilter gzipFilter;
public EssentialFilter[] filters() {
return new EssentialFilter[] { gzipFilter };
}
}
Advantages:
1. Response size will be considerably smaller and will use less band-width.
...