1

Many robots, especially Googlebot, can read content written by JavaScript on sites.

There are some methods developed especially for site speed. At the beginning of these, do some operations after the window.load event.

window.addEventListener('load', fn);

If we do some actions that will change the integrity (content) of the site with these triggering events. Just as below;

window.addEventListener('load', fn);
var fn = function(){
 $.ajax({ url: 'localhost/dummy.txt', success: function(data) { 
   element.innerHTML = data;
 } });
}

An element with an empty content gained new content after the window.load event.

Can robots visiting this site detect this content?

0

Yes, it can read it.

Easy and quick way to be 100% sure is use the URL Inspection Tool > Live Test on Google Search Console. You can see the final HTML and screenshot there.

| improve this answer | |
  • Thank you for answer – P.Works Apr 23 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.