DEV Community

Discussion on: 10 HTML Tags for SEO🔍

Collapse
 
mrcaidev profile image
mrcaidev

I recently read the documentation of Open Graph, and I'm confused about the way DEV.TO add og:* to their meta tags, on the page of a post article.

This is how DEV.TO adds OG meta tags to the post article page:

How DEV.TO adds OG meta tags to the post article page

But actually when I finished reading the OG documentation, I think meta tags like og:title, og:description should be relative to the post itself, rather than information of the whole DEV.TO site.

I'm a beginner to SEO so would anyone explain this to me🤔

Collapse
 
cicirello profile image
Vincent A. Cicirello

Are you sure your screenshot is of the head of a page for a post? And not for the dev.to homepage? I just checked head of a page for one of my posts and the og and twitter tags correspond to the post as you'd expect.

Collapse
 
mrcaidev profile image
mrcaidev

I found something interesting: When I first enter a page for a post, the meta tag is all about DEV.TO, but after I click on the refresh button, the meta tags update to the content of the post...

Thread Thread
 
cicirello profile image
Vincent A. Cicirello

That is interesting. I wonder if it is something browser specific causing that behavior, perhaps in combination with their CMS. Viewing the source in Chrome on Android showed header tags as expected. I might check it out again later on a desktop.

Thread Thread
 
mrcaidev profile image
mrcaidev

I use Edge on Windows and has not yet figured out a convincing explanation🤔

Thread Thread
 
fic_stojkovski profile image
Filip Stojkovski • Edited

This is probably because the meta og tags are set on backend and the DEV.TO is probably single page application and never re-set after the initial page load. Meta og tags are used so social media like twitter/facebook etc. can "beautify" the post of copied link. In reality you don't need some of the meta tags to be updated dynamically on SPAs as long as it is properly crawled by the robots when accessed.
Note: This is my presumption and view of this "problem"

Thread Thread
 
cicirello profile image
Vincent A. Cicirello

You might be right (I haven't been curious enough to look at the forem repository for the source code). However, I also haven't been able to recreate the issue described here. I've gone to the page of one of my own posts on both Chrome and Edge on Windows 10, as well as on Chrome on Android, and in all 3 cases inspecting the source of the post page, I find the OG tags for the post (as you'd expect) and not for the site. I'm guessing that the behavior that they saw might depend upon how one navigates to a post page.

Thread Thread
 
mrcaidev profile image
mrcaidev

👍Makes sense