I need to prevent robots from indexing specific word on my webpage.
Here is what I did:
Let's say I need to prevent JOHN GALLOW
from being indexed. For that purpose, I wrote this pararaph: Over the course of its first five years, JJJ was successful enough in providing shoes for children in need
Then I added this jQuery code to the page:
$("div.paragraph").each(function() {
var text = $(this).text();
newText = text.replace("JJJ", "JOHN GALLOW");
if (text !== newText)
$(this).text(newText);
});
That way, the right word will be injected at runtime.
Technically it works but I would like to know if this will be a good way for preventing robots from indexing.