Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
More info
https://en.wikipedia.org/wiki/Brotli
PHP extension
https://github.com/kjdev/php-ext-brotli
Browser support
http://caniuse.com/#feat=brotli
Current state
https://samsaffron.com/archive/2016/06/15/the-current-state-of-brotli-co...
Simple Apache rules
https://lyncd.com/2015/11/brotli-support-apache/
Comment | File | Size | Author |
---|---|---|---|
#27 | advagg-2773807-26-br-fixes.patch | 5.48 KB | mikeytown2 |
#23 | advagg-2773807-23-fix-missing-br.patch | 2.31 KB | mikeytown2 |
#12 | advagg-2773807-11-brotli-status.patch | 17.33 KB | mikeytown2 |
#10 | advagg-2773807-10-brotli-status.patch | 10.47 KB | mikeytown2 |
#9 | advagg-2773807-9-brotli-htaccess.patch | 4.85 KB | mikeytown2 |
Comments
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedFirst step; this should create .br files if the brotli_compress function exists. Will also use https://github.com/kjdev/php-ext-zopfli if it exists instead of gzencode.
Need to test for .br on the status report page.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedComment #4
poniesAfter installing the php extension I applied this patch to 7.x-2.18+34 and the assets were generated as expected. However I'm still muddling through convincing apache to serve them.
Would adding brotli support to .htaccess be a Core feature request? Is that the best way to go about it or is there a more appropriate apache configuration change? Is there any value in having zopfli with brotli?
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedLink to .htaccess changes
http://drupal.stackexchange.com/questions/215639/how-to-modify-htaccess-...
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commented#3 has been committed with some minor changes to the admin section. Keeping open as apache support and status report page testing needs to be added.
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commentedhtaccess has been committed. All that's needed is the status report check.
Comment #10
mikeytown2 CreditAttribution: mikeytown2 commentedComing back to this on Monday.
Comment #12
mikeytown2 CreditAttribution: mikeytown2 commentedThis has been committed. Need to update .htaccess files
Comment #14
mikeytown2 CreditAttribution: mikeytown2 commentedComment #18
poniesWhat do you think about the prospect of Drupal with a brotli+sdch?
Comment #19
mikeytown2 CreditAttribution: mikeytown2 commentedDoesn't seem ready for mass users quite yet
semi NSFW link: https://mikandi.com/blog/tips-and-tricks/press-me-a-sdch-implementing-sh...
https://engineering.linkedin.com/shared-dictionary-compression-http-link...
https://github.com/mikandi/sdch-tools seems like the closest thing to a drop in; so advagg can easily be used to generate a css/js dictionary but doing stuff on the apache/nginx side seems to be not easy at the moment. Although looking at the specs it seems like for static assets it'd be pretty easy to have it pre-compressed so a
*.css.sdch.{Dictionary-Checksum}.gz
or*.css.sdch.{Dictionary-Checksum}.br
file; clearing all of those out when the dictionary changes.also see: https://github.com/baranov1ch/node-sdch
I'm 100% open to patches; I have a lot of other things to take care of so I won't be the one writing sdch integration. I'd make it a sub module; similar to the sri module
Comment #20
poniesWhen I initially set this up everything went well, but a couple days later I noticed that the site was serving gziped resources again. There were no .br files in advagg_css, or advagg_js. Clearing the AdvAgg cache didn't bring them back, but resorting to drastic measures regenerated them. Once the .br assets were in place they were served. This has happened twice so far. Once since updating to AdvAgg 7.x-2.18+56-dev, and HTTPRL 7.x-1.14+51-dev.
Comment #21
mikeytown2 CreditAttribution: mikeytown2 commentedSo .br files are not getting created. Looks like I have the same issue.
Comment #22
mikeytown2 CreditAttribution: mikeytown2 commentedJust checked and this code fix (in advagg.advagg.inc) might have fixed the issue; not 100% sure as I'll have to wait and see. I'm getting .br files after clearing all files.
Comment #23
mikeytown2 CreditAttribution: mikeytown2 commentedStill more fixes are needed in advagg.missing.inc but this is a good start.
Comment #25
mikeytown2 CreditAttribution: mikeytown2 at Datasphere commentedCommitted #23 with some additions to it.
Comment #27
mikeytown2 CreditAttribution: mikeytown2 at Datasphere commentedFound a couple more differences.
Comment #30
mikeytown2 CreditAttribution: mikeytown2 at Datasphere commentedLooks like SDCH is dead https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/nQl0ORH...