meta-tags

Fetch meta-tags from url only by jQuery

不想你离开。 提交于 2019-12-01 05:46:45
Now a lot of scripts to facebook-style fetching data from url, but all of them work only in combination of jQuery and PHP. Is it possible to fetch url only by jQuery? I have found here how to get mata-tags of page by: $('meta[name=description]').attr("content"); $("meta[property=og:title]").attr("content", document.title); But how correctly insert this query in jQuery.get() to get text values? $.get('http://www.imdb.com/title/tt1375666/', function(data) { $('meta[name=adescription]').attr("content"); }); And if the most popular sites use OpenGraph should I look in the direction of jQuery

Dynamically adding meta tags using php

[亡魂溺海] 提交于 2019-12-01 00:35:55
In my site I have a list of categories and I have to put meta keywords and description for them.I have a single page where I will retrieve the categories from the database. Can anyone tell me how to make this much simpler to put meta tags for all the categories. Regards, Rekha http://hiox.org I'm not sure if this is what you are looking for but... I have a simple script I created to dynamically populate the meta keywords with random keywords taken from an array. Put this in the header of your template file. <meta name="keywords" content="<?php get_keywords()?>" /> This will create a comma

Viewport Tag Syntax

拥有回忆 提交于 2019-11-30 20:05:16
I have been looking on the web and I'm still confused on which works and does not. I see errors on chrome when I use the semi-colon, but the iPhone recognizes it. The comma works also without errors. I'm wondering which one is qualified as the correct way of writing it. Semi Colons - <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> Commas - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" / > https://developer.apple.com/library/archive/documentation/AppleApplications/Reference

Get `Meta` attribute `content` by selecting `property` attribute

六眼飞鱼酱① 提交于 2019-11-30 19:36:13
In jQuery you can do this: $("meta[property='fb:app_id']").attr("content"); Which will give you the content attribute value from the meta -tag with property attribute "fb:app_id". How can I do this in plain ol' Javascript? Thank you in advance. :-) Kenneth Not as elegant as JQuery I'm afraid... var metaTags=document.getElementsByTagName("meta"); var fbAppIdContent = ""; for (var i = 0; i < metaTags.length; i++) { if (metaTags[i].getAttribute("property") == "fb:app_id") { fbAppIdContent = metaTags[i].getAttribute("content"); break; } } console.log(fbAppIdContent); swade document.querySelector(

Dynamically adding meta tags using php

孤者浪人 提交于 2019-11-30 19:24:18
问题 In my site I have a list of categories and I have to put meta keywords and description for them.I have a single page where I will retrieve the categories from the database. Can anyone tell me how to make this much simpler to put meta tags for all the categories. Regards, Rekha http://hiox.org 回答1: I'm not sure if this is what you are looking for but... I have a simple script I created to dynamically populate the meta keywords with random keywords taken from an array. Put this in the header of

Smart App Banners; Windows Store app HTML meta tag equivalent for Android/Google Play?

限于喜欢 提交于 2019-11-30 18:56:33
Smart App Banners are a recent addition for iOS devices in iOS 6. It involves the simple addition of a meta tag that when visited with Mobile Safari checks for the existence of an App on the phone and shows options for whether the visitor wants to launch or install the App. <meta name="apple-itunes-app" content="app-id=myAppId, affiliate-data=myAffiliateData, app-argument=myArgs" /> Windows Store app linking works similarly: <meta name="msApplication-ID" content="myAppId" /> <meta name="msApplication-PackageFamilyName" content="myMicrosoftAppBuildPackageName" /> <meta name="msApplication

Is it possible to use a different favicon for browsers that support theme-color?

人盡茶涼 提交于 2019-11-30 18:52:29
Is there a way to set a different favicon for browsers that support theme-color, either via the meta tag or manifest.json? I have a jet black theme bar, but a mostly-black favicon for use on desktop browsers. I'd like to have an alternate white favicon for mobile browsers, but I don't want to make the assumption that mobile browser === theme-color support, as that's not always going to be the case. Desktop favicon example: Mobile favicon example: Generic Answer You can achieve this by using two master images: A dark design, to be used over light tabs, used for favicon.ico and small PNG icons

Cannot get the new AppLinks to work on iOS or Android

こ雲淡風輕ζ 提交于 2019-11-30 11:19:33
问题 Latest Update Below at Update #5 I'm trying to implement AppLinks for BOTH my iOS AND Android apps : http://applinks.org I've done the following: setup a custom url scheme for my app: inacho:// Setup in my App Delegate: - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation Add meta tags to my website at http://www.nachorater.com : <meta property="al:ios:app_store_id" content="581815579"/> <meta property=

Best practice for meta data in a html document?

微笑、不失礼 提交于 2019-11-30 10:52:21
问题 I work on a large scale, high volume, public facing web application. The successful operation of the application is very important to the business, and so there are a number of MI tools that run against it. One of these MI tools essentially looks at the html that is sent to the browser for each page request (I've simplified it quite a lot, but for the purpose of this question, its a tool that does some analysis on the html) For this MI tool to get the data it needs, we put meta data in the

Using a different image for microdata that isn't displayed in the article?

女生的网名这么多〃 提交于 2019-11-30 09:47:18
问题 I'm working on a website that has a bunch of articles. I'm looking to find a way to add an image that is invisible without putting it inside a hidden div. When users add an article, there is a "main" image of the specific proportions that the users upload (which I'd like to use for microdata). There are also other images that get tossed in a carousel that they upload. At the moment the only way I can get the microdata testing tool to use my image is by doing the following: <div class="hidden"