Opengraph tag refresh

Create a new post, containing a URL.

Notice that there is no nice preview generated, because, as it warns, you forgot to put in the Opengraph tags.

OK, now, being the owner of the website that the link points to, put in the Opengraph tags there. Now back in the Discourse editor, the link preview you see looks great. OK, now save the post.

But alas, it’s “bait and switch”, because the post still looks crappy, unlike what it looked like in the editor preview.

The only workaround is to put a “#” at the end of the URL, save it, and then take that # back off, and save it.

On Facebook one doesn’t even need to edit the post to refresh the link preview.

My point is Discourse is showing people that the link is refreshed, there when editing. But after saving it still uses the old version.

You might say, “Well you didn’t actually change anything. You just looked at the post there in the editor, even if you then clicked “save””.

True, but Discourse fooled me into thinking it refreshed the link preview.

Yeah. There are a bunch of cases where the browser sees one thing and Discourse sees another when it bakes the post (like if the Discourse server is rate limited). And speaking of rate limiting, how many times do you think Discourse should keep polling the remote server to see if something has changed?

Your # trick was clever.

1 Like

I don’t think it should poll out of the blue at all.

But when it does, it should at least not “bait-and-switch”.

Maybe in the editor have a “refresh link” button.

1 Like