M
M
MaksimUl2018-02-01 17:30:57
JavaScript
MaksimUl, 2018-02-01 17:30:57

How to close a link from indexing? Who thinks about this option?

Hello! I want to close the link from indexing using js. The script changes the "supposedly" link code on the html page to a normal link after the document is fully loaded.
Everything works, the tag is replaced by How do search engines treat you?<span></span><a></a>

<span class="hidden-link" data-link="cart.html"><span id="total-cart-count" class="badge"></span></span>

$('.hidden-link').replaceWith(function(){
    return'<a href="'+$(this).data('link')+'">'+$(this).html()+'</a>';
})

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel, 2018-02-01
@MaximUl

What <noindex></noindex>'s not to like?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question