You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Chris Davis <ch...@hullomail.com> on 2009/07/23 19:59:07 UTC
GZip HTML response
Hi All,
I really need to enable GZip compression for HTML in my app, I see in Jira
that there is a bug fix for this but its not released in the stable build.
In the comments it suggest he following code snippet
class GZipBufferedResponse extends BufferedResponse
{
public void close()
{
String result = toString();
if (result.length != 0)
{
getOutputStream().write(compress(result));
}
}
but I don't have a clue what to do with it, could anyone point me towards
the correct class where I am supposed to use this?
thanks in advance
CD
Re: GZip HTML response
Posted by Marcin Palka <ma...@gmail.com>.
You may either use a servlet filter to gzip your responses or enable
compresion in an Apache HTTP server (if you have one).
A gzip filter:
http://onjava.com/pub/a/onjava/2003/11/19/filters.html
A gzip compression module for the Apache HTTP server.
http://www.cyberciti.biz/tips/speed-up-apache-20-web-access-or-downloads-with-mod_deflate.html
cheers,
Marcin
chrisdavis8 wrote:
>
> Hi All,
>
> I really need to enable GZip compression for HTML in my app, I see in Jira
> that there is a bug fix for this but its not released in the stable build.
> In the comments it suggest he following code snippet
>
> class GZipBufferedResponse extends BufferedResponse
> {
> public void close()
> {
> String result = toString();
> if (result.length != 0)
> {
> getOutputStream().write(compress(result));
> }
> }
>
>
> but I don't have a clue what to do with it, could anyone point me towards
> the correct class where I am supposed to use this?
>
> thanks in advance
> CD
>
>
--
View this message in context: http://www.nabble.com/GZip-HTML-response-tp24631271p24633142.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org