http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com
@Finally static void compress() throws IOException { if (Play.mode.isProd()) { String html = response.out.toString();
HtmlCompressor compressor = new HtmlCompressor();
compressor.setRemoveIntertagSpaces(true);
compressor.setRemoveSurroundingSpaces("br,p,span,a");
compressor.setCompressCss(true);
String compressedHtml = compressor.compress(html);
response.out = new ByteArrayOutputStream(4000);
response.out.write(compressedHtml.getBytes());
}
}