In addition to Solution 1, another way of passing data between different pages is client-side
Web Storage, the API introduced with HTML5 but later established as a separate W3 candidate recommendation standard:
http://www.w3.org/TR/webstorage[
^],
https://en.wikipedia.org/wiki/Web_storage[
^].
These days, it is implemented by all non-nonsense browsers. You want to use
sessionStorage
object rather than
localStorage
, to avoid permanent contamination of your browser data. Additionally, you may want to use JSON if you want to put some complex object under one key. This technique is fully explained and demonstrated in the section of my article
JavaScript Calculator, Dynamic Strict Mode Switching and Web Storage.
—SA