7

I read about Broli compression and thought I might as well look into supporting it.

A recent(ish) article that I read mentioned a .br file - so will it be as easy as putting an index.br file alongside my index.html file? Or will supporting it mean recompiling Apache?

Richard
  • 4,809
  • 3
  • 27
  • 46
  • 1
    For anyone that doesn't know (I hadn't heard of it before today), Brotli compression is a new, alternative algorithm for HTTP compression instead of GZIP, by Google, http://google-opensource.blogspot.co.uk/2015/09/introducing-brotli-new-compression.html – Richard Apr 03 '16 at 20:28

3 Answers3

5

Here is a quite nice guide how to add support for pre compressed static content to apache with fall-back to gzip

https://lyncd.com/2015/11/brotli-support-apache/

Crami
  • 406
  • 1
  • 4
  • 11
  • Thanks. I host with 1and1.co.uk and whilst I haven't yet tried, I doubt whether their (restrictive) environment will only me to compile things. I guess I'll just have to battle on with gzip compression... – Richard Apr 06 '16 at 17:41
  • 1
    You don not have to compile the brotli package on the webserver. You can do it on your own machine and then upload the files. – Crami Apr 09 '16 at 13:55
4

Update: Use the Apache mod_brotli.

If your Apache is older, my answer from 2016 might be of interest:


2016 answer:

You could use the Apache module brotli_module by kjdev which works well for me.

You might also want to check out the new mod_brotli patch from Apache as suggested by Aeyoun. I haven't tried it myself, though.

Joe
  • 877
  • 1
  • 11
  • 26
4

Support for Brotli was just added as mod_brotli in Apache trunk, making Apache the first web server with Brotli support. Give it some time and you’ll be able to just enable the Brotli output filter as you would gzip and deflate in Apache. If you’re impatient, you can use the third-party brotli_module as suggested by Joe; or cherry pick the new mod_brotli patch from trunk and apply it to your 2.4.x installation.

Daniel
  • 4,525
  • 3
  • 38
  • 52