V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
mamahaha
V2EX  ›  问与答

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

  •  
  •   mamahaha · May 4, 2019 · 2866 views
    This topic created in 2553 days ago, the information mentioned may be changed or developed.

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

    eslizn
        1
    eslizn  
       May 4, 2019   ❤️ 1
    和暴露 json 结构有啥关系? localStorage 一般够用了,生产图稳不图花
    mamahaha
        2
    mamahaha  
    OP
       May 4, 2019
    区别在稳定性上吗?
    mamahaha
        3
    mamahaha  
    OP
       May 4, 2019
    不是,区别很大,我的意思是稳定性不一样吗?
    shiny
        4
    shiny  
    PRO
       May 4, 2019   ❤️ 1
    localStorage 简单够用,IE8 都支持
    mamahaha
        5
    mamahaha  
    OP
       May 4, 2019
    @shiny 嗯,有道理,简化性到没啥,后者有简化工具,支持 IE8 是硬道理。
    morethansean
        6
    morethansean  
       May 4, 2019   ❤️ 1
    ……看你自己的使用场景啊。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3460 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 04:23 · PVG 12:23 · LAX 21:23 · JFK 00:23
    ♥ Do have faith in what you're doing.