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?


1 Answer 1


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.

  • Thank you for answer
    – P.Works
    Commented Apr 23, 2020 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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