I have an Exp Eng template that generate a .csv format file using a channel tag. I also insert the headers of the file using php, as shown below (those are the fist lines of the template). In Firefox the file downloads with a simple click on a link to the template and everything seems fine.
<?php
header("content-type: text/csv");
header("content-disposition: attachment; filename=filename.csv");
header("Pragma: no-cache");
header("Cache-Control: private");
header("Expires: 0");
It all seems to be working but Safari on the Mac will insist on downloading it with an .html extension as in 'filename.csv.html'. I've researched this on the Internet at many say it is just a peculiarity with Safari. But another person accessing the file says it happens no matter what browser they are using.
In Exp Eng I have the template settings as an "html" template. The other choices don't seem to work, like RSS/feed, and static would disable the channel tag. Any ideas on how to get around this problem?
Thanks, Bob.