Open ghobona opened 1 year ago
On the technical side (and AFAIK), a "cancel" operation will look like a premature TCP disconnect.
In other words: At the very least, a server can be sure that a client is no longer interested in response data if the client has closed the underlying TCP connection.
Now: this can happen willingly (a web browser changing the src
of an <img>
before the previous image was fully transferred) or unwillingly (a computer disconnecting from the network, or a network failure)
In our client we have implemented support for canceling requests for tiles no longer into view. As far as I know, the specification dosn't really need to say anything about this, it is part of the HTTP specification (EDIT: Actually it is a TCP Reset, not HTTP). But it is good to bring awareness of this.
Informative: How to do it in modern browsers
https://stackoverflow.com/questions/31061838/how-do-i-cancel-an-http-fetch-request
Informative: How to do it in web assembly
https://emscripten.org/docs/api_reference/emscripten.h.html#c.emscripten_async_wget2_abort -- for Emscripten / WebAsssembly
We decided that we could move it to OGC API common and recommend to add this to the OGC API common user guide.
During the 2022 Web Mapping Code Sprint there was a demonstration by @IvanSanchez of a map being moved and the client application sending 'cancel' requests to the server as the map was being moved. The client application was sending 'cancel' requests as the map was being moved. This is a useful capability because it notifies the server that the request that it is trying to fulfil is no longer needed and is being canceled.
The context was OGC API - Maps, however it might be that support for 'cancel' requests is relevant to other OGC API Standards.
Should OGC API - Maps support cancel operations?
If so, what should such a capability look like?