V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
mamahaha
V2EX  ›  问与答

为啥大站都喜欢用 localStorage,很少有用 indexedDB 的?是不是后者安全性较差?

  •  
  •   mamahaha · 2019-05-04 01:16:31 +08:00 · 2464 次点击
    这是一个创建于 1817 天前的主题,其中的信息可能已经有所发展或是发生改变。

    想学学别人的用法,搜了半天,没见过用 indexedDB 的。是不是怕暴露 json 结构?弄得我也有点不敢用了。

    eslizn
        1
    eslizn  
       2019-05-04 01:19:48 +08:00   ❤️ 1
    和暴露 json 结构有啥关系? localStorage 一般够用了,生产图稳不图花
    mamahaha
        2
    mamahaha  
    OP
       2019-05-04 01:25:43 +08:00
    区别在稳定性上吗?
    mamahaha
        3
    mamahaha  
    OP
       2019-05-04 01:26:16 +08:00
    不是,区别很大,我的意思是稳定性不一样吗?
    shiny
        4
    shiny  
       2019-05-04 01:27:16 +08:00   ❤️ 1
    localStorage 简单够用,IE8 都支持
    mamahaha
        5
    mamahaha  
    OP
       2019-05-04 01:30:02 +08:00
    @shiny 嗯,有道理,简化性到没啥,后者有简化工具,支持 IE8 是硬道理。
    morethansean
        6
    morethansean  
       2019-05-04 01:30:53 +08:00   ❤️ 1
    ……看你自己的使用场景啊。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5760 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 02:30 · PVG 10:30 · LAX 19:30 · JFK 22:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.