Readk.it: digital reading simplified

Readk.it is a responsive EPUB reading system taking advantage of the abilities of modern web browsers to allow an attractive reading experience on all manner of devices. Readk.it is free for all to use and adapt.

View on GitHub

Readk.it Solo

A single HTML file containing all of the EPUB content — including images, video, what have you — along with the Readk.it reading system. This file can be distributed to users via email, and then read offline by double-clicking to open in their default browser. Examples of Readk.it Solo can be downloaded here.

Readk.it Library

Multiple EPUBs can be web served as a bookshelf from which the user can pick the title they wish to read. An example of the Readk.it Library can be viewed here.

Readk.it EPUB

The Readk.it reading system travels inside the EPUB. If the EPUB is unpacked and web-served at a later stage, Readk.it can be used to read the content. Examples of Readk.it EPUB can be downloaded here.

Readk.it Reader

A single HTML file that contains the Readk.it reading system, but no content. This file can be double-clicked to open in the user’s default browser, and then an EPUB can be dragged and dopped onto the page to begin reading. The Readk.it Reader can be accessed here.

Publisher, meet audience

Publish to a wide audience

Readk.it is a light-weight and open-source browser-based reading system that can be married with EPUB files to allow seamless browser-based reading. Readk.it allows the EPUB content to be read in a desktop browser, but also in browsers on all manner of mobile devices. Readk.it-enabled EPUB content can be web-served under the control of the publisher, or delivered for offline consumption (e.g. via email).

EPUB, meet responsive design

Giving control of eBook design back to the publisher

EPUB publications, although built on web standards, are unable to take full advantage of the possibility of these technologies. Design possibilities are limited, as providing a consistent reading experience across multiple vendor reading systems means aiming for the lowest common denominator: most reading systems only support a fraction of the choices offered by modern browsers, and this support is inconsistent between vendors. With responsive design we’ve had a revolution in the world of the open web; now it’s time to bring this revolution to eBooks.

EPUB in, browser-based eBook out

The Readk.it flavours

When supplied with an EPUB, the Readk.it build process produces a number of outputs, including Readk.it Solo, a self-contained HTML file which can also be easily opened for reading simply by double-clicking. Another output is the Readk.it Library, whereby a number of EPUBs can be compiled together with Readk.it such that they can be web-served as a collection, with the user able to choose any from the library for reading. Any Readk.it variant can also be used to read other (non-DRM) EPUB files, simply by dragging and dropping the EPUB on the browser window containing the Readk.it-enabled content.

Introduction

Readk.it is a lightweight JavaScript-based reading system that allows publishers to distribute responsive book-like content in a form that can be read in modern browsers on practically all devices.

Readk.it has been designed to take advantage of responsive design techniques in order to provide a seamless digital reading experience when the EPUB content is accessed via a browser, but where an EPUB file bundled with Readk.it can also fallback to standard behaviour on dedicated EPUB reading devices (in which case Readk.it is quiesecent). The EPUB remains valid and, should it be unzipped and the content web-served, users will be able to view the publication as the publisher intended, using Readk.it.

EPUB files do not have to be amended in any way to take advantage of Readk.it (though they do have to be valid). The EPUB is married with the Readk.it reading system during a build process, and a number of outputs are produced.

Readk.it can also be used to serve up a library of EPUB titles, allowing publishers to easily web-serve their existing EPUB files.

Possibly the most interesting use of Readk.it is Readk.it Solo, a single HTML file that can be distributed to a user such that they can double-click on the file to view it in the browser.

Finally, when viewing any Readk.it-enabled publication in the browser, the user is able to drag-and-drop another (non-DRM) EPUB into the browser page to begin reading the new publication.

The Detail

No modifications to any existing EPUB files should be necessary in order to allow the EPUB to be read using Readk.it. However, a better reading experience than is currently possible on most dedicated EPUB reading devices can be acheived by coupling Readk.it with EPUB content created using responsive design techniques. The Readk.it Manifesto provides a simple example of this, showing how custom CSS and JavaScript can be created as part of the EPUB content and then presented using Readk.it for a rich and responsive reading experience.

Readk.it has come about because EPUB, in spite of the potential that the standard allows, is being restricted by a lack of features and standardisation on the part of dedicated vendor reading systems. Given that the modern browser is ubiquitous on mobile devices and that EPUB is based on web standards, it makes sense to provide a reading system that allows EPUB to take advantage of the browser environment.

Readk.it does not aspire to cater for all of the functionality of the EPUB standard (as we’ve got Readium for that), rather it tries to provide a graceful reading experience for the majority of EPUBs which are typically found in the wild. If Readk.it can allow these EPUB files to be read on a wide range of devices, including content designed with responsive design techniques, then it’s done its job.

Readk.it builds on the efforts of others, notably Matteo Spinelli’s iScroll4, as well as jQuery and RequireJs, while the Readk.it Manifesto provides an example of the use of enquire.js for JavaScript-based Media Queries.

Why use Readk.it?

Some of the reasons that a publisher might consider using Readk.it include:

  • Providing review copies which can easily be opened for reading by double-clicking (Readk.it Solo) — no need for the reviewer to already have a device with an EPUB reading system.
  • Being able to easily create sample previews of their content which can be web-served from the publisher’s web-site (Readk.it Library). Once the reader is interested, they can be directed to a conventional distribution channel for purchase.
  • Ensuring that their customised Readk.it reading system travels with the EPUB, such that it can be used at a later point to web-serve the EPUB content (Readk.it EPUB).
  • Providing access to Readk.it content behind a subscription service (Readk.it Library).

Limitations

Single-page app

Readk.it follows a model whereby it loads all EPUB files into a single page. It’s smart enough to rewrite internal URLs and anchors (preventing collisions), and any third-party JavaScript files specifically required by the EPUB can also be configured to be loaded using the client.config.js.

The reason Readk.it adopts this behaviour is to allow a simple means of loading the entire EPUB, such that it can then be read without further recourse to the server. With the use of application cache to store all of the EPUB assets client-side and thereby allow further reading offline, this approach also makes sense.

However, the main limitation this imposes is one of file size; this approach works well for normal-length text-based EPUBs but if your EPUB contains lots of media (particularly video), then you may find that it takes a long time for the publication to load (providing the browser doesn’t time-out). Similarly, for large text-based publications such as Moby Dick, your experience will differ depending on the capabilities of your deivce. Moby Dick is not so much large as extensive, containing around 150 files, each of which has to be loaded before the publication can be displayed. For instance, my testing has shown that it loads generally well in desktop browsers, will load in my Kindle HD tablet (although taking about two minutes to do so), but I’ve yet to get it to load in my aging iPhone 3GS. The solution to this is simple: split your publication up into a series of smaller publications, and consider using the Readk.it Library configuration to serve them.

EPUB-lite

The EPUB standard is verbose and complex (canonical fragment identifiers, anyone?) and Readk.it does not attempt to do much more than provide a mechanism for prising open an EPUB and wrapping it with a simple but functional navigation system. That’s not to say that it couldn’t be extended to support specific (and ocassionally esoteric) EPUB functionality in the way that Readium does, however the high majority of users should find that what Readk.it provides is ample. This is somewhat in the spirit of EPUB Zero, if somewhat less heretical in being able to cope with the existing EPUB file structure and metadata layout.

Cross-browser support

Readk.it has been designed to work with modern browsers, including Internet Explorer 10. However, it is not guaranteed to work seamlessly in all modern browsers, and known issues include the following.

Data-URIs

Readk.it Solo makes use of Data URIs and Blobs to allow all of the content to be included in a single file. Unfortuantely, Internet Explorer 10 treats Blobs as cross-origin and denies access when the content is opened as a file URL (i.e. double-clicked). A ticket is currently open with Microsoft regarding this behaviour.

jQuery2

Given that we are targeting modern browsers (and that Readk.it was designed primarily for use on mobile devices), we have made a conscious choice to go with jQuery2, meaning that older browsers are not catered for.

Non-standard browsers

Browsers such as Opera Mini and the native Android browser are unlikely to support the functionality needed to allow Readk.it to work.

Drag-and-Drop

Because of the security risks of using web-workers for file URLs, drag-and-drop will work when using file URLs though it will be noticeably slower than when web-served (in this case the zip.js library falls back to using a single process to unzip EPUB assets).