Why use data URI scheme?

后端 未结 5 584
太阳男子
太阳男子 2020-11-30 22:37

Basically the question is in the title.

Many people have had the question stackoverflow of how to create a data URI and problems therein.

My question is

5条回答
  •  粉色の甜心
    2020-11-30 23:12

    I have used the data URI scheme in several (C++, Python) command line applications to generate reports which include data plots.

    Having a single file is quite convenient to send the reports by email (or move them around in general). Compared to PDF I did not need an additional library (other than a base64 encoding routine) and I don't need to take care of page breaks (and I almost never need to print these reports). I usually don't put these reports on a web server, just view them on the local filesystem with a browser.

提交回复
热议问题