Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I get rendering HTML from JS, handling timeouts, even infinite scroll. But how in the world are they handling onMouseOver, and other mouse events? My best guess so far is reversing the code from the document.location events.


I think you are misunderstanding how this works. Google isn't "handling" any events at all, your webpage is. Google is instead the source of those events - it is simulating the role of a user.

So the bot loads your webpage into a headless browser and sends it a series of events to simulate a user interacting with it, and waits for navigation requests.

There is probably a whitelist of simulation behaviors:

  * mouseover, then click each <a> node
  * mouseover every pixel
  * mouseover, then change every <select> node
  * mouseover, then click every <button>
  etc...
Caveat: though I worked at Google when this work was being done, I was on a different team and don't have any inside knowledge - just speculating on an approach that would make sense.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: