Giter Site home page Giter Site logo

browser-storage's Introduction

基于浏览器的缓存策略(browser-storage)

简介

	/**
	 * 全浏览器支持的本地存储方案:browser-storage.js
	 *
	 * @detail
	 * 1、支持HTML5的浏览器,采用原生localStorage进行存储
	 * 2、IE7及其以下版本,采用UserData进行存储
	 * 3、在以上两种都不支持的浏览器中,采用cookie进行存储
	 *
	 * @API
	 * 1、BrowserStorage.api.setUserDataEnabled //设置IE中是否采用UserData存储
	 * 2、BrowserStorage.api.set //设置本地存储
	 * 3、BrowserStorage.api.get //获取本地存储
	 * 4、BrowserStorage.api.remove //移除本地存储
	 * 5、BrowserStorage.api.clearAll //清空所有本地存储
	 * 6、BrowserStorage.api.getAllKeys //获取所有本地存储的key
	 *
	 */

详细api文档

http://www.baidufe.com/component/browser-storage/index.html

browser-storage's People

Contributors

zxlie avatar

Watchers

James Cloos avatar zhoufumin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.