Take the 2-minute tour ×

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.

share|improve this question
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
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer


