I'm searching for a solution to download the content of a canvas-element. The background: we have a clientside QR-Code-generator and up to now it is only possible to print this codes. Our customers wish to be able to save this codes, e.g. to attach them to their sales slip. Until now i only have a working solution for Google Chrome using an anchor-tag:

HTML Code:
<a href="data:image/octet-stream;base64,{base64-string}" class="btn" data-mimetype="image/jpeg" download="Kunden-Zufriedenheitsumfrage.jpeg">JPEG</a>
The problem is that Firefox ignores the 'download'-attribute and sets a wrong filename (first x letters of the base64-string + extension .part) and the Internet Explorer doesn't even know what to do (nothing happens).

Sure, it would be possible to give our customers the image-tag, so they could rightclick it and save the image over the context menu, but this isn't very intuitive.

Here a screenshot of the QR-Code-window: click