3 ms·
It doesn't affect performance of the browser or the web server, but I understand that it takes some work to support for a CDN. Too bad since you run a CDN ;) I
by user5994461 8y ago
It doesn't affect performance of the browser or the web server, but I understand that it takes some work to support for a CDN. Too bad since you run a CDN ;)
I had to debug some pretty nasty issues caused by missing Vary. I would certainly do without it if it were possible, but it's not an option.
Vary is strictly required for anything that renders content per browser (User-Agent), compression (Content-Type Content-Encoding) or CORS policies (Origin).
- kentonv 8y agoCloudflare includes Origin in the cache key by default. I believe Accept-Encoding is also handled automatically, by compressing/decompressing post-cache as needed.
- manigandham 8y agoCloudflare is/was built on nginx so Vary is already supported and available for enterprise plans as stated. They just avoid it since they have such a large free tier of users and vary headers can easily eat up cache space for most scenarios. It seems Workers is their standard answer for more flexibility now and it works well (if you're ok with the pricing) since you can create your own cache key easily by combining and hashing the different headers you're interested in and just turning them into a querystring param in the origin request.