开发者

JavaScript: Store a playlist in-memory

开发者 https://www.devze.com 2023-01-08 18:28 出处:网络
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

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消