From 87966c68f12492660a626f2d162e8c69a1b8aa10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=93=E5=96=B5=E9=85=B1?= Date: Tue, 8 Sep 2020 17:08:06 +0800 Subject: [PATCH] Update README.md --- README.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 25bba34..e759879 100644 --- a/README.md +++ b/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..