Update README.md

pull/3/head
呓喵酱 4 years ago committed by GitHub
parent 04f2609ce9
commit 87966c68f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      README.md

@ -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..

Loading…
Cancel
Save