So I tested my site https://jamiecropley.ai here Website Speed Test | Pingdom Tools and it says expires headers and gzip is not being picked up on my site, and I can’t find it in inspector in Chrome browser either the following information from my vercel.json file:
Firstly, is my vercel.json file correct? Can I trust what that site is saying? How can I validate my vercel.json file overall in respect of gzip and Expires headers?
The compression on Vercel will be based on the Accept-Encoding header sent in the request, if the header specifies brotli (br) is supported it will be used over gzip. Unfortunately you cannot setup custom Content-Encoding header at this point. While double-compressing the file is one way to add the header, it’s the wrong way and makes performance worse. (the browser will natively decompress our second compression, but then JS will still need to decompress the inner compression)
One thing I have noticed I think this https://tools.pingdom.com/ tool does not check for Brotli I believe?
“The compression on Vercel will be based on the Accept-Encoding header sent in the request, if the header specifies brotli (br) is supported it will be used over gzip. Unfortunately you cannot setup custom Content-Encoding header at this point. While double-compressing the file is one way to add the header, it’s the wrong way and makes performance worse. (the browser will natively decompress our second compression, but then JS will still need to decompress the inner compression)”
I was not to sure what was meant from this.
Am I right to presume at this point my site is using brotli compression by default on vercel therefore its not being picked up on that tool? I tried other tools and it says its there, brotli compression that is e.g. on GZIP Compression Test | GiftOfSpeed