0

I've used code that store commands (in jQuery Terminal) that need to be executed as JSON array in hash. with code like this:

function exec_hash() { if (location.hash) { var commands; try { commands = $.parseJSON(location.hash.replace(/^#/, '')); $.each(commands, function(i, command) { try { terminal.exec(command); } catch(e) { var cmd = $.terminal.escape_brackets(command); var msg = "Error while exec with command " + cmd; terminal.error(msg).error(e.stack); } }); } catch (e) { //invalid json - ignore } } } 

And i had this idea to store entire terminal session in hash, so my question is how long url hash can be?

3
  • 1
    IE8 and IE9 have a max length for the ENTIRE url + query string + hash to be 2083 characters, including protocol. Commented May 28, 2014 at 14:45
  • 1
    if you control the clients you can do it with firefox, chrome, safari, opera. They have no practical limit. Commented May 28, 2014 at 14:53
  • 1
    URL and Hash are NOT the same. So this question shouldn't have been closed with that duplicate pointed to. Commented Apr 24, 2015 at 14:26

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.