3 ms·
Interesting idea. It would also need to be the case that the content has no moved either so a 302 is not appropriate. I don't necessarily agree that you should
by corebit 7y ago
Interesting idea. It would also need to be the case that the content has no moved either so a 302 is not appropriate.
I don't necessarily agree that you should be certain not to reuse the URI. Why do you think that should be the case?
- justusthane 7y agoBecause the response will be cached by the browser for a period of time.
- dzek69 7y agoHTTP RFC https://tools.ietf.org/html/rfc7231#section-6.5.9 https://tools.ietf.org/html/rfc7231#section-6.5.9
- Sharlin 7y agoIt depends, really, but I seem to recall that at least some browsers ignore cache headers on 410 responses and always cache them ”forever”, which is arguably allowed by the spec. As a cautionary example, I once was trying to be fancy and used 410 to denote the expiration of a session-bound resource (actually an API endpoint). That would have been fine had the resource URI been unique across sessions… but it wasn’t, so after one session expiration some browsers naturally assumed that the endpoint URI isn’t going to come back even after starting a new session. Should have used 404 or 403 instead.