Flask data storage in session with javascript or jquery
<p>I have a lot of data (about 30 columns) from different HTML pages to store:</p>

<ol>
<li>a string (can be retrieved by id) randomly generated with Javascript</li>
<li>a form with data from user input</li>
<li>a list of values generated with Javascript</li>
</ol>

<p>With Flask framework, most of the sessions are done on the Python file (app.py) itself. Is it possible to store data on session with Javascript or Jquery?</p>

<p>You can use <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API" rel="nofollow">web storage</a>. There are two kinds:</p>

<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage" rel="nofollow">Session Storage</a>:</p>

<blockquote>
  <p>Maintains a separate storage area for each given origin that's
  available for the duration of the page session (as long as the browser
  is open, including page reloads and restores)</p>
</blockquote>

<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage" rel="nofollow">Local Storage</a>:</p>

<blockquote>
  <p>Does the same thing, but persists even when the browser is closed and reopened.</p>
</blockquote>

javascript jquery python flask session-cookies