首页 > 代码库 > 基础 - 网页存储

基础 - 网页存储

Application Cache

 

<html lang="en" manifest="cache.manifest">

  

CACHE MANIFEST# version 1.0.0CACHE:    index.html    NETWORK:

  

WebStorage

分为localStorage和sessionStorage

    var sNameKey="Name";    if(window.localStorage) {        /*存*/        localStorage[sNameKey] = "WeWeZhang";        /*取*/        localStorage[sNameKey];    }    if(window.sessionStorage) {        /*存*/        sessionStorage[sNameKey] = "WeWeZhang";        /*取*/        sessionStorage[sNameKey];    }

  

  

 

基础 - 网页存储