Data URI doesn't work with IE

前端 未结 2 804
暗喜
暗喜 2020-12-11 20:56

Im trying to dynamically create a CSV file using javascript that the user can download. This only has to work in IE.

The html the javascript generates looks somethi

2条回答
  •  再見小時候
    2020-12-11 21:17

    Internet Explorer 10 doesn't support the data protocol on the a element. Per the documentation, the only supported elements/attributes are the following:

    • object (images only)
    • img
    • input type=image
    • link
    • CSS declarations that accept a URL, such as background, backgroundImage, and so on.

    You should know that what you're attempting to do smells like a phishing attempt; for this reason you shouldn't expect browsers to support this pattern. You can read more about data-uri phishing in the paper Phishing by data URI.

提交回复
热议问题