beresp.gzip
BOOL, can be read and set
, but not unset
.
Available infetch
Whether or not gzip compression should be enabled on the object. Disabling this will not uncompress an object compressed by the origin.
Setting this will unset beresp.brotli
.
For more information about compressing and decompressing data with Fastly, see our concept guide to compression.
Try it out
beresp.gzip
is used in the following code examples. Examples apply VCL to real-world use cases and can be deployed as they are, or adapted for your own service. See the full list of code examples for more inspiration.
Click RUN on a sample below to provision a Fastly service, execute the code on Fastly, and see how the function behaves.
Compress content before caching
Compress HTML, SVG, and other compressible formats at the edge and store and serve both compressed and uncompressed versions.