admin管理员组文章数量:1415145
I have seen many websites includes apple and most of asp sites uses
<a onclick='s_objectID="";return this.s_oc?this.s_oc(e):true'></a>
kind of links. i.e. no href on a tag. and link embedded to onclick event.
what are the reasons for that ? analytics ?
How does it affect on seo ?
I have seen many websites includes apple and most of asp sites uses
<a onclick='s_objectID="http://www.apple./mac/_2";return this.s_oc?this.s_oc(e):true'></a>
kind of links. i.e. no href on a tag. and link embedded to onclick event.
what are the reasons for that ? analytics ?
How does it affect on seo ?
Share Improve this question asked Jul 7, 2010 at 5:23 iamgopaliamgopal 9,1526 gold badges40 silver badges54 bronze badges4 Answers
Reset to default 7This is most likely analytics tracking code used by Adobe SiteCatalyst (formerly Omniture). Check to see if the page contains a script called s_code.js or something similar. If you search the minified code, you will see that it utilizes s_oc.
Well in ASP.NET the links that have onclick
only defined are LinkButton
s - a specially formulated link that causes a postback. I'm not a big fan of it purely for the reason that it creates nasty inline JS. I'm not sure for what purpose Apple uses the links you mentioned.
As for SEO - it all depends on the engine, I know Google do follow some javascript links but not all engines do. In general its best practice (and not only for SEO) to not put inline JavaScript into your links (or any other elements). It is not accessible, it makes your site harder to maintain and its just ugly.
Some websites will use this technique for analytics. Also, sometimes people will use it to hide the URL when people hover over the link or to customize where the URL goes. Also, it can be used to send extra data along with the URL (ie. the contents of a form). However, this is terrible for search engines when they are crawling your page because they can't figure out where the URL points to and they can't index it.
There is some kind of operation in this link. If you loook at the code
return this.s_oc?this.s_oc(e):true
it is enabling and disabling the link. if condition s_oc true, then the link works else link not works. THis will help there own analytic purpose.
btw, in SEO aspect. href is the best visible to Search Engines. As because OnClick execute as Javascript function, Search Engines will not process this.
本文标签: seojavascript onclick based linksStack Overflow
版权声明:本文标题:seo - javascript onclick based links? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745218171a2648267.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论