1

好的,关于stackoverflow的第一个问题!

我有点进退两难,我最近创建了一个电子商务网站,并将其设置为使用 AJAX 很好地加载所有内容,以提高速度、UX 和 UI。然而,搜索引擎(谷歌)似乎没有为内容编制索引。做一些研究,返回的流行答案/修复是在此处实施 Google 指南:https ://developers.google.com/webmasters/ajax-crawling/

长话短说,我真的不想在整个网站上使用“hash bangs”,我目前使用的 URL 简单而干净,并用 #! 就是不好看!在我开始走这条路之前,有没有其他选择?我目前在类别页面上使用 history.pushState,但我需要一些主要用于产品详细信息页面的东西,不涉及更改 URL。

这是加载产品详细信息的当前设置:

$(document).ready(function(){
    LoadContent();
});

function LoadContent() {
     Services.Content.GetProduct(productid, OnSuccess, OnFailure);
}
function OnSuccess(result) {
     $('#ContentLoading').css("display", "none");
     $('#Content').hide();
     $('#Content').html(result);
     $('#Content').delay(200).fadeIn();
}
4

0 回答 0