If set to .T. automatically encodes the Response output to GZip compressed format. When set Web Connection automatically checks whether the client supports GZip compression and only compresses content if it does.
This routine adds the required Response header and compresses the output properly.
This routine checks the Accept-Encoding header in an Assign method to the property, and then performs the actual header addition and compression as part of the Render() method.
o.GZipCompression
Remarks
Requires that Zlib1.dll is available.
Example
FUNCTION HelloWorld
Response.GzipCompression = .T.
Response.Write("Hello World!")
ENDFUNC
Alternately you can globally assign GZip
*** for every Process Request
FUNCTION OnProcessInit
*** All requests going through this Process class
*** get GZip compression
Response.GzipCompression = .T.
THIS.InitSession("MyAppCookie")
ENDFUNC
See also:
Class wwPageResponse© West Wind Technologies, 1996-2024 • Updated: 09/16/16
Comment or report problem with topic