So, I need to improve the format of payloads sent by the Web Push API (previously it was used only internally by the webapp so there is like 95% coupling between the format and the JS code that handles it)
The most annoying, frustrating thing about this is trying to do string localization within a service worker (since I do not want to send such strings pre-formatted in the payload anymore)
of cource it should not be bigger than 4K (for browser ).
Since the area where the client displays the notification is small, I think that the end of the text in the notification data should be omitted.
it should be shortened by byte unit, aiming at the boundary of the code point because the number of bytes consumed varies greatly depending on the type of character.