Relative Content

Tag Archive for javascriptvue.jsdommeta-tags

How to delay rendering of Open Graph meta tags until API call completes in Vue.js?

I’m working on a Vue.js application where I need to dynamically set Open Graph (OG) meta tags based on data fetched from an API. The OG tags are necessary for social media sharing (e.g., Facebook, WhatsApp). The issue I’m facing is that the meta tags, particularly og:image, are set before the API call completes, resulting in an empty image URL initially. When the page is shared, the meta tags with the empty image URL are used, instead of the updated ones.