Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
562 views
in Technique[技术] by (71.8m points)

internet explorer - How can I make a link in IE using base64 encoding method?

I am generating a base64 gif on the fly and am trying to make a link to a new page to open a full size version of the gif. This works in chrome, but in IE, only the img thumbnail shows. When someone clicks on the link in IE, a blank page opens.

Any thoughts?

Thanks

Matt

echo '<a href="data:image/gif;base64,'. $data. '" target=_blank>';
echo '<img src="data:image/gif;base64,'. $data . '" width="200"/></a>';
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

According to this you cannot use data uri for navigation in IE.

  • Internet Explorer through version 7 (approximately 5% of web traffic as of September 2011), lacks support. However this can be overcome by serving browser specific content.[6]
  • Internet Explorer 8 limits data URIs to a maximum length of 32 KB. (Internet Explorer 9 does not have this limitation)[4][3]
  • In IE 8 and 9 data URIs can only be used for images, but not for navigation or Javascript generated file downloads. [7]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...