Why is the revenue of technical books declining?

Mark Pilgrim has written the post “The ‘book’ is dead” [via Daring Fireball] where he examines why revenue from technical books seems to be declining. It was triggered by a prior post from David Flanagan, in which he writes:
For 15 years I’ve been one of those lucky authors who has been able to support himself and his family almost entirely on book royalties. But the publishing industry has been in decline and my royalties checks have decreased more-or-less steadily since the dot-com bust, and I’ve now decided that I need to look for a salaried job.
Pilgrim’s post makes a few noteworthy points:
  • Convenient beats free (as long as the price is fair). iTunes is a good positive example, O’Reilly’s “Safari” is a negative one. Quote from a comment to the original post:
    I have been an OReilly Safari subscriber for several years. I can recommend this to every developer out there. … Yet, must admit it still pains me that for ~$500/year we as honest subscribers can not get the same convenience (offline access, unencumbered PDF’s) as people who just download a pirated PDF library for free.
    The same holds for buying a DVD, but at least measures are being implemented to add a downloadable file to physical video media so that the video can be played on mobile devices.
  • Google filtering out pirated content might not be feasible, for technical, legal, and ethical reasons (this kind of censorship can easily be abused).
  • The core issue: Is a book still the best possible format for delivering technical content when Google enables you to get answers to your questions via an internet search? Quote:
    [...] who bothers to steal books these days when you can go to Stack Overflow or a web forum or, yes, even Google, type a question, and get an answer?
Are books dead? Not in general, but reference books have lost some of their raison d’être. For example, I would never buy a reference on JavaScript, as long as the free Mozilla Developer Network documentation is as good as it is. On the other hand, books like Crockford’s “JavaScript: The Good Parts” are in a different category.