Questions About SSE and Fetch Behavior in Datastar #303
-
Datastar looks very interesting and may be a great fit for real-time device management. However, I have a few questions about the SSE concept and client-server interactions since I need to implement a new plugin for our server:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The Datastar library is frontend only. Each fetch results in an SSE connection. Whether the connection is persistent or not depends entirely on the backend implementation.
They are
SSE has many advantages over WebSockets. You’re welcome to create your own custom Datastar plugin, but WebSockets is unlikely to ever be a first-party thing. Please read Streaming Backend for more context. |
Beta Was this translation helpful? Give feedback.
The Datastar library is frontend only. Each fetch results in an SSE connection. Whether the connection is persistent or not depends entirely on the backend implementation.
They are
fetch
requests to the URL of your choosing. The backend API i…