2007/12/10 13:03:23
|
---|
|
usage of rel="external nofollow"I added the js for allowing rel="external", rel="nofollow" & rel="external nofollow" in a href tags to the core earlier in reboot.
I think it would be ideal to replace all occurences of target="_blank" in the core. but (yeah there's always a but) lol does anyone have any suggestions or advice on exactly which rel value to use in certain places? for example: rel="external" will act exactly like target="_blank" and open the link in a new window, web crawlers and search engine bots will also then follow that link and score it. rel="nofollow" will open the link in the same window, but tells the crawlers and bots to not follow the link and/or score the link either. rel="external nofollow" will do a combination of the above, the link will open in a new window but crawlers & bots are told not to follow/score the link/destination etc. so where should each be used properly? when should a bot be told not to score the link/destination & when is it acceptable for the bot to score it? |
2007/12/10 13:16:22
|
---|
|
Re: usage of rel="external nofollow"I'll look into this, as this is a webstandards issue. Thanks for proviing the quick and easy solution at the start It makes it easier
Herko |
_________________
Tomorrow never comes until it's too late |
2007/12/10 15:51:51
|
---|
|
Re: usage of rel="external nofollow"rel="nofollow" will be interpreted by Google as a paid link. Also, rel=nofollow does not pass PR.
See: Use rel=nofollow Only When Needed for my views on rel=nofollow rel=external is a different story. I know there is the relationship defined by the XFN and microformats, but we need to also look at the SEO implications. |
_________________
JMorris (aka James Morris) ImpressCMS Professional Services: INBOX International inc. James Morris Online | Frolicking on the playground that is the Internet... |
2007/12/11 9:55:55
|
---|
|
Re: usage of rel="external nofollow"Basically, if we want to hold ourselves to the highest standards, we should aim for xhtml 1.1 strict compliance. This should be done to ensure that the core is as advanced as possible, so it's not a barrier for people who want the system to validate and work properly in high end environments.
What does this mean for the way we deal with links that need to open in a new window? Kevin Yank explains it well in a sitepoint article: Quote:
He proposes to use rel="external", which is a non-standard value for the rel attribute. This means then that browsers will interpret the rel value as something to act any different on then any other link. This is where the javascript comes in. He proposes to use the following script to evaluate the contents to all a tags for the rel value of "external", and assign an anchor target of "_blank" to those. The code looks like this: function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; } } window.onload = externalLinks; This code can be put in an external .js file and loaded on each page to reduce load times. Jesse Skinner writes a post on The Future of the Web about this issue, and uses a similar script that evaluates a specific class name in stead of a rel value. The added advantage of this method is that you can then use jQuery to easily create the snippet of code to deal with external links: $(function(){ $('a.new-window').click(function(){ window.open(this.href); return false; }); }); The rel attribute is meant to define a relation between an anchor and its hyper reference. Using it to enable links opening in a new window isn't what it is meant for. So my advice on this issue would be to use the specific class name, and the jQuery snippet to open them in a new window. Herko |
2007/12/11 11:57:52
|
---|
|
Re: usage of rel="external nofollow"Excellent Herko!
Just to add to Herko's points, don't forget that more than 1 class can be assigned to any element, like... <a href="#" class="sidebar external">link</a> I too think we should strive for XTHML 1.1 Strict compliance. Beyond that, I also think we need to strive for WAI Level A and Section 508 compliance, at the bare minimum. I know some of us who are more concerned with presentation than standards. What I have been learning over the last year is that you do not have to make that compromise. If we all work together, we can achieve both standards compliance AND rich presentation. |
_________________
JMorris (aka James Morris) ImpressCMS Professional Services: INBOX International inc. James Morris Online | Frolicking on the playground that is the Internet... |