title: Internet Explorer 8 and vCalendar/ICS files
body: <p>I'm trying to dynamically generate a vCal file using Javascript and everything is working fine until i try in IE8. In IE8 the browser tries to open the calendar file in the request bar instead of downloading. This is a sample of the code i use</p>
  
  <pre><code>var iCal = 
      "BEGIN:VCALENDAR\n" +
      "PRODID:-//Microsoft Corporation//Outlook 14.0 MIMEDIR//EN\n" +
      "METHOD:PUBLISH\n" +
      "BEGIN:VEVENT\n" +
      "ATTENDEE;CN=\""+locationAlias+"\";CUTYPE=RESOURCE;ROLE=NON-PARTICIPANT;RSVP=TRUE:mailto:"+locationEmail+"\n" +
      "DTEND;TZID=\"GMT Standard Time\":"+dend+"\n" +
      "DTSTART;TZID=\"GMT Standard Time\":"+dstart+"\n" +
      "LOCATION:"+locationName+"\n" +
      "ORGANIZER;CN=\"&lt;someuser&gt;\":mailto:&lt;somemailto&gt;\n" +
      "END:VEVENT\n" +
      "END:VCALENDAR";
  </code></pre>
  
  <p>return iCal;</p>
  
  <p>I then try to open the calendar file using the following;</p>
  
  <pre><code>window.open( "data:text/calendar;charset=utf8," + escape( iCal) );
  </code></pre>
  
  <p>Any suggestions as to why IE8 cannot recognize the file?</p>