Http

form submit

form sumbmint 请求后(文件下载类),确认请求是否已完成
https://stackoverflow.com/a/4168965/14602831、487
One possible solution uses JavaScript on the client.
The client algorithm:

  1. Generate a random unique token.
  2. Submit the download request, and include the token in a GET/POST field.
  3. Show the “waiting” indicator.
  4. Start a timer, and every second or so, look for a cookie named “fileDownloadToken” (or whatever you decide).
  5. If the cookie exists, and its value matches the token, hide the “waiting” indicator.

The server algorithm:

  1. Look for the GET/POST field in the request.
  2. If it has a non-empty value, drop a cookie (e.g. “fileDownloadToken”), and set its value to the token’s value.

在请求发出后,轮询一个cookie,接口在接受到请求后,设置这个cookie

Tools

协同数据修改 automerge

Conflict-Free Replicated Datatype
https://github.com/automerge/automerge
用于实现一个JSON数据的协同修改,常用于文档类,协作类
也可用于复杂任务编辑场景,可以有效降低多块区域数据来源的合并复杂度。