How to store and access JSON data for a site?

Posted by Callmeed on Stack Overflow See other posts from Stack Overflow or by Callmeed
Published on 2010-04-02T20:47:51Z Indexed on 2010/04/02 20:53 UTC
Read the original article Hit count: 188

Filed under:
|
|
|
|

I'm buiding an HTML/jQuery site where almost all the content comes from remote JSON data. I'm having trouble coming up with a good way to store and access the data in the future (scope-wise).

Currently, I've written a jQuery plugin that gets the JSONP data when the site loads. But I have other functions and jQuery plugins that need to access this data.

Where should this data be stored so other functions and plugins can access it?

Should it be a global variable?

If it matters, this site will only run on the iPad and the back-end of the site is in Rails.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JSON