常常會在一些國外網站的head中看到以下代碼:javascript
<meta property="fb:app_id" content="192271934223559"/>
<meta property="og:image" content="http://www.piccsy.com/investors/apple-touch-icon-114x114-precomposed.png"/> <meta property="og:title" content="Piccsy Investor Pitchdeck"/> <meta property="og:type" content="website"/> <meta property="og:url" content="http://www.piccsy.com/investors"/> <meta property="og:description" content="Detailed information about Piccsy for investors."/>
不理解Meta Property=og標籤是什麼意思,以及對SEO的影響,看一下下面的介紹。
Meta Property=og標籤是什麼呢?php
og是一種新的HTTP頭部標記,即Open Graph Protocol:css
The Open Graph Protocol enables any web page to become a rich object in a social graph.html
即這種協議可讓網頁成爲一個「富媒體對象」。
用了Meta Property=og標籤,就是你贊成了網頁內容能夠被其餘社會化網站引用等,目前這種協議被SNS網站如Fackbook、renren採用。
SNS已經成爲網絡上的一大熱門應用,優質的內容經過分享在好友間迅速傳播。爲了提升站外內容的傳播效率,2010年F8會議上Facebook公佈了一套開放內容協議(Open Graph Protocol),任何網頁只要遵照該協議,SNS就能從頁面上提取最有效的信息並呈現給用戶。java
Open Graph Protocol應用指南:
參與到Open Graph Protocol的好處.
● 可以正確的分享您的內容到SNS網站2
● 幫助您的內容更有效的在SNS網絡中傳播
Meta Property標籤的應用
● 按照您網頁的類型,在<head>中添加入meta標籤,並填上相應的內容
● 若是一個頁面上有多個須要標識出的內容怎麼辦?web
您能夠重複meta標籤,將認爲og:type 標籤是每一段內容的起始處,例如:segmentfault
<meta property="og:type" content="video"/>網絡
<meta property="og:title" content="五月天_忽然好想你MV現場版"/>
<meta property="og:image" content="http://g1.ykimg.com/0100641F464AC21FF0B3ED00F48F151F43D4BF-5F0F-BD39-76EA-E5E20A1887C4"/>
<meta property="og:url" content="http://v.youku.com/v_show/id_XMTIyMTY5NzMy.html"/>
<meta property="og:videosrc" content="http://player.youku.com/player.php/sid/XMTIyMTY5NzMy&isAutoPlay=true/v.swf"/>app
<meta property="og:width" content="500″ />ide
<meta property="og:height" content="416″ />
<meta property="og:type" content="video"/>
<meta property="og:title" content="五月天_忽然好想你MV現場版_AA"/>
<meta property="og:image" content="http://g1.ykimg.com/0100641F464AC21FF0B3ED00F48F151F43D4BF-5F0F-BD39-76EA-E5E20A1887C44444"/>
<meta property="og:url" content="http://v.youku.com/v_show/id_XMTIyMTY5NzMyyyyyyyyyyyyyyyy.html"/>
<meta property="og:videosrc" content="http://player.youku.com/player.php/sid/XXXXXXXXXXXXMTIyMTY5NzMy&isAutoPlay=true/y.swf"/>
<meta property="og:width" content="600" />
<meta property="og:height" content="716"/>
使用Open Graph Protocol應注意
meta property=og代碼的功能並不等同於網頁的meta name標籤,二者針對的對象不一致,功能不一樣。0 D$ P) m, [. d
+ d' K! e2 \# w
若是網站上要使用Open Graph Protocol,那麼,meta property=og和meta name、Title標籤應同時賦值。
+ ^# k- c6 Z4 n( e4 l
文章開頭舉例的B2C網站,<head>以下:
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Cool Gadgets at the Right Price - Worldwide Free Shipping - ******</title>
<meta property="og:title" content="**’sFacebook" />
<meta property="og:type" content="product"/>
<meta property="og:url" content="http://www.******.com" />
<meta property="og:image" content="http://www.******.com/logo.gif"/>
<meta property="og:site_name" content="******.COM" />
<meta property="og:description" content="CoolGadgets at the RightPrice - Worldwide Free Shipping - ******"/>
<meta property="fb:admins" content="100001422224225" />
<meta property="fb:page_id" content="241333394220"/>
<link href="/css/reset.css" rel="stylesheet"type="text/css" />
<link href="/css/default/all.16666.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/shop.js"></script>
<script type="text/javascript" src="/scripts/all.16666.build.js"></script>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="description" content="Online shopping for cool gadgets at the right price. " />
<meta name="keywords" content="cool gadgets, cheap gadgets, free shipping" />
</head>
若是你用上了Meta Property標籤,你得在後臺設置好,否則,就是空白.
Open Graph Protocol對SEO的影響
有些人使用所謂的網站質量在線檢測,檢測後結果提示Meta Property=og這段代碼有問題,特別是一些SEO的檢測,更是提示「特別錯誤」!而後刪除Meta Property=og代碼,檢測正常。
所以擔憂Meta Property=og這段代碼會對網站照成不良影響
其實Open Graph Protocol並不會對SEO照成不良影響,相反,應用的合理,很是有利於網站的推廣。