WOFF files compressed on origin, but not after Cloudflare

Hi,

After using Cloudflare my WOFF (font) files are not compressed, and reported as no gziped. There is a support open issue several days ago #1457501.

My origin test:
https://www.webpagetest.org/result/180116_SF_c73daaa8ca1751d33032a5d251475368/

After Cloudflare:
https://www.webpagetest.org/result/180116_8D_f39be533d5d188de9ae594efc44ca36b/

You can see at compress transfer section that WOFF files are not compressed:

498.0 KB total in compressible text, target size = 394.9 KB - potential savings = 103.1 KB

WARNING - (175.9 KB, compressed = 96.5 KB - savings of 79.4 KB) - https://www.decisao.net/fonts/font-icons.woff 
FAILED - (37.2 KB, compressed = 13.6 KB - savings of 23.7 KB) - https://www.decisao.net/fonts/lined-icons.woff

I tested the files via curl, the results are the same:

curl -H "Accept-Encoding: gzip" -I https://www.decisao.net/fonts/font-icons.woff

RESULT WITHOUT Cloudflare (gray cloud):
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 98807
Connection: keep-alive
Date: Mon, 25 Dec 2017 00:52:51 GMT
Last-Modified: Sun, 24 Dec 2017 19:10:45 GMT
ETag: “a4a3d54e6434158657e8bf728f13c001”
x-amz-storage-class: REDUCED_REDUNDANCY
Cache-Control: max-age=691200
Content-Encoding: gzip <========================= SEE GZIP COMPRESSION
Accept-Ranges: bytes
Server: AmazonS3
X-Cache: Miss from cloudfront
Via: 1.1 bec99d31f97b04eb17b6d14ed9b452b9.cloudfront.net (CloudFront)
X-Amz-Cf-Id: YjMQSm0eS-lJagrv9NhqqtVFxmCgl1KfuaYyJ4HAB-XsAdejXcQHHg==

WITH Cloudflare (orange cloud):
HTTP/1.1 200 OK
Date: Mon, 25 Dec 2017 00:45:38 GMT
Content-Type: application/octet-stream
Connection: keep-alive
Set-Cookie: __cfduid=dbc464429753b2bae3dbe66cc472f88711514162738; expires=Tue, 25-Dec-18 00:45:38 GMT; path=/; domain=.decisao.net; HttpOnly; Secure
Last-Modified: Sun, 24 Dec 2017 19:10:45 GMT
ETag: W/“a4a3d54e6434158657e8bf728f13c001”
x-amz-storage-class: REDUCED_REDUNDANCY
Cache-Control: public, max-age=691200
X-Cache: Miss from cloudfront
Via: 1.1 1dcbecb3db3e9de133da41ed053506f0.cloudfront.net (CloudFront)
X-Amz-Cf-Id: 9WnnbkTTS0dj69PrS3-IzNDAJ0IZQTfnPKr7Al-juj3lnoUTcz6GiQ==
CF-Cache-Status: HIT
Vary: Accept-Encoding
Expires: Tue, 02 Jan 2018 00:45:38 GMT
Server: Cloudflare
CF-RAY: 3d27c75d7fd50a06-ATL

There is no GZIP at all with Cloudflare. My origin (Cloudfront) is serving the files gzipped.

Please take a look on this issue.

Thanks,
Eliéser

When I test I do see gzip compressing now.

[email protected]:~$ curl -H "Accept-Encoding: gzip" -I https://www.decisao.net/fonts/font-icons.woff
HTTP/2 404 
date: Fri, 29 Jan 2021 20:40:03 GMT
content-type: text/html; charset=utf-8
set-cookie: __cfduid=d6f9e1a50b97591b5731bc2f9b8ae32081611952803; expires=Sun, 28-Feb-21 20:40:03 GMT; path=/; domain=.decisao.net; HttpOnly; SameSite=Lax; Secure
content-security-policy: img-src 'self' data:; default-src 'self' 'unsafe-inline' cookieinfoscript.com www.googletagmanager.com fonts.googleapis.com fonts.gstatic.com www.google-analytics.com static.cloudflareinsights.com
x-frame-options: DENY
vary: Cookie
x-content-type-options: nosniff
referrer-policy: same-origin
via: 1.1 vegur
cf-cache-status: DYNAMIC
cf-request-id: 07f178e59c0000024a6fb82000000001
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"max_age":604800,"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=%2FaGqnlvkwEpFagDAChZpGShv9tfv5g9o0fP%2Bm3YfZjgFO2P787OrdYfSpolEMlYr8v9%2BO1OcHyhi7XOfr7oYY03K04mulfNxPN7D24VugsI%3D"}],"group":"cf-nel"}
nel: {"report_to":"cf-nel","max_age":604800}
strict-transport-security: max-age=15552000; includeSubDomains; preload
server: cloudflare
cf-ray: 6195c41c2ea7024a-SJC
content-encoding: gzip

Are you still seeing gzip not working in your testing?

1 Like