meta-tags

Angular2 - SEO - how to manipulate the meta description

心不动则不痛 提交于 2019-11-27 12:07:33
Search Results in google are displayed via TitleTag and the <meta name="description"..."/> Tag. The <title> -Tag is editiable via Angular2 how to change page title in angular2 router What's left is the description. Is it possibile to write a directive in angular2, that manipulates the meta-tags in the <head> part of my page. So depending on the selected route, the meta description changes like: <meta name="description" content="**my description for this route**"/> Since Angular4, you can use Angular Meta service . import { Meta } from '@angular/platform-browser'; // [...] constructor(private

How is the meta viewport tag used, and what does it do?

别等时光非礼了梦想. 提交于 2019-11-27 11:45:14
问题 What browsers support this meta tag? How do i use it? Does this mean it will solve all my mobile resizing problems? If anyone could answer this it would be a great help to newbies learning <meta="viewport"> 回答1: The viewport browser support is a little bit across the board. I'll point you to the Quirksmode page for viewport browser support for the full details. You use the viewport meta tag like any other meta tag. Put the code block straight up in the <head> . Pretty much, but again, a

iPad layout scales up when rotating from portrait to landscape

可紊 提交于 2019-11-27 10:08:33
I have a added to the "viewport" meta tag "width=device-width,initial-scale=1.0" and on an iPad the page loads up fine in landscape mode, the it switches nicely to portrait and when I rotate it back to landscape it scales the page up and I have to pinch zoom it back to a 1 scale. I can fix this by adding the "maximum-scale=1.0, user-scalable=no" , but I was wondering if there is a way I could fix this without taking away from the user the ability to zoom in the page. If you have any suggestions I would love to hear them, Thanks! ------ Update ------ This is not an issue anymore in iOS7. And

Getting meta title and description

守給你的承諾、 提交于 2019-11-27 07:51:34
问题 I am having trouble getting the meta description/title from this specific site. Here is some code: $file = file('http://www.thegooddrugsguide.com/lsd/index.htm'); $file = implode("",$file); if (preg_match('/<title>(.*?)<\/title>/is',$file,$t)) $title = $t[1]; It works with other sites, but not with the site in question. What could be the problem? 回答1: This should work fine: $doc = new DOMDocument; $doc->loadHTMLFile('http://example.com'); $title = $doc->getElementsByTagName('title'); $title =

Should I remove meta-robots (index, follow) when I have a robots.txt?

笑着哭i 提交于 2019-11-27 07:30:36
问题 I'm a bit confused whether I should remove the robots meta tag, if I want search engines to follow my robots.txt rules. If the robots meta-tag (index, follow) exists on the page, will search engines then ignore my robots.txt file and index the specified disallowed URLs in my robots.txt anyway? The reason why I'm asking about this, is that search engines (Google mainly) still indexes disallowed pages from my website. 回答1: If a search engine’s bot honors your robots.txt, and you disallow

Can't display SVG charts in Internet Explorer 8

£可爱£侵袭症+ 提交于 2019-11-27 07:07:24
问题 I made a servlet that runs and renders a BIRT report, using ReportEngine API. The only problem is that SVG images (charts) are not shown in Internet Explorer 8 or 7. While running the official BirtViewer webapp they are shown under IE8 too. I peeked into BirtViewer resulting HTML and noticed this meta tag: <!-- Mimics Internet Explorer 7, it just works on IE8. --> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"> So I tried adding it by hand in my own resulting HTML, but with no

How can I disable meta format-detection on iOS for dates?

感情迁移 提交于 2019-11-27 06:09:46
问题 I realize that there is a meta tag for disabling the auto formatting of a telephone number in iOS but I wondered if its possible in iOS for things like a date or time. Anyone have any ideas? 回答1: There is no meta way at the moment. However there are two tricks to break the detection. I advise to split the date/time with a harmless HTML element, like a span: Mon<span></span>day Another trick is adding a zero-width space: Mon​day However this is less stable, for example in the preview text of

What happens if the meta tags are present in the document body?

南楼画角 提交于 2019-11-27 04:27:27
I am working on a ASP application and the code, template and files are organized in a way that does not allow me to alter anything outside the body tag. So I am thinking about inserting the meta tags inside the body -- like this: <!-- FEW ASP INCLUDES --> <html> <head> <!-- FALLBACK TITLE AND DESCRIPTION --> <title>Default Title</title> <meta name="description" content="Default Description"> </head> <body> <!-- SOME HTML MARKUP --> <div class="dynamic-content"> <!-- InstanceBeginEditable name="dynamic-content" --> <!-- THIS IS WHERE I CAN WRITE ASP CODE --> <title><%= Page.Meta.GetTitle( yada,

How to set priority order to Open Graph images for links that are inserted in comments. (Not sharing or wall posts.)

本小妞迷上赌 提交于 2019-11-27 03:14:46
问题 When pasting a link to a page within a comment, not directly as a wall post, Facebook defaults to choosing a thumbnail image, without users being able to choose the relevant thumbnail. Is it possible to set or determine priority for og:image tags on pages with multiple og:image tags? There doesn't seem to be any logical way to determine why FB is choosing any specific image. The image they are choosing isn't the first, or last image, by code order or alphabetized by name, and doesn't really

Having trouble using jQuery to set meta tag values [duplicate]

╄→尐↘猪︶ㄣ 提交于 2019-11-27 01:55:46
问题 Possible Duplicate: Is it possible to use javascript to change the meta-tags of the page? I'm trying to set meta tags using jQuery (please don't reply that this doesn't make sense since search engines blah-blah-blah... I am loading invoking 3rd party Javascript functions that examine these vales, such as Tweetmeme and Facebook). If I use: $('meta[name=some-name]').attr('content', 'some value'); it does work to set the value of an existing meta tag, but does not create a meta tag if such a