Java Servlets

Serving Compressed Content

  1. Set the Content-Encoding header to the appropriate of gzip (best), compress, or deflate.
  2. Wrap the output in a GZIPOutputStream or ZipOutputStream, make sure to close().

José M. Vidal .

45 of 89