I want HTML link to .ics file to open in calendar app when clicked, currently opens file as plain text. Suggestions?
If your calendar file is not static, you should consider the webcal://
protocol, which Outlook and iCal will handle:
<a href="webcal://example.com/path/calendar.ics">
Rather than downloading a one-time file, the attendees' calendar programs will periodically poll for updates to your calendar. This will let their calendars add new events and update changed events to match your published list.
If your site is built on Linux like mine you can simply add a line to your htaccess file to make it open as a download instead of a text page.
add this to your htaccess file:
AddType text/calendar .ics