将JSON对象存储在临时文件中

I have a project where I'm pulling in a large amount of content from a JSON array and only showing a little bit of it at a time. The JSON array can contain video or audio files so I want to avoid loading the entire array since it will be loaded on a mobile device.

I'm hoping to load the array into a temp file or some sort of local storage so I can pre-load the content. Alternatively, if there was a way to use AJAX to quickly iterate thru each item in the stored in the array which sits on MongoDB then that would work as well.

Any suggestion on this would be greatly appreciated.

I guess that you need to split the json in chunks,

  1. Server-side:

    client only request page 1 of info, when the info is soon gone it ask for page 2 and so on... i that way you won't have to deal with tons of info and the server won't have to give you tons of info that you may not even use.

  2. Client:

    you could store on many files or just load the json into the page as needed.