meta-tags

How to extract meta tags from website on android?

别来无恙 提交于 2020-01-05 04:10:09
问题 is there a smart way to read the content of metatags from an URL in android? I'll show a webpage in the webview on android and want to read some informations from the metatag inside. Is the only way to parse the string of the webpage to find the special string "meta name="x-..." content="!!!" or is there any smarter way?? 回答1: A smart way would be using Jericho Library supposing you have an html file like this <html xmlns="http://www.w3.org/1999/xhtml" debug="true"> <head> <meta http-equiv=

meta http-equiv - is it sent as part of an HTTP header, or does the client parse the body for meta tags?

好久不见. 提交于 2020-01-03 13:34:41
问题 Wikipedia seems to imply that <meta http-equiv> in a web page causes the server to update the response header, but that doesn't sound right to me since the server would have to parse the document before it's sent. That would be fugly. But, I'm having trouble finding much on what does happen when when <meta http-equiv> is used. It seems likely to me that the client parses the page and clobbers anything that was sent in the HTTP header if a <meta http-equiv> tag is found conflicts with the

Html 5 WebApp Scalability Meta Tag

本秂侑毒 提交于 2020-01-03 02:46:09
问题 I am currently working on a Html 5 WebApp. The entire app works perfectly fine, with the exception of scalability (Zooming). I have placed the following Meta tag on my WebApp's page, <meta name="viewport" content="user-scalable=yes; width=device-width; height=device-height; initial-scale=1.0;" /> After much research I have come to the conclusion that these Meta tags are primarily for the iPhone version of safari. However, the problem that I am experiencing is, while an iPhone user is on my

Meta refresh and redirect a page?

守給你的承諾、 提交于 2020-01-02 20:17:11
问题 I creates a webpage with a META tag exactly like this : <META http-equiv="refresh" content="5;URL=http://www.google.com"> The problem is that mobile browsers does not support this meta tag, although it does redirect properly in web on every browser. full code of webpage is here : <html> <head> <META http-equiv="refresh" content="5;URL=http://www.google.com"> <script> var URL = "mziiki://app"; var MARKET = "market://details?id=com.spice.mziiki"; var APPLEMARKET = "https://itunes.apple.com/in

Open Graph SMS rich messages on Android and iOS

点点圈 提交于 2020-01-02 05:23:29
问题 I am trying to leverage the rich text messages with open graph meta tags. So I have included my meta tags in my website head and it passes all of the Facebook debug and iOS API validation tool. Yet when I text the link to people either on Android or iOS it doesn't often work. It works typically with Facebook messenger Does anyone know if this is a cell carrier issue or do I have something configured wrong? <meta property="fb:app_id" content="********" /> <meta property="og:type" content=

Facebook open graph meta tags maximum content length

自古美人都是妖i 提交于 2019-12-31 10:19:14
问题 Does anyone know the maximum valid length for each of Facebook's open graph meta tags? The description of the meta tags on http://ogp.me/ does not list maximum lengths, only general descriptions such as "A one to two sentence description of your object" for the og:description meta tag. From what I understand, there is no maximum content length for meta tags in general, just recommendations to keep them under certain lengths for SEO reasons. I'd be curious to know if there is a hard limit and

Facebook open graph meta tags maximum content length

懵懂的女人 提交于 2019-12-31 10:19:05
问题 Does anyone know the maximum valid length for each of Facebook's open graph meta tags? The description of the meta tags on http://ogp.me/ does not list maximum lengths, only general descriptions such as "A one to two sentence description of your object" for the og:description meta tag. From what I understand, there is no maximum content length for meta tags in general, just recommendations to keep them under certain lengths for SEO reasons. I'd be curious to know if there is a hard limit and

Why CSRF token should be in meta tag and in cookie?

纵然是瞬间 提交于 2019-12-31 08:29:29
问题 What's the need of to put CSRF token name and value inside <head> tag using <meta> like: e.g: <meta content="authenticity_token" name="csrf-param" /> <meta content="4sWPhTlJAmt1IcyNq1FCyivsAVhHqjiDCKRXOgOQock=" name="csrf-token" /> I've read about concept to keep CSRF value in cookie but does not find about why to keep inside <head> tag. 回答1: To prevent CSRF you need a value that is submitted with the request that cannot be sent by a malicious site. Authentication cookies are not suitable

Wordpress replace meta description

冷暖自知 提交于 2019-12-30 11:13:53
问题 I need to replace the existing <meta name="description"...> generated by wp_head() function in header.php with a custom meta description. The information in the page is not a regular wordpress post, is taken from an external DB. I was able to add my custom meta but the old one is also there function add_meta_tags() { global $data; if(!is_null($data['metas']['page_meta_description']) ) { echo '<meta name="description" content="'.$data['metas']['page_meta_description'].'">'; } } add_action('wp

Wordpress replace meta description

╄→尐↘猪︶ㄣ 提交于 2019-12-30 11:13:45
问题 I need to replace the existing <meta name="description"...> generated by wp_head() function in header.php with a custom meta description. The information in the page is not a regular wordpress post, is taken from an external DB. I was able to add my custom meta but the old one is also there function add_meta_tags() { global $data; if(!is_null($data['metas']['page_meta_description']) ) { echo '<meta name="description" content="'.$data['metas']['page_meta_description'].'">'; } } add_action('wp