Precompression on aem/dispatcher with brotli
Hello everybody,
anybody tried to precompress the content on the dispatcher?
We want to use brotli in our environment and i find some solutions, but no solution i've found used it in/with aem.
We can try to use something like this on the dispatcher:
stalking.sh
#!/bin/sh
while :
do
find /path/to/content/ -type f | entr -d ~/path/to/compressscript.sh
done
compressscript.sh
#!/bin/sh
for x in 'find /path/to/content/ -type f \( -name '*.html' -o -name '*.js' -o -name '*.css' -o -name '*.xml' -o -name '*.svg' \)
do
bro --input ${x} --output ${x}.br
done
What do you think?