`
keller
  • 浏览: 46833 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

客户端存储数据工具库-PersistJS

    博客分类:
  • Java
阅读更多

替代Cookie在客户端存储数据。

 Cookie存储数据缺点:

  • Size: Cookies are limited to about 4 kilobytes in size.
  • Bandwidth: Cookies are sent along with every HTTP transaction.
  • Complexity: Cookies are difficult to manipulate correctly.

    PersistJS优点:

  • Small (9.3k minified, 3k gzipped)
  • Standalone: Does not need any additional browser plugins or JavaScript libraries to work on the vast majority of current browsers.
  • Consistent: Provides a consistent, opaque API, regardless of the browser.
  • Extensible: Custom backends can be added easily.
  • Backwards Compatible: Can fall back to flash or cookies if no client-side storage solution for the given browser is available.
  • Forwards Compatible: Supports the upcoming versions of Internet Explorer, Firefox, and Safari (Opera too, if you have Flash).
  • Unobtrusive: Capability testing rather than browser detection, so newer standards-compliant browsers will automatically be supported

     

    与PersistJS类似功能项目包括:Dojo Storage。遗憾的是DojoStorage依赖Flash,没有安装Flash的浏览器DOJO storage不起作用。

  • 原文地址http://www.zgkw.cn/forums/forums/74105/ShowThread.aspx#74105

  • 分享到:
    评论

    相关推荐

    Global site tag (gtag.js) - Google Analytics