-
-
Notifications
You must be signed in to change notification settings - Fork 30
Meta data is missing from the Facebook preview when sharing a page or post which is cached #248
Copy link
Copy link
Open
Labels
Milestone
Description
The meta data is missing from the Facebook preview when sharing a page or post which is cached. The Facebook Debugger shows the error message Curl error: 61 (BAD_CONTENT_ENCODING).
I copied out the HTML content to a static file in the webroot and shared this URL; it was correctly interpreted. Therefore, the content delivery from the cache is causing a problem. I traced the problem back to the following rules in the .htaccess file. If I comment these out, the Facebook Debugger can load the content correctly.
# gzip
RewriteRule .* - [E=CACHIFY_SUFFIX:]
<IfModule mod_mime.c>
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* - [E=CACHIFY_SUFFIX:.gz]
AddType text/html .gz
AddEncoding gzip .gz
</IfModule>To Reproduce
- Publish a page or post and allow it to be cached as a static file on the server.
- Test the URL using https://developers.facebook.com/tools/debug/
- See the error Curl error: 61 (BAD_CONTENT_ENCODING)
Expected behavior
The usual Facebook preview of meta data (including post thumbnail) should be shared. The preview in the Facebook Debugger should not return any errors.
System (please complete the following information):
- OS: all
- Version: all
Reactions are currently unavailable