Using Brotli with Firebase hosting

2.1k views Asked by At

Is there a way to use Brotli compression instead of gzip with Firebase hosting? I know that Firebase will automatically compress it but so far it is only with gzip.

2

There are 2 answers

0
Kiana On BEST ANSWER

Firebase Hosting now enables Brotli compression by default: https://firebase.googleblog.com/2020/08/firebase-hosting-new-features.html

0
enf0rcer On

Somehow I ended up at this question, even though it is dated I wanted to mention it should be possible to use Brotli compression now using Firebase Cloud Functions. I havent tested it yet, but since you can run your own node.js code via Cloud Functions I don't see any reason why this would not work. Afcourse using Cloud Functions could slow down your app, so be sure to test carefully going this approach. It might not give the loading boost you are hoping for.