Reputation: 96827
I wrote some bookmarklets to automate some tasks on a webpage. I'd like to be able to store a value somehow, so that when I run a bookmarklet the second time, it will see that it exists, and try to use it.
I'd like to be able to do that using pure javascript. Kind of like greasemonkey's storage.
Upvotes: 2
Views: 197
Reputation: 138017
If you don't need to save the value between domains you can use JavaScript cookies, by using document.cookie
.
The w3 have a simple example: http://www.w3schools.com/JS/js_cookies.asp,
and here's another example from Microsoft: http://msdn.microsoft.com/en-us/library/ms533693%28VS.85%29.aspx
Upvotes: 2