platform/browser independent code for reading a book