In new browsers (IE 10, FF 20, Chrome 26, Safari 6, Opera 15), you can create a Blob and save it to a file using window.URL.createObjectURL .
Demo , Link :
objectURL = window.URL.createObjectURL(blob);
- Where
Blob is a File or Blob object to create a URL object for. objectURL is the generated URL of the object. All contents of the specified file are represented by the text of the URL. Then it can be used in window.open .
Example a Blob :
var parts = ["<p class=\"paragraph\"><a id=\"link\">hey!<\/a><\/p>"]; new Blob(parts, { "type" : "text\/html" });
To display the current Blob in Chrome, follow these steps in the address bar:
chrome:
Radek source share