I am writing an HTML5 page which needs to have all of it's support scripts/sty开发者_开发技巧les/images/data inlined into the html. (I know it's not good web design, but that's the way it needs to be.)
All the media I inline are base64-encoded strings with their mime-types. For the images I display, making an image with a src containing the mime-type and string seems to be fine.
For non-image/text media however, is there a way to access that data from the html? I've tried making a link with an href containing the string, but for long files the string get truncated in FF/Chrome, and does not work at all in IE 7/8/9.
Thanks in advance!
For non-image/text media however, is there a way to access that data from the html?
Sadly, not really, no. IE has heavy limitations on data:
URLs. They are not supported at all in IE7, and even in IE8 and 9 there are size and other limits. (See the linked MSDN page.)
精彩评论