java - Zipping a HTTP Response? Possible? -
having issue page's contents abnormally huge. in 5 10 megs range.
this rendered using velocity , java on server side. it's possible compress/zip response what's reasonable way handle unzipping on browser/client side?
it's built-in modern browsers. long response kind of text or compressible request/response have have correct headers.
request
accept-encoding: gzip,deflate
response
content-encoding: gzip
if accept-encoding header of request doesn't include gzip shouldn't zip because client/browser can't handle it.
in general should gzip text content long makes sense so. if resource 500 bytes instead of 500kbytes might not make sense performance reasons. examples html, xml, json, javascript , can configure server, types of files compress , size limit should be.
enabling gzip
Comments
Post a Comment