How to add meta tag in JavaScript

You can add it: var meta = document.createElement(‘meta’); meta.httpEquiv = “X-UA-Compatible”; meta.content = “IE=edge”; document.getElementsByTagName(‘head’)[0].appendChild(meta); …but I wouldn’t be surprised if by the time that ran, the browser had already made its decisions about how to render the page. The real answer here has to be to output the correct tag from the server in … Read more

Using Javascript to override or disable meta refresh tag

I’ve found that the noscript tag works quite nicely for this. For example, you can place this just after you close the head element: <noscript> <meta http-equiv=”refresh” content=”5;URL=http://www.example.com”> </noscript> No need to remove the meta tag with script, since a browser that has script support will ignore everything inside the noscript element.

Angular 4 – Update Meta tags dynamically for Facebook (Open graph)

Open Graph OG Tags must be within the sourcecode! You need to provide a static html page containing the the open graph tags like og:image og:title and og:description in the html sourcecode, since facebook, twitter and co a just scraping the plain html without rendering it through javascript. Angular dynamically updates the dom through js … Read more

What is initial scale, user-scalable, minimum-scale, maximum-scale attribute in meta tag?

They are viewport meta tags, and is most applicable on mobile browsers. width=device-width This means, we are telling to the browser “my website adapts to your device width”. initial-scale This defines the scale of the website, This parameter sets the initial zoom level, which means 1 CSS pixel is equal to 1 viewport pixel. This … Read more

Which are the standard W3C meta tags?

HTML5 You can only use the following values in HTML5. If you need a value not listed, you’d have to register it first. name values Standard metadata names (defined in the HTML5 spec) MetaExtensions (registered in the WHATWG wiki according to the HTML5 spec) http-equiv values Pragma directives (defined in the HTML5 spec) PragmaExtensions (registered … Read more

Showing Thumbnail for link in WhatsApp || og:image meta-tag doesn’t work

I belive you need to add itemprop to the og:image meta tag, have the image size set to 256×256 and also it would not harm to add the site_name, type and updated_time properties either 🙂 <meta property=”og:site_name” content=”San Roque 2014 Pollos”> <meta property=”og:title” content=”San Roque 2014 Pollos” /> <meta property=”og:description” content=”Programa de fiestas” /> <meta … Read more