<p>How do I preview a url using ajax? I have seen this done with search engine plug ins and would like to learn how to do this. Specifically, I would like to be able to mouse over a link and see the preview of the webpage using ajax.</p>

[{'answer_id': 80346, 'author': 'Patrick McKenzie', 'author_id': 15046, 'author_profile': 'https://Stackoverflow.com/users/15046', 'pm_score': 3, 'selected': True, 'text': '<p>There\'s the <strong>easy</strong> solution, the <strong>hard</strong> solution, and the <strong>use-a-library</strong> solution.</p>\n\n<p><strong>use-a-library</strong> : I prefer always doing the use-a-library solution unless you have a darn good reason otherwise.  One possible site which wraps the "hard solution" as a service for you: <a href="http://thumbnails.iwebtool.com/demo/" rel="nofollow noreferrer">http://thumbnails.iwebtool.com/demo/</a></p>\n\n<p><strong>easy</strong>: The easy solution is to just load the target webpage as a downscaled AJAXy window.  You can use many of the Lightbox-class plugins for this task, particularly the ones which allow you to target arbitrary HTTP content for the Lightbox window.  <a href="http://www.orangoo.com/labs/GreyBox/" rel="nofollow noreferrer">GreyBox</a> is my favorite of those which I have used before.  <a href="http://particletree.com/features/lightbox-gone-wild/" rel="nofollow noreferrer">Lightbox Gone Wild</a> is also nice.</p>\n\n<p><strong>hard</strong>: Then there is the hard solution: you need to render the web page server side, cache the rendering as an image, and then serve up that image using Lightbox-esque Javascript (which is trivial next to the other requirements).  How you would go about doing this is outside the scope of this box.  Why would you do it this way?  The preview generates MUCH faster for the client, and it hermetically seals the client\'s session away from things which might bust it in the target website -- poorly behaving Javascript and/or malware can cause Really Bad Things when you open them, even in an AJAXy window-within-a-window.</p>\n'}, {'answer_id': 80355, 'author': 'Christopher Mahan', 'author_id': 479, 'author_profile': 'https://Stackoverflow.com/users/479', 'pm_score': 0, 'selected': False, 'text': '<p>I think I know what he\'s driving at. What happens is that he wants a windows to appear on hover over a hyperlink (javascript), and for that windows to display a snapshot image of the website being referenced by the hyperlink.</p>\n\n<p>The ajax part connects to the server where you are hosting your site, asynchronously, and hits a page that goes and fetches an image of the site to display in a img tag.</p>\n\n<p>Now, how does one generate the image of the site? I would suggest that this is done in advance (for example as the content is being created) and that already-generated image is recalled. </p>\n\n<p>How to generate the images to begin with? I think that would be another question: "How to generate snapshot images of websites?"</p>\n'}]
['https://Stackoverflow.com/questions/80313', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/15059/']