I am using the following Visualforce Page as an endpoint that generates a CSV file using POST data that it is handed. The following page definition works great for everything but IE8 (Internet Explorer 8):
<apex:page contentType="text/csv#{!fileName}.csv"
showHeader="false" sidebar="false" standardStylesheets="false">
<apex:outputText value="{!input}" escape="false"/>
</apex:page>
with controller
public with sharing class ExportController {
// Controller for ExportData.page,
// which expects to be handed the following POST variables:
// @inputdata(string) data to export (i.e. in CSV format)
// @filename(string) name of the file to export, e.g. 'AccountData'
public transient String input { public get; private set; }
public transient String fileName { public get; private set; }
public ExportController() {
Map<String,String> params = ApexPages.currentPage().getParameters();
// We expect to be handed POST variables called 'inputdata' and 'filename'
fileName = params.get('filename');
if (fileName == null) fileName = 'Data';
input = params.get('inputdata');
if (input == null) input = 'No data provided.';
}
}
In IE8, the error I get is:
Internet Explorer cannot download ExportData from nexus.na12.visual.force.com. Interent Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
I know that the page is not unavailable, however, because I am getting debug logs from it using Developer Console. So it must be an IE8 file type handling issue of some sort.