Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 谷歌如何索引后端.NETMVC代码进行SEO优化?_C#_Html_Asp.net_Asp.net Mvc_Asp.net Mvc 4 - Fatal编程技术网

C# 谷歌如何索引后端.NETMVC代码进行SEO优化?

C# 谷歌如何索引后端.NETMVC代码进行SEO优化?,c#,html,asp.net,asp.net-mvc,asp.net-mvc-4,C#,Html,Asp.net,Asp.net Mvc,Asp.net Mvc 4,我有一个在MVC.net中开发的应用程序。应用程序中的所有内容都必须针对SEO进行优化。我想知道网页上的内容(如标题、元标记)是否通常呈现为静态上下文,谷歌可以很容易地索引该页面 但是,如果网站是在.NETMVC中开发的,其中主代码从MVC动态加载,那么Google如何为这些页面编制SEO和排名索引呢 这是我网站的代码工作静态页面(MVC纯静态HTML中没有后端/动态内容) 上面的静态HTML代码完全由Google索引。我的问题是,如果我使用MVC.net框架转换相同的代码,Google是否会正

我有一个在MVC.net中开发的应用程序。应用程序中的所有内容都必须针对SEO进行优化。我想知道网页上的内容(如标题、元标记)是否通常呈现为静态上下文,谷歌可以很容易地索引该页面

但是,如果网站是在.NETMVC中开发的,其中主代码从MVC动态加载,那么Google如何为这些页面编制SEO和排名索引呢

这是我网站的代码工作静态页面(MVC纯静态HTML中没有后端/动态内容)

上面的静态HTML代码完全由Google索引。我的问题是,如果我使用MVC.net框架转换相同的代码,Google是否会正确索引我的页面

下面是我转换后的MVC代码:

注意:转换为MVC后,所有(头、体、标题标签将动态加载)


上面的MVC代码是否被谷歌和其他搜索引擎正确索引?如果没有,我可以做些什么来优化我的网站,它有1000多个类似于上面的网页。

谷歌机器人没有看到任何区别

它将请求该页面并返回生成的HTML代码,因此它不关心它是静态页面还是生成页面。它永远不会看到服务器代码,只看到运行代码的结果


当你请求一个页面时,甚至不可能确切地说出区别。通常生成的页面具有与静态页面不同的文件扩展名(例如,
.aspx
而不是
.html
),但是生成的页面也可以与静态页面具有相同的文件扩展名。

谷歌机器人没有看到任何区别

它将请求该页面并返回生成的HTML代码,因此它不关心它是静态页面还是生成页面。它永远不会看到服务器代码,只看到运行代码的结果


当你请求一个页面时,甚至不可能确切地说出区别。通常生成的页面具有与静态页面不同的文件扩展名(例如,
.aspx
而不是
.html
),但生成的页面也可以与静态页面具有相同的文件扩展名。

您似乎对MVC和Razor的工作方式有着彻底的误解。谷歌看到的是生成的HTML,而不是你的Razor标记。Razor在服务器端解析,生成HTML

查看它生成的HTML,确保它与当前HTML大致相同

不要用“动态”,这是个时髦词。编程中的一切都是动态的。你不是在“动态加载”任何东西,你是在渲染一个部分。这发生在服务器端,对生成的HTML没有影响


现在,当您使用AJAX加载内容时,情况就不同了。

您似乎对MVC和Razor的工作原理有着彻底的误解。谷歌看到的是生成的HTML,而不是你的Razor标记。Razor在服务器端解析,生成HTML

查看它生成的HTML,确保它与当前HTML大致相同

不要用“动态”,这是个时髦词。编程中的一切都是动态的。你不是在“动态加载”任何东西,你是在渲染一个部分。这发生在服务器端,对生成的HTML没有影响

现在,当您使用AJAX加载内容时,情况就不同了

<!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>
@{

    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 -->