Short Summary
We can configure a custom HTTP method, CHECK (or EXISTANCE or another more purpose-specific name), and set up caching/proxying for it.
The RESTful API - architectural style
Roy Fielding invented and proposed RESTful API, a form of Software 'architectural style,' not only for clear communication between nodes but also for the overall performance of the web. This is synonymous with 'designing thoroughly with RESTful API' and 'seeking ways to maximize web performance.'
Let's try to design RESTfully. GET signifies requesting resource data and should not be used for metadata like resource existence or view counts. These purposes are distinctly different; therefore, HEAD is more suitable.
However, HEAD has the limitation of not using the HTTP response body.
Because of this, @Andre D suggested using 404 Not Found. However, 4xx errors are status codes used when there is Responsibility on the Client Request. Simply put, if the result of checking resource existence is 'yes' or 'no', as intended by the designer, you should not send a 404.
To obtain 'resource metadata' while also receiving a 2xx value and a true/false ("yes" or "no") response, and to satisfy 'RESTful API', it should have the characteristics of both GET (resource) and HEAD (retrieving resource of).
Such an HTTP method was not predicted to be necessary by Roy Fielding at the time of design, so there is no corresponding method.
However, the father of the web even anticipated things he couldn't foresee, hence 'custom HTTP method' is the solution. The solution is simple. Like HEAD, retrieving Metadata but also possessing an HTTP response body like GET, we can create a CHECK (or EXISTANCE) HTTP method.
REST API for Performance Enhancement
Now, why is this structure directly linked to performance? It's simple. It's because caching and proxying can be beautifully structured. Caching and proxying are known as the most overwhelmingly powerful methods for addressing the performance of all requests, including CDN (I think the growth of Redis is an example).
Nowadays, with Nginx's proxy buffering technology or lua scripts, various requests can be bundled into 'identical queries' for an API instance and cached. Even if the API response time is a dreadful 1s, if resource check is performed and cached, it can provide clients with a more than 40 times improved response time of approximately 15ms for the second identical request - a preflight-level speed. The remarkable and satisfying point of this structure is 'it should not have any impact on existing APIs', meaning a beautiful establishment of respect for legacy APIs.
Even for internal or external extensions, proxying (whether forward or reverse) allows for flexible response since the concerns of managing or sharing the original resources for caching are separated.
More Standards: About WebDAV
Still, one problem remains.
If 'I', as well as numerous other developers and those who will join in the future, do not use an agreed-upon language, the compatibility issues when each Vendor uses custom HTTP methods and the steep increase in pointless learning costs are certain.
In other words, we need more and detailed 'standards'.
In fact, a good example is the existence of the COPY method.
This is the COPY method defined by WebDAV (Web Standard Extension) due to a similar question.
It has the nature of POST, which creates a new resource, but does not require a request body, yet refers to 'an existing resource', showing characteristics of PUT or PATCH (however, PUT, PATCH are requests for an existing resource, not a new one).
Therefore, COPY was born as it satisfies neither. This method is defined in WebDAV but is treated as a Custom Http method.
WebDAV is written as an rfc document, positioned at the very top among standard authorities, and, as evident from the name 'Distributed', continues the fundamental philosophy of the Web.
Therefore, we should choose RFC > WebDAV RFC > each language's Standard Spec (JPA, ECMAScript Spec, etc.) > not a standard but as intuitive as possible and short, popular words (COPY, CHECK).
Content-Length
header value, which is an important information in a response of a HEAD request. Unless there is some other more optimized server-side approach, the only benefit is that bandwidth is saved and the client doesn't have to parse the response body. So basically the optimization gains depend on both server and client implementations. – Anoxia