Why use data URI scheme?

后端 未结 5 594
太阳男子
太阳男子 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 22:49

    Mainly I find use of this if I can't (for some reason) use CSS sprites and I don't want to download every little single image that I will use for styling.

    Or for some reason you don't want anyone to link the image from external page. This can be achieved by other methodologies but embedding works as well.

    Otherwise, personally I wouldn't encode large images as photos. It's better to have your media at a different server. A server that can lack all of the web-server related software installed. Simply delivering media. Much better use of resources.

提交回复
热议问题