Answers.Body: <p>This document might be helpful: </p>
  
  <p><a href="https://idpf.github.io/a11y-guidelines/content/script/pe.html" rel="nofollow">https://idpf.github.io/a11y-guidelines/content/script/pe.html</a></p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>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. </p>
  
  <p>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. </p>
  
  <p>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.  </p>
  
  <p>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. </p>
  
  <p>A brief listing of device support for various scripting functions is here: <a href="http://epubtest.org/features/" rel="nofollow">http://epubtest.org/features/</a> </p>
  
  <p>Hope this helps. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-30T18:41:41.687Z
Answers.LastActivityDate: 2016-09-30T18:41:41.687Z
Answers.UserDisplayName: idiotprogrammer
Body: <p>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?</p>
  
  <p>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?</p>
  
  <p>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. </p>
  
  <p>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. </p>
  
  <p>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. </p>
  
  <p>thanks!</p>
  
Tags: <epub>
Title: oauth in ebooks
UserDisplayName: badperson
ThreadText: # oauth in ebooks
  
  (Asked by: username_0 on 2016-09-29)
  
  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!
  
  **Tags:** epub
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-09-30. Score: 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.
  
  
  ---
  
  