title: How to force the filename extension of a downloaded gzipped data URI?
body: <p>I have a GZipped JavaScript file which I am encoding with a data:URI.</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;a href="data:application/x-gzip;base64,FOO"&gt;My Javascript File&lt;/a&gt;
  </code></pre>
  
  <p>When the user right-clicks and saves this file (in Chrome) I would like the resulting file's name to be <code>download.js.gz</code>. This way when the user double clicks this file (in Mac OS X), it gets decompressed and renamed correctly to <code>download.js</code>, and they can view the contents easily.</p>
  
  <p>The problem is that when I use the content type <code>text/javascript</code> (or <code>application/x-javascript</code>), the file gets saved as <code>download.js</code>. And when I use the content type <code>application/x-gzip</code>, the file gets saved as <code>download.gz</code>.</p>
  
  <p>Is there any way to get the file to be saved as <code>.js.gz</code>?</p>
  
  <p>Here's a working example of both links: <a href="http://jsfiddle.net/xYm8w/3/" rel="nofollow">http://jsfiddle.net/xYm8w/3/</a></p>
  
  <p>The file must be a data uri and not a link to an actual file. I tried changing the text between the <code>&lt;a&gt;</code> tags, but it doesn't affect anything at all.</p>