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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -