title: Alternative for Html Anchor tag `download` attribute which doesn't work in Internet Explorer
body: <p>I'm trying to fetch some data by making an http request and <strong>download that data by writing it into a file</strong>. </p>
  
  <p><strong>Here's my code</strong> : </p>
  
  <pre><code>var data = {"foo": "bar"}; // I got this data from an http request
  var element = document.createElement('a');
  element.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(data));
  element.setAttribute('download', filename);
  element.style.display = 'none';
  document.body.appendChild(element);
  element.click();
  document.body.removeChild(element);
  </code></pre>
  
  <p>But , Looks like <strong>IE doesn't support download attribute</strong>. This is working fine in Chrome and Firefox. I've tried downloading using <strong>Blob</strong> and all the solutions suggested in Google, but nothing helped. 
  Can anybody suggest a better alternative to achieve this in <strong>IE</strong> please ?</p>