4 ms·
Yes, this is why you load images and CSS from a CDN, and you can do JSON+callbacks instead of Ajax onto a big app server somewhere. (There's a gem for Rack, if
by lsb 17y ago
Yes, this is why you load images and CSS from a CDN, and you can do JSON+callbacks instead of Ajax onto a big app server somewhere. (There's a gem for Rack, if you're on Ruby, to automatically handle the parenthesization.)
- gcv 17y agoWhat do you mean by JSON+callbacks?
- lsb 17y agoYou promote data to code. JSON is usually a data format, like {result: 42}. If you wrap that in callback({result: 42}), that's executable javascript code. Including script tags on your pags via JS, like how the Delicious API / Flickr API / Google Translate & whatnot APIs, all rely on this. Check out http://developer.yahoo.com/common/json.html#callbackparam http://developer.yahoo.com/common/json.html#callbackparam