org.apache.tapestry5.services
Interface ResponseCompressionAnalyzer

All Known Implementing Classes:
ResponseCompressionAnalyzerImpl

public interface ResponseCompressionAnalyzer

Used to determine if the client supports GZIP compression of the response.

Since:
5.1.0.0
See Also:
ResponseCompressionAnalyzer

Method Summary
 boolean isCompressable(String contentType)
          Deprecated. Deprecated in Tapestry 5.3. This method is to be removed at a later date. The service's configuration is no longer used. Instead, contribute to and use CompressionAnalyzer.
 boolean isGZipSupported()
          Checks the Accept-Encoding request header for a "gzip" token.
 

Method Detail

isGZipSupported

boolean isGZipSupported()
Checks the Accept-Encoding request header for a "gzip" token. Ensures that the protocol is not "HTTP/1.0", which does not correctly support GZip encoding (in older Internet Explorer browsers).

Returns:
true if gzip is supported by client

isCompressable

boolean isCompressable(String contentType)
Deprecated. Deprecated in Tapestry 5.3. This method is to be removed at a later date. The service's configuration is no longer used. Instead, contribute to and use CompressionAnalyzer.

Checks to see if the indicated content type is compressable. Many formats are already compressed; pushing them through a GZip filter consumes cycles and makes them larger.

Contribute content type strings to the service's configuration to mark them as not compressable.

Parameters:
contentType - the mime type of the content, such as "text/html" or "image/jpeg".
Returns:
true if compression is worthwhile


Copyright © 2003-2012 The Apache Software Foundation.