开发者

For SEO purposes, what are the pros/cons of defining page titles client side vs server side?

Programmatically, which is better for SEO purposes: defining web page titles client side (e.g., via Javascript that executes before the closing body tag) or server side (e.g., dynamically generating the title bas开发者_运维知识库ed on page content before sending the whole page to the client)?

Thanks!


As a simple rule - if it's done client-side then it simply doesn't exist as far as SEO is concerned.

That said, there's really no need to be setting such things client-side via JavaScript unless you're substantially changing the page content dynamically and even then the change in title isn't guaranteed to work on all browsers, may negatively affect the end user experience, etc.


It is entirely worthless to use JavaScript to define your page titles. Most web-crawlers do not download the javascript, and certainly don't run it. The source of the page is pretty much everything a web crawler sees.

Client Side -> Pros: You get to use JavaScript. Cons: Ruins your SEO

Server Side -> Pros: Actually read by search engines. Cons: You don't get to use JavaScript.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜