Is it possible to serve gzipped js/css files from a public CDN?

Viewed 324

According to this article, gzipping a minified file, can significantly reduce its size.

In case of my website, I have quite a few libraries which are served from a public CDN, for example I have included the following minified bootstrap files in my site:

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  1. Is there any option to server the gzipped version of the above files from a public CDN?
  2. If that's not an option, is it a good idea to gzip the above libraries and serve them from my own CDN (i.e. server them from CloudFront and set the option to compress the files)?

Update

As per the comments, I have checked the content type and both bootstrap files are compressed.

bootstrap.min.js enter image description here

bootstrap.min.css enter image description here

0 Answers
Related