JavaScript: Store a playlist in-memory
I'm trying to store a playlist of songs in my application. What's the most flexible and efficient way to do this? Each song has a few fields, like: song_name, song_id, song_artist etc. The playlist is sent to the client as JS开发者_Python百科ON.
Dustin Dias has a nice cache script that stores the values as json either as an simple javascript object variable or in window.localStorage:
http://www.dustindiaz.com/javascript-cache-provider/
精彩评论