Skip to content

杂记

存储

indexDB: 以以结构化方式存储大量数据 上限200M。不过原生很难用,可以用 idb 的包或者 dexie.js

sessionStorafe: 从本标签页内触发打开的标签页可以共享数据 否则不行

api

window.getComputedStyle(el):这个api 我都要不知道了!$0.clientHeight === $0.getBoundingClientRect().height

以及还有 tab 实例的 postMessage 和 localStorage 的 event

meta 大全:<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 其实就相当于在http response里设置(初衷是用于offline的页面),注意http里的相同头优先级更高