If you are only going to support modern browsers, I would go for HTML5 offline storage.
Another approach would be to get an AJAX route.
You do not want to use cookies for this, bacause:
cookies are loaded for every request
A cookie may contain only a limited amount of information.