1

If I am (hypothetically) writing an ebook that refers to certain publicly traded companies, and I want, as in the wall st journal, to display a small ticker symbol showing the current value of the stock next to each company name, is there a way for me to connect to some service that requires a to logon?

To my knowledge, there is no way to do things like redirects in any epub reader (or library system such as safari), but is there some way to accomplish this basic functionality?

what I am envisioning is some form of ajax request that will refresh periodically, at a minimum when the user opens the ebook, possibly more frequently. Would be ideal to have a way to cache the logon credentials so repeated entering of user/pw would not be necessary.

My main question is to determine if such a functionality is just flat-out impossible; I realize there will be wide differences in features supported by various readers and library systems.

If such a system were possible, what would be necessary both on client side (in terms of javascript) and server side, in terms of how open/secure it needs to be.

thanks!

1 Answer 1

1

This document might be helpful:

https://idpf.github.io/a11y-guidelines/content/script/pe.html

Progressive enhancement does not mean that you cannot script content, but that scripting must not be required. It is perfectly valid, for example, to remove content from the default rendering and replace it with an enhanced experience when scripting is available. It is likewise permitted to augment the default rendering with scripted interactivity. What you must avoid doing is scripting content such that without the scripting the primary narrative is not available in whole or part.

Generally, it is helpful to think as a reading system as a stripped down version of a browser -- especially because it is assumed that an epub file needs to be readable over a longer period of time.

It is hard to believe that there are circumstances that a browser window on a mobile device would not be better than an epub file read by a mobile reading system. Even if you need to store and display data, a browser window or a special app is better suited for that.

One of the essential problems is that the type of functionality you are looking for wouldn't be seen as an important priority for developers of reading systems. I'm guessing that for scripting the priorities are scripting support for quizzes, game, geolocation and things related to modifying the display or enhancing search -- not pulling in remote data.

My guess is that out of all the reading systems, the one most likely to support advanced scripting would be iBooks, so there might be some ibooks-specific solutions.

A brief listing of device support for various scripting functions is here: http://epubtest.org/features/

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.