Saving text in a local file in Internet Explorer 10

IE 10 and 11 use a distinct syntax for downloading or saving blobs to the client machine. Once you’ve created a blob, use:

window.navigator.msSaveBlob(blob, 'file.txt'); 

or

window.navigator.msSaveOrOpenBlob(blob, 'file.txt');

to trigger the file save or file save/open dialog.

For more info, see http://msdn.microsoft.com/en-us/library/ie/hh673542(v=vs.85).aspx

Leave a Comment