I keep getting this error, and can’t figure it out.
I asked this question on developers.facebook.com:
Page with error: link
Same page, but from a different sub-domain, without error: link
Both use
content-encoding
br
.What could be causing this?
I am serving pre-compressed html files, these html files have been compresses using Brotli compression, and have a br extension.
From my apache config files:
<code> # Serve the Brotli-compressed HTML files from the "static_html" directory
RewriteRule ^(.+).html$ $1.html.br [T=text/html,E=no-brotli,E=no-gzip]
# Serve correct content types, and prevent double compression.
RewriteRule ".html.br$" "-" [T=text/html,E=no-brotli:1,E=no-gzip:1]
RewriteRule ".css.br$" "-" [T=text/css,E=no-brotli:1,E=no-gzip:1]
RewriteRule ".js.br$" "-" [T=text/javascript,E=no-brotli:1,E=no-gzip:1]
RewriteRule ".xml.br$" "-" [T=application/xml,E=no-brotli:1,E=no-gzip:1]
<FilesMatch ".br$">
# Prevent mime module to set brazilian language header (because the file ends with .br)
RemoveLanguage .br
# Set the correct encoding type
Header set Content-Encoding br
# Force proxies to cache brotli & non-brotli files separately
Header append Vary Accept-Encoding
</FilesMatch>
</code>
<code> # Serve the Brotli-compressed HTML files from the "static_html" directory
RewriteRule ^(.+).html$ $1.html.br [T=text/html,E=no-brotli,E=no-gzip]
# Serve correct content types, and prevent double compression.
RewriteRule ".html.br$" "-" [T=text/html,E=no-brotli:1,E=no-gzip:1]
RewriteRule ".css.br$" "-" [T=text/css,E=no-brotli:1,E=no-gzip:1]
RewriteRule ".js.br$" "-" [T=text/javascript,E=no-brotli:1,E=no-gzip:1]
RewriteRule ".xml.br$" "-" [T=application/xml,E=no-brotli:1,E=no-gzip:1]
<FilesMatch ".br$">
# Prevent mime module to set brazilian language header (because the file ends with .br)
RemoveLanguage .br
# Set the correct encoding type
Header set Content-Encoding br
# Force proxies to cache brotli & non-brotli files separately
Header append Vary Accept-Encoding
</FilesMatch>
</code>
# Serve the Brotli-compressed HTML files from the "static_html" directory
RewriteRule ^(.+).html$ $1.html.br [T=text/html,E=no-brotli,E=no-gzip]
# Serve correct content types, and prevent double compression.
RewriteRule ".html.br$" "-" [T=text/html,E=no-brotli:1,E=no-gzip:1]
RewriteRule ".css.br$" "-" [T=text/css,E=no-brotli:1,E=no-gzip:1]
RewriteRule ".js.br$" "-" [T=text/javascript,E=no-brotli:1,E=no-gzip:1]
RewriteRule ".xml.br$" "-" [T=application/xml,E=no-brotli:1,E=no-gzip:1]
<FilesMatch ".br$">
# Prevent mime module to set brazilian language header (because the file ends with .br)
RemoveLanguage .br
# Set the correct encoding type
Header set Content-Encoding br
# Force proxies to cache brotli & non-brotli files separately
Header append Vary Accept-Encoding
</FilesMatch>