How can I take the user to a new page, along with some variables, using Javascript/jQuery, without causing a URI Too Large error?
<p>Using Javascript/jQuery, I need to take the user to a new page when a button is clicked, and also send along a bunch of variables to the new page. At the moment I'm doing it like this:</p>

<pre><code>location.href=window.location.href + '/new_note?id='+$('#note_id').val()+'&amp;note_subnotes='+encodeURIComponent(window.JSON.stringify(sub_notes))
</code></pre>

<p>This works okay, but the problem is that <code>sub_notes</code> is an array of hashes, which can get pretty large. If I have more than a few hashes in the array, I get this error:</p>

<pre><code>Request-URI Too Large
WEBrick::HTTPStatus::RequestURITooLarge 
</code></pre>

<p>So obviously the URI is too big. How can I do this without running into this problem? Thanks for reading.</p>
