: How to make Google ignore an element on a page (without using HTML comments)? I would like to make Google ignore a div containing functional buttons and action titles, which I've seem come
I would like to make Google ignore a div containing functional buttons and action titles, which I've seem come up in search engine results.
Now I know about <!-- googleoff: index --> tags, however, I can't use them because all pages are compressed (comments, whitespaces removed) before they're output.
Is there any alternative? Perhaps there is a Microdata solution to show that the div does not contain information about an entity (product in this case, button are "Add to Cart", etc.).
More posts by @Samaraweera270
2 Comments
Sorted by latest first Latest Oldest Best
Or another way is to create a empty div tag and populate the content of the div via javascript/jquery.
document.getElementbyid('divid').innerhtml.value = "bla bla bla"
The code's syntax may not be correct but the idea will work. Bots dont pick JavaScript dynamic values. You can call a function on page load and use the above code to populate your
Bascially, such a will be empty when you 'view source' the page.
First on: googleoff works only in google custom search appliance.
for your goal there are only pretty limited possibilities:
instead of div you can put your content from the div into an image (button as an imagemap link)
another way is to encode the content with base64 and to hide then the decoding javascript from Google
you can load the div content from an external file with an iframe. The external file should be noindex-ed.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.