2013年11月21日星期四

How to set caching data in JS

Now it wants some practical frequent basis data cached on the client , please heroes exhibitions ah
------ Solution ----------------- ---------------------------
added: json format used on the line .
example

<script type="text/javascript" language="javascript">
 var languages = {
    cn:{
    lang:'ch',
    name:"中文"
 },
 en:{
    lang:"英文",
    name:"en"
 }
 };
 document.write(languages.cn.name);
</script>

------ Solution ------------------------------------- -------
js variable exists on the line

more data storage array

want to have saved json array format

actually finally a variable of an object and the background cache a java meaning
------ Solution -------------- ------------------------------
used jquery easyui do ?
more practical you this question , never used can look at

background Controllr in :

Front js Lane :



------ Solution ------------------------------------ --------
previous direct deposit a cookie so good
Now it can exist localstorage or localsession inside
------ For reference only --------------------- ------------------
master where ah , Online . . . . . .
------ For reference only -------------------------------------- -
own package a js object on the line ah !
------ For reference only -------------------------------------- -
exist client do ?
can put hidden controls on the page , in the control store variable values.
------ For reference only -------------------------------------- -
json array ,
------ For reference only ------------------------------ ---------
new array
------ For reference only ----------------------- ----------------
code uploaded backwards, brokered see, to convey a general meaning ! ! ! Oh
------ For reference only ------------------------------------- -
data sets cached in JS cookies?
------ For reference only ------------------------- --------------
to serialize the data to json format
then stored in hidden controls to the page
call to take the value of hidden controls
this problem it
------ For reference only ---------------------------- -----------

. . . . . .

没有评论:

发表评论