Page MenuHomePhabricator

Add data-nosnippet to the printfooter div
Closed, ResolvedPublic

Description

The printfooter is a (on-screen) hidden div which contains a permalink to the revision a page was generated from — for example:

<div class="printfooter">
  Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Main_Page&amp;oldid=1093586708" class=" nonimage">https://en.wikipedia.org/w/index.php?title=Main_Page&amp;oldid=1093586708</a>"
</div>

Google sometimes appears to pick this up in the SERP snippet, which reduces the amount of useful content displayed and looks a little "messy".

image.png (122×619 px, 15 KB)

We can use data-nosnippet (ref) to hint to Google to not include this content.

<div class="printfooter" data-nosnippet>
  Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Main_Page&amp;oldid=1093586708" class=" nonimage">https://en.wikipedia.org/w/index.php?title=Main_Page&amp;oldid=1093586708</a>"
</div>

Details

Event Timeline

Change 823212 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/core@master] SkinMustache: Add `data-nosnippet` to `printfooter`

https://gerrit.wikimedia.org/r/823212

Change 823212 merged by jenkins-bot:

[mediawiki/core@master] SkinMustache: Add `data-nosnippet` to `printfooter`

https://gerrit.wikimedia.org/r/823212