SEO 是否读取从 AJAX 加载的数据?
Does SEO read the data loaded from AJAX?
我用 Ajax 加载了标题、描述和关键字,加载程序后,数据是用 php 从我的数据库加载的。问题是,SEO 是否从我的代码中读取了标题、描述和关键字?
这是我加载头部元素的 JS 函数
function addHead(page)
{
$.ajax({
url:"php/content_head.php",
type:"POST",
data:"page="+page,
success: function(reponse){
result = JSON.parse(reponse);
$("title").text(result["Title"]);
var headL = document.getElementById("head");
headL.innerHTML+='<meta name="description" content="'+result["Desc"]+'">';
headL.innerHTML+='<meta name="keywords" content="'+result["Keywords"]+'">';
headL.innerHTML+='<meta name="author" content="Softmagazin">';
}
});
}
这是 PHP 数据
<?php
include "connect.php";
include "config.php";
include "functions.php";
$data = array();
$page = $_POST["page"];
$tabel = $GLOBALS['tabel_pagini'];
$sql = "SELECT * FROM $tabel WHERE Pagina = '$page'";
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$data["Title"] = $row["Titlu"];
$data["Desc"] = $row["Descriere"];
$data["Keywords"] = $row["CuvinteCheie"];
echo json_encode($data);
?>
虽然过去是这样,但 Google 的机器人最近变得很多 'smarter'。他们的抓取工具应该能够很好地看到您的页面。如果您仍然担心或只想亲自看看,请尝试下载 Lynx 并查看您的页面呈现方式。
来自 Google 网站管理员帮助站点 Crawling and Indexing FAQ:
Q: My website uses pages made with PHP, ASP, CGI, JSP, CFM, etc. Will these still get indexed?
A: Yes! Provided these technologies serve pages that are visible in a browser, Googlebot will generally be able to crawl, index and rank them without problems. We have no preference, they're all equivalent in terms of crawling, indexing and ranking as long as we can crawl them. One way to double-check how a search engine crawler might see your page is to use a text-only browser such as Lynx to view your pages.
我用 Ajax 加载了标题、描述和关键字,加载程序后,数据是用 php 从我的数据库加载的。问题是,SEO 是否从我的代码中读取了标题、描述和关键字?
这是我加载头部元素的 JS 函数
function addHead(page)
{
$.ajax({
url:"php/content_head.php",
type:"POST",
data:"page="+page,
success: function(reponse){
result = JSON.parse(reponse);
$("title").text(result["Title"]);
var headL = document.getElementById("head");
headL.innerHTML+='<meta name="description" content="'+result["Desc"]+'">';
headL.innerHTML+='<meta name="keywords" content="'+result["Keywords"]+'">';
headL.innerHTML+='<meta name="author" content="Softmagazin">';
}
});
}
这是 PHP 数据
<?php
include "connect.php";
include "config.php";
include "functions.php";
$data = array();
$page = $_POST["page"];
$tabel = $GLOBALS['tabel_pagini'];
$sql = "SELECT * FROM $tabel WHERE Pagina = '$page'";
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$data["Title"] = $row["Titlu"];
$data["Desc"] = $row["Descriere"];
$data["Keywords"] = $row["CuvinteCheie"];
echo json_encode($data);
?>
虽然过去是这样,但 Google 的机器人最近变得很多 'smarter'。他们的抓取工具应该能够很好地看到您的页面。如果您仍然担心或只想亲自看看,请尝试下载 Lynx 并查看您的页面呈现方式。
来自 Google 网站管理员帮助站点 Crawling and Indexing FAQ:
Q: My website uses pages made with PHP, ASP, CGI, JSP, CFM, etc. Will these still get indexed?
A: Yes! Provided these technologies serve pages that are visible in a browser, Googlebot will generally be able to crawl, index and rank them without problems. We have no preference, they're all equivalent in terms of crawling, indexing and ranking as long as we can crawl them. One way to double-check how a search engine crawler might see your page is to use a text-only browser such as Lynx to view your pages.