I am trying to generate pre-compressed brotli files in designated directories… Whatever html, css and js files are there have to be compressed to brotli.
I found a rust tool here – https://github.com/neosmart/static-compress
Besides this, there’s also an option within W3TC Wordpress plugin. However, despite brotli PHP module being loaded and available, W3TC is not creating either gzip or brotli files.
On Nginx, I used to depend on on-the-fly compression using a module based on Google’s code.
Does anyone have any suggestions on what can be used to create pre-compressed brotli files? I thought of creating a bash script and having it run every 6 hours or so, but then, I realized that it might not be as simple as it seems, as there are cases where the original file may change, and there might already be an .br file in the folder belonging to a previous version of the original file (source file) and so on.
Looks like there’s no plugin other than W3TC to do this either, and W3TC seems to be buggy on this aspect.
Has anyone taken a crack at this problem?