开发者

Inline base64 encoded link not working in Firefox

I have this link:

<a href="data:application/pdf;base64,JVBERi0x...KJSVFT0YK">PDF</a>

In Safari on MacOsX, clicking the link instantly opens the PDF. In Firefox 3.6.2, it doesn't. When I choose Download, it saves it as "u7WYuJME.pdf(2).part", which is a valid PDF file. When I choose "Open with Preview", it down开发者_如何学JAVAloads it but does not open it. Can I change something so that Firefox opens it correctly?


Firefox is like that for any data, not only to pdf

See a browser support chart here (the site itself is not related, but it explains your problem)

Firefox 3.0+

Filename is random alphanumeric with ".part" extension

Firefox generates filenames such as a5sZQRsx.zip.part, and Safari isn't much better with just Unknown. Sadly there is no pure Javascript solution to this. However...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜