2

search query results of Google are accompanied by a screenshot of the target web page with the relevant regions highlighted . The screenshot is not an image fetched but rather a canvas element. I was curious if the screenshot was generated on the client side and if so, how to implement a similar functionality ... a bare bones example would be really helpful.

lorefnon
  • 12,875
  • 6
  • 61
  • 93
  • possible duplicate of [How to screenshot website in JavaScript client-side / how Google did it? (no need to access HDD)](http://stackoverflow.com/questions/5621907/how-to-screenshot-website-in-javascript-client-side-how-google-did-it-no-nee) – Felix Kling Feb 21 '12 at 10:22
  • 1
    You cannot make "screenshots" of external web site from the client as you cannot access them (same origin policy). – Felix Kling Feb 21 '12 at 10:23

1 Answers1

1

If you try to sniff the traffic using, say, Firebug's Net Panel, you will see that images are apparently generated on the server side and served as part of JSON response in form of base64 string

Here is related Stackoverflow question: Website screenshots using PHP

Community
  • 1
  • 1
Evgeny
  • 6,261
  • 8
  • 35
  • 43