SEO影响通过Javascript更改标题标记 [英] SEO affected Changing Title Tag by Javascript

查看:102
本文介绍了SEO影响通过Javascript更改标题标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对这个问题有疑问,我们说我的页面加载

I am having a doubt regarding to this issue where let's say my page load is

<title>Test Only</title>

我使用javascript更改

and I change the value by using javascript to

<title>Test Use JS Change</title>

// this is my Javascript code to update the <title> value after page load
$(function(){
    $('title').html('Test Use JS Change');
});

我知道搜索引擎机器人,他们会认出我的标题是测试使用JS更改只测试

May I know for Search Engine Bot, will they recognize my title as Test Use JS Change or Test Only

这是因为当我看到浏览器标签/检查元素来查看动态来源时,标题已被删除更新但当我纯粹只查看源代码时,它会显示我定义的默认标题。

It is because when I see the browser tab/ inspect element to view dynamic source, the title has been updated but when I purely view source only, it shows the default title that I defined.

需要一些有关此问题的建议。谢谢!

Would need some advise regarding to this. Thanks!

推荐答案

您可以使用JavaScript。包括Google在内的一些机器人会为了SEO的利益执行JavaScript(在SERP中显示正确的标题)。

You can use JavaScript. Some bots, including Google, will execute the JavaScript for the benefit of SEO (showing the correct title in the SERP).

document.title = "Google will run this JS and show the title in the search results!";

显示正面结果的文章:
http://www.aukseo.co.uk/use-javascript-to-generate- seo-friendly-title-tags-1275 /
http ://www.ifinity.com.au/2012/10/04/Changing_a_Page_Title_with_Javascript_to_update_a_Google_SERP_Entry

Articles showing positive results: http://www.aukseo.co.uk/use-javascript-to-generate-seo-friendly-title-tags-1275/ http://www.ifinity.com.au/2012/10/04/Changing_a_Page_Title_with_Javascript_to_update_a_Google_SERP_Entry

不要总是假设机器人不会执行JavaScript。 http://searchengineland.com/tested-googlebot-crawls-javascript-heres -learned-220157

Don't always assume a bot won't execute JavaScript. http://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157

Google和其他搜索引擎知道索引的最佳结果是实际最终用户将在其浏览器中看到的结果,包括JavaScript。

Google and other search engines know that the best results to index are the results that the actual end user will see in their browser, including JavaScript.

这篇关于SEO影响通过Javascript更改标题标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆