Optimizing website performance: cache, minifying css/js, gzip compression in W3 Total Cache-like style

Hi guys,

Is there any sort of solution(s) for Frappe-backed web sites to facilitate

  • gzip compression of the server response (html, css, Javascript , JSON etc. content compression)
  • minifying CSS and JS file assets
  • caching varios JS and CSS files into a signle CSS (or JS) file resource on a server dynamically ?

In a nutshell, I would refer to the experience similar to what W3 Total Cache (W3 Total Cache – WordPress plugin | WordPress.org) delivers in Wordpress universe.

Thank you for any suggestions/knowledge sharing.


1 Like

The default setup has gzip enabled in nginx so that helps a lot. As for minifying things, in the past I had ERPNext running behind cloudflare with compression turn on, minifying html,css,js and it seemed to break things so I disabled that. To my knowledge there is no plugin like the WP one which auto minifies things, though with some nginx trickery you might be able to really go far if you need to.

GitHub - h5bp/server-configs-nginx: Nginx HTTP server boilerplate configs is a good place to start for nginx resources

1 Like

@DrTrills: thanks a lot for your suggestions and clues. We will try to play with it in the industrial setup.

when in production bench build minifies everything in build.json for sending to the client packing up the js html and css into grouped minified files

Thank, Robert (@RobertSchouten) - we will take a note on using this option in production.