C# ASP.NET SQL SERVER

Testing a site for nofollow links with jQuery

I'm working on a site at the moment and a number of the links on the pages do not need to be followed by the search engine (or other) spiders and do not need to be indexed. These links I set with the nofollow value on the rel attribute in the anchor tag follows:

<a href="some-link-goes-here" rel="nofollow">link text</a>

Some of the pages have plenty of links and I'm never sure if I've marked all of them correctly but I would know if I could color the already marked ones. This is easily achieved with jQuery. I open up the page in FireFox and then open the Firebug Console panel and in there I type:

$('[rel=nofollow]').attr('style', 'color:Fuchsia')

This will cause all of the links on the page with the rel attribute set to nofollow to be colored pink. You can then easily perform a visual check to see if you've caught them all.

(It will actually cause any text inside any tag with a rel attribute set to nofollow to be colored pink but I believe that the only recognized tag that rel is used with is the anchor tag.

» Similar Posts

  1. AZGroups Forward/Back Button History and jQuery
  2. Optimizing CSS in ASP.NET MVC
  3. Automatically keeping CSS file current on any web page

» Trackbacks & Pingbacks

    No trackbacks yet.
Trackback link for this post:
http://guyellisrocks.com/trackback.ashx?id=182

» Comments

  1. Mark Farina, Jr. avatar

    That's a handy idea :).

    Mark Farina, Jr. — September 30, 2009 1:23 PM

» Leave a Comment