A Little Less Metacrap

Warning This article was written over six months ago, and may contain outdated information.

Jere­my Kei­th wrote a (typ­i­cal­ly great) post about metacrap, the unnecce­sar­i­ly ver­bose and repet­i­tive meta­da­ta in the head of web doc­u­ments, that’s required for con­tent to be more eas­i­ly share­able across social media. I ful­ly agree with his broad point — there’s an awful lot of crap in head — but there’s a flaw in his ini­tial exam­ples. It’s explained in this extract from Twitter’s Get­ting Start­ed [with Cards] Guide:

You’ll notice that Twit­ter card tags look sim­i­lar to Open Graph tags, and that’s because they are based on the same con­ven­tions as the Open Graph pro­to­col. If you’re already using Open Graph pro­to­col to describe data on your page, it’s easy to gen­er­ate a Twit­ter card with­out dupli­cat­ing your tags and data.

So actu­al­ly the meta­da­ta you need to cater for most social shar­ing is Open Graph, with a few extra tags just for Twitter:

<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@adactio">
<meta property="og:url" content="https://adactio.com/journal/9881">
<meta property="og:title" content="Metadata markup">
<meta property="og:description" content="So many standards to choose from.">
<meta property="og:image" content="https://adactio.com/icon.png">

I mean, it’s still per­haps too much, and (as point­ed out) would prob­a­bly be best writ­ten as JSON-LD in the man­i­fest. But there’s no redun­dan­cy, so is not quite as bad as paint­ed in Jeremy’s arti­cle, even with his ele­gant squish­ing solution.

1 comment on
“A Little Less Metacrap”

  1. […] “stan­dards” to get post pre­views to appear on Face­book, Twit­ter and Slack. (In A Lit­tle Less Metacrap, Peter Gasston slims down Jeremy’s exam­ple some­what, but his point still […]