Friday, 9 June 2017

Improve google page speed score for React Application through gzip compression on node server?

I'm building a react application that uses webpack which is generating a bundle.js of around 2 MB! Hence, the website's rating on Google Page Speed is pretty low. I would like to improve this for which I minified all images, javascript, css files. The rating improved but is still poor.

I see "Enable compression" as the top suggestion in the google page speed insights for which I tried to integrate g-zip compression. Through this I could generate a compressed bundle.min.gz but when I include this in my index.html, the browser returns an "Uncaught Syntax Error" and nothing works

I assume that I'm missing something in setting up the server for sending g-zip compressed content. I'm pretty new at this. I would appreciate any help in improving page speed / enabling compression for a react application.

Thanks in advance



via Prateekro

No comments:

Post a Comment