commit
a2e3930345
4 changed files with 51 additions and 12 deletions
@ -1,12 +1,25 @@ |
||||
# ushio-session |
||||
|
||||
Cloud Storage solution for frontend webpage development. |
||||
|
||||
[简体中文(推荐)](./zh.md) |
||||
|
||||
## 定位 |
||||
ushio-session是js-session的前身,内置于[iotcat/ushio-js](https://github.com/iotcat/ushio-js)。在使用[iotcat/fp](https://github.com/iotcat/fp)定位设备的基础上,前端用户可以像使用cookie一样使用session。session不依赖与cookie,使用服务端存储。因为这个特性,**session可以解决cookie所难以解决的跨域问题**。 |
||||
## Positioning |
||||
ushio-session is the predecessor of js-session, built in [iotcat/ushio-js](https://github.com/iotcat/ushio-js). On the basis of using [iotcat/fp](https://github.com/iotcat/fp) to locate the device, front-end users can use sessions like cookies. The session does not depend on cookies and uses server-side storage. Because of this feature, **session can solve cross-domain problems that cookies are difficult to solve**. |
||||
|
||||
|
||||
## 指令 |
||||
+ `session.get(key)`: 根据键名获取 |
||||
+ `session.set(key, value)`: 用键名和键值新建或更新一条session |
||||
+ `session.del(key)`: 根据键名删除session |
||||
## Instructions |
||||
+ `session.get(key)`: Get according to the key name |
||||
+ `session.set(key, value)`: Create or update a session with key name and key value |
||||
+ `session.del(key)`: delete session based on key name |
||||
|
||||
|
||||
## Application |
||||
ushio-session has now been widely used in the ushio website system. You have ushio-session support behind many of the services on the websites supported by Ushio. such as: |
||||
|
||||
- Cross-domain and cross-device music continues to play |
||||
- User management identification |
||||
- Language preference record |
||||
- Video playback position is recorded across devices |
||||
- User ID management |
||||
- etc.. |
||||
|
@ -0,0 +1,26 @@ |
||||
# ushio-session |
||||
|
||||
网页前端的便捷云存储方案。 |
||||
|
||||
[English Version](./README.md) |
||||
|
||||
## 定位 |
||||
ushio-session是js-session的前身,如今内置于[iotcat/ushio-js](https://github.com/iotcat/ushio-js)。在使用[iotcat/fp](https://github.com/iotcat/fp)定位设备的基础上,前端用户可以像使用cookie一样使用session。session不依赖与cookie,使用服务端存储。因为这个特性,**session可以解决cookie所难以解决的跨域问题**。 |
||||
|
||||
|
||||
## 指令 |
||||
+ `session.get(key)`: 根据键名获取 |
||||
+ `session.set(key, value)`: 用键名和键值新建或更新一条session |
||||
+ `session.del(key)`: 根据键名删除session |
||||
|
||||
|
||||
## 应用 |
||||
ushio-session如今已被广泛应用在ushio网站系统中。你在Ushio所支持网站的许多服务背后均有ushio-session的支持。比如: |
||||
|
||||
- 跨域跨设备音乐继续播放 |
||||
- 用户管理识别 |
||||
- 语言偏好记录 |
||||
- 视频播放位置跨设备记录 |
||||
- 用户识别码管理 |
||||
- 等等.. |
||||
|
Loading…
Reference in new issue