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'shref
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.
精彩评论