大网数据广告活动
网站运营与故障问答

Do errors in Javascript (console errors like reference errors) affect SEO?

· 52CE 我爱测

Suppose I have an error in my console on a couple of pages, like the following: (index):239 Uncaught ReferenceError: incom is not defined at (index):239 at dispatch (jquery.min.js?ver=1.8.3:2) at u (jquery.min.js?ver=1.8.3:2) Doe…

问题原文

原帖链接 · Siyah · CC BY-SA 4.0

Suppose I have an error in my console on a couple of pages, like the following:

(index):239 Uncaught ReferenceError: incom is not defined
    at (index):239
    at dispatch (jquery.min.js?ver=1.8.3:2)
    at u (jquery.min.js?ver=1.8.3:2)

Does this, in any way, affect SEO or can I safely ignore it?

已采纳解答

原帖链接 · Anuvesh · CC BY-SA 4.0

If any error or improper implementation of Javascript(in any form) is affecting the crawlability or preventing crawlers from fetching content, it can affect SEO in a drastic way.

If this error affects any of the processes, the crawlers may not favour your website over others.

Even after fixing errors, there should be some things to be kept in mind while implementing Javascript.

Do not use Javascript’s onclick events as a replacement for internal linking. Instead, use regular anchor tags within the HTML or the DOM.

Unblock Javascript. When Javascript is blocked, search engines won't receive your site’s full experience. This means that the search engine could not see what the end-users are seeing on your site, and can even lead to search engines interpreting it as cloaking.

Use Fetch as Google to see how are the pages read by robots.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-11-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。