There's more...
Coping with encodings is not simple, but in the Unicode and distributed world we live in now, we cannot avoid it, so it's worth correctly understanding how (at least) the most popular encoding works and where they can (or must) be used.
Another interesting application of TNetEncoding.Base64 is related to the Data URI scheme (https://en.wikipedia.org/wiki/Data_URI_scheme). Using base64 and the Data URI scheme, you can embed images, scripts, and CSS directly into your HTML. This technique should be used carefully because, if the HTML changes but the image doesn't, using embedded images means that the browser cannot properly use the client cache and thus the pages download time increases.
Also, if you generate HTML content, you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access