Why use data URI scheme?

后端 未结 5 588
太阳男子
太阳男子 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条回答
  •  Happy的楠姐
    2020-11-30 22:50

    A good use of Data URI is allowing the download of content that have been generated client side, without resorting to a server-side 'proxy'. Here are some example I can think of:

    • saving the output of a canvas element as an image.
    • offering download of a table as CSV
    • downloading output of any kind of online editor (text, drawing, CSS code ...etc)

提交回复
热议问题