搬运工 发表于 2022-8-21 00:00:00

TL 客户端存储技术



前言.........................................................................................................................................................vii
第 1 章 客户端数据存储概述..........................................................................................................1
第 2 章 使用 Cookie ..........................................................................................................................3
2.1 真的要讨论 Cookie 吗 ...............................................................................................................3
2.2 使用 Cookie ................................................................................................................................4
2.2.1 读取 Cookie ....................................................................................................................5
2.2.2 删除 Cookie ....................................................................................................................6
2.3 演示程序 .....................................................................................................................................6
2.4 使用开发者工具查看 Cookie ..................................................................................................10
2.5 浏览器支持和使用建议 ...........................................................................................................11
第 3 章 使用 Web 存储 ..................................................................................................................13
3.1 Web 存储 / 本地存储 ...............................................................................................................13
3.2 使用 Web 存储 .........................................................................................................................14
3.3 演示程序 ...................................................................................................................................15
3.4 监听存储变化 ...........................................................................................................................19
3.5 使用开发者工具查看 Web 存储 .............................................................................................21
3.6 浏览器支持和使用建议 ...........................................................................................................23
第 4 章 使用 IndexedDB................................................................................................................25
4.1 欢迎来到深度数据时代 ...........................................................................................................25
4.2 IndexedDB 关键术语 ...............................................................................................................25
4.3 检查 IndexedDB 支持 ..............................................................................................................26
4.4 使用数据库 ...............................................................................................................................27
vi | 目录
4.5 使用对象存储 ...........................................................................................................................29
4.5.1 创建对象存储 ..............................................................................................................29
4.5.2 定义主键 ......................................................................................................................31
4.5.3 定义索引 ......................................................................................................................33
4.6 操作数据 ...................................................................................................................................34
4.6.1 创建数据 ......................................................................................................................35
4.6.2 读取数据 ......................................................................................................................39
4.6.3 更新数据 ......................................................................................................................41
4.6.4 删除数据 ......................................................................................................................43
4.7 获取所有数据 ...........................................................................................................................44
4.8 关于 IndexedDB 的更多内容 ..................................................................................................49
4.8.1 存储数组 ......................................................................................................................49
4.8.2 计算数据量 ..................................................................................................................53
4.9 使用开发者工具查看 IndexedDB ...........................................................................................54
4.10 浏览器支持和使用建议 .........................................................................................................55
第 5 章 使用 Web SQL ..................................................................................................................57
5.1 已废弃的规范 ...........................................................................................................................57
5.2 数据库基本术语 .......................................................................................................................57
5.3 检查 Web SQL 支持 .................................................................................................................58
5.4 使用数据库 ...............................................................................................................................58
5.5 使用事务 ...................................................................................................................................60
5.6 使用开发者工具查看 Web SQL ..............................................................................................65
5.7 浏览器支持和使用建议 ...........................................................................................................66
第 6 章 使用库简化客户端存储 ...................................................................................................67
6.1“使用库,卢克……” .................................................................................................................67
6.2 使用 Lockr ................................................................................................................................67
6.3 使用 Dexie 简化 IndexedDB ....................................................................................................72
6.4 使用 localForage .......................................................................................................................78
6.5 更多选择 ...................................................................................................................................81
第 7 章 构建示例应用程序 ............................................................................................................83
7.1 让我们构建真实的应用程序! ...............................................................................................83
7.2 示例数据 ...................................................................................................................................84
7.3 应用程序 ...................................................................................................................................87
7.4 代码 ...........................................................................................................................................88
7.5 总结 ...........................................................................................................................................93
作者介绍................................................................................................................................................94
封面介绍................................................................................................................................................94


**** Hidden Message *****

skytulip 发表于 2022-8-21 01:08:24

啥也不说了,感谢楼主分享哇!

taipingyang2021 发表于 2022-8-21 04:29:01

啥也不说了,感谢楼主分享哇!

randy_1981 发表于 2022-8-21 07:25:38

啥也不说了,感谢楼主分享哇!

daoxingwudao 发表于 2022-8-21 09:46:35

啥也不说了,感谢楼主分享哇!

neun 发表于 2022-8-21 21:41:44

啥也不说了,感谢楼主分享哇!

zeasdale 发表于 2022-8-22 16:48:48

回的人少,我来小顶一下

hgzhou6 发表于 2022-8-23 07:50:03

啥也不说了,感谢楼主分享哇!

李才哥 发表于 2022-8-23 08:15:14

啥也不说了,感谢楼主分享哇!

15207148740 发表于 2022-8-23 09:06:37

啥也不说了,感谢楼主分享哇!
页: [1] 2
查看完整版本: TL 客户端存储技术