开发者

Does it affect site performance and SEO to use onclick handler instead of links? [closed]

开发者 https://www.devze.com 2023-04-08 04:34 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_Python百科 Closed 11 years ago.

To call new windows, JavaScript functions and other internal stuff I've been using onclick along with cursor: pointer rather than using links with JavaScript in the href attribute. This prevents # from appearing in the URL in the status bar.

When linking to other pages I use normals hrefs with a friendly URL.

My Questions

  • Does using onclick instead of JavaScript in a link's href affect performance?

  • Does it affect search engine rankings?


To start off, it's a bad idea to practice this, because users who have disabled JavaScript cannot navigate at your site any more (NoScript).

That aside, it's not possible to rightclick, and bookmark/open the page in a new window.

If you don't want these "internal pages" to be indexed, add rel="nofollow" to your links.

0

精彩评论

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