【发布时间】:2015-10-26 18:40:46
【问题描述】:
我有一个在 MVC .net 中开发的应用程序。应用程序中的所有内容都必须针对 SEO 进行优化。我想知道网页上的内容(如标题、元标记)是否通常呈现为静态上下文,Google 可以轻松索引该页面。
但是,如果网站是在 .net MVC 中开发的,其中主要代码从 MVC 动态加载,Google 如何为此类页面编制索引以进行 SEO 和排名。
这是我网站的代码。 一个工作的静态页面(在 MVC 纯静态 HTML 中没有后端/动态内容)
<!doctype html>
<html>
<head>
<title>jQuery Child Filter Selectors</title>
<meta name="Keywords" content="jquery child selectors, jquery first-child selector, jquery last-child,first-of-type,jquery-nth-child,">
<meta name="Description" content="Learn about all the jQuery child selectors with interactive live examples covering jquery first-selector, last-selector, jquery nth-selector and others ">
</head>
<body>
<div class="main-wrapper">
<div class="wrapper">
<ul>
<li><a href="../html/html-home.html">HTML</a></li>
<li><a href="../css-tutorials/css-home.html">CSS</a></li>
<li><a href="../javascript/javascript-home.html">Javascript</a></li>
<li><a href="../jquery/jquery-home.html">jQuery</a></li>
<li><a href="../references/web-references.html">Web References</a></li>
<li><a href="../articles/articles-home.html">Articles</a></li>
</ul>
</div>
<h1>jQuery Child Filter Selectors</h1>
<h1>jQuery first-child Selector</h1>
<div class="alert alert-info">
<p>jQuery <code>first-child</code> selector is used to select all the <code>HTML</code>elements which are the first child of their parent.
</p>
</div>
<b style="font-size:20px;">Syntax</b>
<textarea class="myTextareaCss">
$( ":first-child" )
</textarea>
<div id="footer">
<div class="section section-standout section-slim">
<div class="container">
<div class="row row-gap-huge hidden-xs"></div>
<h4>References</h4>
<p class="caption">
<a href="../references/html-reference.html">HTML References</a>
<br>
<a href="../references/css-reference.html">CSS References</a>
<br>
<a href="../references/javascript-reference.html">JavaScript References</a>
<br>
<a href="../references/jquery-reference.html">jQuery References</a>
<!-- end of the page -->
</body>
</html>
上述静态 HTML 代码已被 Google 完美索引。我的问题是,如果我使用 MVC.net 框架转换相同的代码,Google 是否正确索引了我的页面。
这是我转换后的MVC代码:
注意:转成MVC后所有的(head, body, title标签都会动态加载)
@{
ViewBag.Title = " jQuery Child Filter Selectors";
}
@section AdditionalMeta
{
<meta name="Keywords" content="jquery child selectors, jquery first-child selector, jquery last-child,first-of-type,jquery-nth-child,">
<meta name="Description" content="Learn about all the jQuery child selectors with interactive live examples covering jquery first-selector, last-selector, jquery nth-selector and others ">
}
<div class="main-wrapper">
<div class="wrapper">
<!-- Dynamically load the left menu -->
@Html.Partial("~/Views/CSS/commonLeftMenu.cshtml")
</div>
<h1>jQuery Child Filter Selectors</h1>
<h1>jQuery first-child Selector</h1>
<div class="alert alert-info">
<p>jQuery <code>first-child</code> selector is used to select all the <code>HTML</code>elements which are the first child of their parent.
</p>
</div>
<b style="font-size:20px;">Syntax</b>
<textarea class="myTextareaCss">
$( ":first-child" )
</textarea>
<!-- Dyntamically load the footer -->
@Html.Partial("~/Views/CSS/commonRightMenu.cshtml")
<!-- end of the page -->
以上 MVC 代码是否被 Google 和其他搜索引擎正确索引,如果不是,我可以做些什么来优化我的网站,该网站有 1000 多个与上述类似的网页。
【问题讨论】:
标签: c# html asp.net asp.net-mvc asp.net-mvc-4