Schema App CDN Compression on Scripts and Resources

Modified on Wed, 02 Mar 2022 at 12:15 PM

Schema App uses a CDN to serve resources to load data as fast and reliable as possible, another thing the CDN supports is gzip and brotli compression to ensure the files are compressed and served efficiently. 


When testing this behaviour one must ensure that they are sending the Accept-Encoding header in the request. As an example one might send Accept-Encoding: gzip for gzip compression. Web browsers like Google Chrome, Firefox etc do this by default so users loading your pages will be served compressed content from us automatically. You can verify this behaviour in the Network tab of your browsers inspector, see below as an example: 



You can see that when enabling gzip it significantly reduces the file size from 27kb to 8.5kb as below: 



If you disable or remove that header it will serve the file uncompressed as seen below (this is for compatibility reasons): 



If you are using a tool that is flagging compression as an issue make sure that too is sending an Accept-Encoding header. If the header is not set or is invalid our CDN will not compress the response. Not compressing when no header is sent is done for compatibility reasons. Some consumers may not be able to read gzip or brotli response and therefore enabling it by default would prevent those consumers from using our CDN. 





Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article