html - 元标记未在 Google 上更新

标签 html ruby-on-rails google-chrome seo meta-tags

<分区>

我正在开发部署在 heroku 上的 Rails 应用程序。我在我的 application.html.erb 文件的 head 标签内放置了一个元标签,但它在 Google 上还没有改变。我已经等了5天多了。 Google 仍在显示从我的主页上截取的文本。

还有两个其他元标记似乎是自动生成的,如下面的页面源代码摘录所示(即 csrf-param 和 csrf-token)。这些会影响 Google 上的元描述吗?

以下是相关文件的摘录:

application.html.erb 中的标签摘录:

<title><%= full_title(yield(:title)) %></title>
<%= stylesheet_link_tag    "application", media: "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
<%= render 'layouts/shim' %>
<meta name="App Name" content="App description.">

sitemap.xml 的摘录

<lastmod>2013-08-12T18:29:06+00:00</lastmod>
<changefreq>daily</changefreq>

Google Chrome 页面源代码摘录:

<html>
  <head>
<title>App Name</title>
    <link href="/assets/application-f915aa342a5dbd5b43771fda8cc.css" media="all" rel="stylesheet" type="text/css" />
    <script src="/assets/application-6f2b9741258790f721edcb490ef.js" type="text/javascript"></script>
    <meta content="authenticity_token" name="csrf-param" />
    <meta content="DCzmx+4h+r3wNv5sMTwS7U5X7u/RizzttU4U9+23DgY=" name="csrf-token" />
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <meta name="App Name" content="App description.">
</head>

最佳答案

使用

<meta name="Description" content="App description.">

代替“应用名称”

Google 会将“描述”元标记编入索引:

https://support.google.com/webmasters/answer/79812?hl=en

关于html - 元标记未在 Google 上更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18475006/

相关文章:

ruby-on-rails - 链接到最后一篇文章 - rails

javascript - chrome javascript事件处理问题

Android Chrome 的背景属性表现不佳

html - CSS 后处理器将文件分成两半

php - 用 PHP 显示特定的 block 大小

javascript - Bootstrap 选项卡需要点击两次才能在 iPhone 上使用 Meteor 进行更改

html - 主要浏览器的嵌套表格限制是多少?

ruby-on-rails - 如果参数为空,则 Text_field_tag 默认值?

ruby-on-rails - 如何更改 Rails 中 Active Record 的默认时区?

javascript - window.webkitNotifications.createNotification - 错误