I'm working with a webapp that has a link to download an xml file. As in, click the link, browser downloads the file. The file downloads as expected from Chrome/FF/Safari on my desktop. It also works from FF when I spoof my User Agent to be an iPad. But when clicked from Mobile Safari on an iPad, the link navigates the browser to a new page and tries to display the xml as html, without downloading anything.
Currently the HTTP Response contains the following headers:
Content-Disposition:attachment; filename="myFile.xml"
Content-Type:application/octet-stream;charset=UTF-8
It's my understanding that these two HTTP headers should tell the browser to download, rather then display, the response stream.
Does someone know why this doesn't work in Mobile Safari, running on an iPad?