blog
blog copied to clipboard
无题.小知识点
目录
Data URLs
data urls ???????????? documents ?????? files
- URLs ??? scheme
data:
????????? - ?????? content creators???????????????????????? documents ????????? small files inline?????????????????????
????????????????????????data:[<mediatype>][;base64],data
-
data:
?????? - MIME type????????????
text/plain;charset=US-ASCII
-
base64
- ??????????????? textual?????????????????????????????????????????????
- ??????????????? non-textual??????????????????
base64
???????????? base64-encoded ??????????????????
- data
eg.
-
data:,Hello%2C%20World!
-
data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D
-
data:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E
-
data:text/html,<script>alert('hi');</script>