meta-tags

Bad value google for attribute name on element meta

我怕爱的太早我们不能终老 提交于 2019-12-05 19:46:06
Is there an alternative for HTML5 for google notranslate meta tag. I getting the error below when validating HTML5. Bad value google for attribute name on element meta: Keyword google is not registered. <meta name="google" content="notranslate" /> The keyword google is registered at http://wiki.whatwg.org/wiki/MetaExtensions#Registered_Extensions : A content of notranslate will tell google not to pop up the translate bar / link if the page is in a foreign language form the user's browser. <meta name="google" content="notranslate"> So it is valid to use this keyword in HTML5. If a validator

Sharing on social media, the URL does not render any meta data

耗尽温柔 提交于 2019-12-05 16:56:45
问题 We have built a project (Web Application) in React .net core using react in client-side rendering. We've used react-helmet for dynamically assigning meta tags. The issue being when the app renders in the browser. The browser gets only the static HTML on initial load which does not include the dynamic meta tags we have set. However on inspecting you get those meta tags under "Elements". Also, if we use these URL for sharing on any social media, like WhatsApp or Facebook, the URL does not

Inject a meta tag from a document's body?

白昼怎懂夜的黑 提交于 2019-12-05 16:23:44
I need to add a meta tag (specfically, <meta name="apple-itunes-app" content="app-id=xxxxx"> ) to a certain page, but the way our templates are set up, it's not possible for me to edit the code for the HEAD tag directly (for corporate, not technical, reasons). Therefore, is there a way using JQuery within the BODY tag to add this meta tag? Maybe you can try this: jQuery: $('head').append('<meta name="apple-itunes-app" content="app-id=xxxxx">'); Javascript: document.getElementsByTagName('head')[0].appendChild('<meta name="apple-itunes-app" content="app-id=xxxxx">'); You can add the meta tag but

Why won't my viewport tag properly use device width (no zoom) on most mobile devices?

℡╲_俬逩灬. 提交于 2019-12-05 16:18:08
UPDATE 03/2019: This Q&A still gets some activity, nearly 5 years my question came up. Please note this problem was due in part to more common irregularities in older mobile devices at THAT time. With today's browsers and devices, fiddling with viewport scalability would be a shoe-horn fix to a bigger problem which is likely a problem in either your CSS or possibly your markup. I've built a dozen responsive sites and have never experienced this problem. Basically, I'm using the meta tag for viewport with width=device-width, but iPhone and Android devices are still zooming. For some reason, I

How would I replace the meta title, keywords and description on the ajax loaded html document?

久未见 提交于 2019-12-05 10:26:51
How would I replace the meta title and description on the document with the meta title and description from an incoming html document on an ajax call?? I am calling new content from the #content div on an adjacent html document. What I want to happen is when the new content loads I want to replace the main documents title (and description and keywords... might as well since im tooling around up there anyway) with the meta title in the html file that is being loaded. I have thought about using replace(); or match(); but I just wanted to find out the best way. here is the script: // JavaScript

Can I stop a meta refresh using javascript?

余生颓废 提交于 2019-12-05 05:26:18
The following code allows the user to stop the meta refresh from happening - and it successfully removes the meta refresh from the page, but the browser nonetheless refreshes the page. Any idea how to make it work? <!doctype html> <html> <head> <title>Test</title> <meta charset="UTF-8" /> <meta http-equiv="refresh" content="5" id="refresh" /> <script src="//code.jquery.com/jquery-1.11.2.min.js"></script> <script type="text/javascript"> $(function(){ $("a").click(function(e){ e.preventDefault(); $("#refresh").remove(); }); }); </script> </head> <body> Reloaded at <span id="time"></span> <script

How implement SEO (Metatags) in Angular 2 (with Angular universal for rendering on server side)?

半腔热情 提交于 2019-12-05 05:04:25
I'm searching a fully working example about SEO or Metatags with Angular 2 using Angular universal to render on server side (to be recognize by facebook, twiter, and other metatags) but I had not success.. I found multiple articles, but there are incomplete (no all source code is available) or oldest (not compile with the latest versions): a) blog.devcross.net/2016/04/17/angular-2-universal-seo-friendly-website/ NOTE: Excelent post with source code, but It's not working. b) builtvisible.com/universal-angular-2-server-side-rendering-seo-crawl-friendliness/ NOTE: Very usefull but with no source

Scale website to mobile devices

江枫思渺然 提交于 2019-12-05 02:43:38
I have a web app where responsive layout is not an option for mobile devices, so I tried playing with the viewport scaling a bit but had no success in doing so. Page size is 1280x720 so on small screens it should be zoom out and on larger ones zoomed in: var scale = $(window).width() / 1280; $('head').append('<meta name="viewport" content="width=device-width, height=device-height, initial-scale=' + scale + ', maximum-scale=' + scale + ', user-scalable=0">'); I've only tried this for width but the result is not the desired one, am I doing something wrong? I am not sure exactly what you are

Update meta tags in angular universal with external API call

吃可爱长大的小学妹 提交于 2019-12-04 23:56:51
问题 I've spent more than 2 months but could not found a clear solution of how to proceed with angular universal. I've already spent about 6 months in implementing angular universal on a project for which I don't get a much time and now I'm stuck with this issue. Can anyone help me with this as it seems the whole world want to know a solution for Angular SSR. Here's my code(Meta tag service): import {Injectable} from '@angular/core'; import { Meta, Title } from '@angular/platform-browser'; import

Open Graph META Tags for several Share buttons

大城市里の小女人 提交于 2019-12-04 20:17:17
Is there a way to have specific og meta tags for each FB share button? <meta property="og:title" content="Youtube video 1" /> <meta property="og:description" content="First link to a youtube video" /> <meta property="og:image" content="http://www.plasticoperator.com/youtube_logo_black.png" /> <a href="http://www.facebook.com/sharer.php?u=http://www.youtube.com/watch?v=FXPXHK7I1iQ" onClick="return fbs_click(626, 305)" target="_blank" >SHARE 1</a> <a href="http://www.facebook.com/sharer.php?u=http://www.youtube.com/watch?v=FXPXHK7I1iQ" onClick="return fbs_click(626, 305)" target="_blank" >SHARE