I am new in web development and I find it very useful to implement this in production build for performance improvement. And here, I’ll try to share this and hopefully it will be useful for you too!

Please note that if you use Content Delivery Network (CDN) like Cloudflare or Amazon Cloudfront, this functionality has already provided. So you don’t have to handle it manually.

Sample project I use to demonstrate this purpose was using several technical stack which are :

  1. React JS as front end library
  2. AWS S3 as web hosting service
  3. gzipper, a node package for compressing your static files.
  4. etc (other stacks which are not relevant for this purpose)

First of all, you’ll need to know on what level your app’s performance are. For this, I use Lighthouse Audits in Chrome’s DevTools. Just open DevTools (right click => inspect), then open Audits tab, and click “Run audits” button. Here is how my sample apps performance looks like:

#javascript #web-performance #devops #front-end-development #web-development

Improve Your Web App Performance By Serving Static Files in Compressed Format
1.15 GEEK