title: Share data across e-book pages
body: <p>I want to have a quiz at the end of a chapter in my fixed layout epub3 e-book. This quiz will stretch across a number of pages and will be multiple choice in nature. Each question will consist of the question itself and four options, each with a radio button. At the end of the quiz, the user will click a button to reveal their overall result. To do this I will need to share information between pages. One way of doing this is for all the pages to be in one XHTML document and then I can store the answers the student gives for each question in a javascript variable. However, is it valid to have multiple pages of a fixed layout epub3 book in the same XHTML file?, as I am doing here:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"&gt;
  &lt;head&gt;
  &lt;title&gt;My Book&lt;/title&gt;
  &lt;meta charset="utf-8"/&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"/&gt;
  
  &lt;style&gt;
  
  p.pagebreak {
      page-break-after:always;
  } 
  
  &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt; 
  
      &lt;p&gt;
          Text on Page 1
      &lt;/p&gt;
  
      &lt;p class="pagebreak"&gt;&lt;/p&gt;
  
      &lt;p&gt;
          Text on Page 2
      &lt;/p&gt;
  
      &lt;p class="pagebreak"&gt;&lt;/p&gt;
  
      &lt;p&gt;
          Text on Page 3
      &lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>It looked fine in iBooks.</p>
  
  <p>Alternatively, if multiple pages are used, I could store the students' answers using <code>window.sessionStorage</code>. However, I've no idea how many readers support storage. I would like the quiz to work for iBooks and also for Android and Windows Tablets and Desktops. </p>
  
  <p>How would you advise I implement my quiz?</p>