How to install facebook og: description empty?

I have the following html page that I share on facebook

<head> ... <meta property="og:title" content="my title" /> <meta property="og:description" content="" /> ... </head> ... 

I do not want og:description in my shared link.

When I removed the og:description tag, it filled part of the description from my message body . It also happened when I set the value to an empty string or space .

How can I make it work with empty og:description ?

+5
source share
3 answers

This solution:

 <meta property="og:description" content="&hellip;" /> 
+3
source

Use HTML delete characters

The og:description meta field is required. When it is empty, the default behavior is to fill it with text from the <body> page.

However, you can crack it with HTML escape characters:

 <head> ... <meta property="og:description" content="&nbsp;" /> ... </head> 

Useful escape characters in this context;

  • &nbsp; - space
  • &hellip; - horizontal 3 dots (as @idomusha suggested +1)
+3
source

From docs :

Basic tags: These are the most basic meta tags that you should use for all types of content.

og:description is one of them, so you probably can't set it to empty.

0
source

Source: https://habr.com/ru/post/1235463/


All Articles