It also adds a timestamp, and allows for a callback. Perhaps it should be clarified that this relies on making a web call to their server (even if that is the only way this could possibly be done).
Unless there is something I don't understand, how can this even be slightly reliable or useful, when everyone can read any key and write or replace any key at any moment ?
but then why would this be better than, say, localStorage, which is local? The only purpose to this is semi-persistent cross-domain information storage. It's crazy to use an external JSON-P service to store tweetable-sized messages, when you've got megabytes locally with precisely the same key/value setup. Or, if you're handling older browsers, cookies will get you several KB.
If you want to demonstrate some cross-browser communication app? I agree, this has a very limited application scope. I am more confused as to why the author made it when he doesn't seem to have a use case for it himself.
You can make a cross domain POST with an IFRAME but would not get the response directly. Having to use parent.postMessage, the window.name hack or polling with JSONP depending on the browser. Possible then, but not so easy.
Those hacks don't work on all platform (iframe for mobile is a good example) and often require you to have very particular setting on both sites. The only way for JSONP to work well on everything is to use script tag injection which only allows you to do GET request.
It's a javascript library that essentially consists of two functions (get and set) to retrieve and store some arbitrary content identified by a key string. That content is stored on the author's server though you can override the domain name and put in your own.
I think this combination of a lightweight library and free online storage could be useful for people who would like to have a static website with no functionality or storage whatsoever on their server. It could also be used in scenarios where JS code is used as glue between one or more websites and the user (for example in browser plugins).
you might be able to replace the server with just CouchDB configured to allow JSONP... Then users can just sign up at something like http://iriscouch.com to install a copy of your library on an independent server.
It would be a heck of a lot more useful if it were namespaced, like S3's buckets. Let folks put into those buckets whatever they want, but make the buckets in your datastore unique, based on the domain, referer, etc.
I think there's a pretty limited use for this, but it's definitely an interesting experiment if nothing else. I found it so cute that I decided I'd implement a really simple server endpoint for this.
It sets a key using:
http://rastajs.errorjs.com/set/yourkey/yourvalue
And retrieves it using:
http://rastajs.errorjs.com/get/yourkey
It also adds a timestamp, and allows for a callback. Perhaps it should be clarified that this relies on making a web call to their server (even if that is the only way this could possibly be done).