Version handling of metatags for og:images #1335
sindreholm
started this conversation in
Frontend
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Intro: We generate og:images for some of our pages (event pages). This works really well. However, there's an issue if we update the title, date og any other information - after a user has already shared it on Slack or another platform. It's then cached and won't display the newly generated image with updated titles, date or any other information. So we're stuck with the first image that was loaded (whenever a user posts it and it fetches it).
To overcome the cache issue of the opengraph share-image, I think a solution might be to add versioning or some other form of unique ID to the url. (could be
datetimedate?).I don't know how this works but it seems that if we're able to add something like
?v=1.0(and counting up for each time it's generated a new one) at the end of the url we might "force" Slack or other platforms that already loaded the share image once, to refetch it the next time?Since we have dynamically generated og:images I think this makes sense.
Unless I'm totally mistanken of how these things work :D
All reactions