Amazon Ajax Book Reader

A while back I dissected Google Print – a hack which I was chuffed to have chosen to be reprinted in “Greasemonkey Hacks“. Now, Amazon have come out with their own Ajax book reader. It uses all the same tricks the Google one does (disabling the right-click menu, putting a transparent GIF over the content, using CSS backgrounds to thwart printing and Save Image As…, and so on) but has a few new ones of its own.

Firstly, it’s serving up the JPEGs as at least one unusual MIME type. When the page image is downloaded as part of the reader, LiveHTTPHeaders tells me it’s text/plain, but when I access an image URL directly, I get an offer to download it to disk. Perhaps that’s Firefox noticing that it’s binary data, or perhaps it’s sending a different type when there’s no Referer. Anyway, you can’t view the images directly in a web browser, whatever you do. Cunning.

Secondly, the page image URLs are of the form:

http://lookinside2-images.amazon.com:80/Qffs+v35lequprNEMPutod5Bzs1h6sFoa355lEmcXkudq4PesXEiM3eNX2Q93ZDMpWoj0SSHSe4=

So they have no extension, and you can’t associate a non-existent extension with your browser or image viewer.

There’s also a download of a mysterious thing called “ffcopy.swf”. I can’t work out what that’s for; installing FlashBlock doesn’t have any effect on copy and paste behaviour…

10 thoughts on “Amazon Ajax Book Reader

  1. If someone wants to make content inaccessible, the most effective method I’ve seen is how YouTube does it: use a swf to remotely load it like an iframe. All the files end up in the disk cache though. :)

  2. That’s a lot of work for being easily circumventable. I opened up the “Page Info” dialog, went to the “Media” tab, and scrolled down the list until I saw the page images. (They show up as type “Background”.) Then just “Save As” and stick a jpg extension on it. They’re going to have to try harder than that.

    ant: http://videodownloader.net/

  3. Ted: Right :-) When I did the original Google Print hack, Page Info didn’t support CSS background images. I’m glad it does now.

  4. Several months ago (IOW they may have changed it) I found it not too difficult to circumvent Amazon’s various hacks. My mom was browsing through their products and found a cookbook she thought she would like to try. In the sample, they showed some pages of recipes. Of course the best way to evaluate the book is to try one of the recipes and see how it is. And, of course, the computer is not in the kitchen. They use a nice CSS property to omit the image from the print rendition of the web page while showing it on the on-screen rendition. I don’t recall the details, but a little browsing of the source and I had the URL for the image. I then saved it and printed it. With the recipe on a piece of paper it could be carried to the kitchen to try the recipe. It only takes a little awareness of the world and the technology involved to turn it into a useful tool. Amazon may have even made a sale they otherwise would not have as a result of my effort. (I don’t recall if she bought that particular book or not, but she certainly buys plenty of cookbooks)

    The information industries really need to get their act together and follow the rules of capitalism. Grocery stores give away free food (samples) to demonstrate the quality and value of their product. When the price of an item is higher than its value, stores discount it to match the supply-demand dynamic and reclaim the shelf space. Instead of respecting the consumer and pricing products in accordance with supply and demand, information vendors (books, audio, video) expend ridiculous amounts of resources destroying their product and overpricing it. As a consumer I am very wary of any online retailing and distribution of media. I am very hesitant to consider buying any media online because the industry has demonstrated the lengths it will go to to prevent me from consuming their products.

  5. Well, with just a little bit of work I came up with the following hunk of javascript, which when used as a bookmarklet will basically replace the transparent gif src with the background img src. Then, you can right-click “Copy Image” and then paste it into whatever image editor you want. The MIME-type business still prevents right-click “View Image” from working, though…

    javascript:(function(){var img=document.getElementById(‘Page ‘+userSettings.settings.lastPageViewed).firstChild; img.src=img.style.backgroundImage.substring(4,img.style.backgroundImage.length-1); })();

  6. Gerv, I do not have Flash installed in Firefox here, (saves me from having to deal with flashblock and any incompatabilities in future versions).

    When I view the Amazon page I do not get any “Plugin required” messages. At least until I start clicking around on the menu at the top (such as clicking “Print”, which *is* greyed out) and other items on that.

    I would imagine the flash works in mysterious ways with that portion of the service, (probably as some sort of authentication mechanism)

  7. Or load it up in a javascript applet. Anyways, there is always printscreen – the screenshot analog loophole.

  8. Fundamentally, if it can be viewed it can be printed, in one fashion or another. If nothing else, you can always take a screenshot or, failing that (e.g., if the whole OS is locked down), a digital photo of the screen. There isn’t any way around this. Attempts to prevent printing a paper copy ultimately just needlessly annoy people who want to print a paper copy. Usually (the aforementioned cookbook instance being probably an exception) that’s going to be primarily the sort of people who prefer to do things offline rather than online whenever they have a choice, i.e., those with technophobic tendencies — a demographic Amazon can ill afford to needlessly annoy, because they’ve already got half a mind to drive over to Barnes and Noble rather than buy online, and it won’t take much to push them over the edge.

    On the other hand, it isn’t Amazon, I’m pretty sure, who desire to prevent the printing. I imagine it’s something they had to make a noticeable effort to do in order to keep the publishers on board with allowing the content to be viewed at all.

    I was ecstatic when Amazon announced their “Search Inside This Book” project, because ultimately what I want is what LCARS provided in Star Trek: I want to punch in some keywords and get search results from the full text of everything that’s ever been written, not just on the internet but also in print. This will I’m sure be a *long* time yet in coming, but Amazon has taken concrete steps (and subsequently Google and others have followed) in that direction.

    So yeah, the attempts to prevent printing are annoying and stupid, but being able to get search results from the text of the books in the first place is really quite nifty, although the range of books included is so far rather limited. And, as noted, you ultimately *can* get the information printed, it’s just a bit of a pain.