Dynamically adding meta tags using javascript or jquery [twitter cards]
问题 I want to add twitter card meta tags to my website. i cannot add static tags since the content attribute in the meta tag has to change dynamically. Plz help if someone has a solution. 回答1: You can't, at least not in any way that Twitter is going to recognise. When Twitter fetches the page, it is always going to get the meta elements that are in the HTML, never ones added with client side JavaScript. If you are changing content dynamically then make use of the history API to update the URI,