I'm using the javascript/jquery trick where you convert your string to a data URI, set the href of a link to it, then trigger the link click to initiate a direct download of the string as a file.
This works fine in Chrome, but in Safari, it redirects the page to a non-html page that contains the downloaded content. Is it possible to prevent this behaviour and have it act like it does in Chrome (direct file download)?