开发者

Chrome - "Save As..." disabled in right click menu when using a "data" url

If you paste the following into the url bar in chrome and try to do right click-> save as... the save as.开发者_运维知识库.. is grayed out. Any way to stop this from being grayed out?

URL:

data:text/html;charset=utf-8,%3C%21DOCTYPE%20html%3E%0D%0A%3Chtml%20lang%3D%22en%22%3E%0D%0A%3Chead%3E%3Ctitle%3EEmbedded%20Window%3C%2Ftitle%3E%3C%2Fhead%3E%0D%0A%3Cbody%3E%3Ch1%3E42%3C%2Fh1%3E%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A%0D%0A


Data URLs are, at the moment, explicitly excluded from the list of savable URL schemes (see http://codesearch.google.com/#OAMlx_jo-ck/src/content/common/url_constants.cc&type=cs&l=11 for context). I'm not sure that that's absolutely correct, and if you file a bug at http://new.crbug.com/ I'd be happy to pass it on to the right team for review.

But, short answer: you can't save data:* URLs right now.


Make the data uri into an anchor tag (<a href="data:etc....</a>"). Then, change the mime type of the data uri to application/octet-stream and the browser mime map will open a save as box when you click the anchor tag.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜