Since we are diving into SEO guidelines the past weeks we came across a question for which we didn't find a satisfying answer. (We simply didn't agree on this topic). We would like more opinions on this.
Since many projects use jQuery and Bootstrap lately, anchor tags often get used like
<a href="#" class="btn btn-add-to-cart" data-item="65464823">Add to cart</a>
As SE spiders follow all links they would end up following all these internal links (note the #) which can't be good for the ranking.
Some of us thought it would be a good idea to add the
rel="nofollow" attribute to these kind of links to prevent spiders from following these links. Others said this would prevent the current page (targeted by the #) to be indexed properly.
It could be an idea to replace all these 'placeholder
<button>'s but (using Bootstrap) sometimes they exist next to real links and a small difference will be visible due to browser rendering issues with some elements. (especially when using btn-group)
In the Bootstrap manual we found:
<a>elements are used to act as buttons – triggering in-page functionality, rather than navigating to another document or section within the current page – they should also be given an appropriate
But will SE spiders take this
role attribute in account?
We are, as always, curious about how other developers tackle this issue.
We've seen these (and others) articles already