Just copying what I said in the other thread: there actually is a standard for that already: https://datatracker.ietf.org/doc/html/rfc9078
Sadly, it seems it doesn't have broad adoption: https://bugzilla.mozilla.org/show_bug.cgi?id=1724363