<p>If for example you follow the link:</p>

<p><code>data:application/octet-stream;base64,SGVsbG8=</code></p>

<p>The browser will prompt you to download a file consisting of the data held as base64 in the hyperlink itself.  Is there any way of suggesting a default name in the markup?  If not, is there a JavaScript solution?</p>

According to
RFC 2397
, no, there isn't.
Nor does there appear to be any
attribute
of the
```
<a>
```
element that you can use either.
However HTML5 has subsequently introduced the
```
download
```
attribute on the
```
<a>
```
element, although at the time of writing support is not universal (no MSIE support, for example)