I am linking to an .ics
file exported from Apple iCal in an HTML web page.
<a href="calendar.ics">
This link will open the calendar.ics
file as plain text in my browser (Chrome). I want automatic opening in Outlook or iCal or other calendar apps. What can I add to the link tag in order to produce the desired behavior? What about modifying the HTTP headers on .ics
files?
Any suggestions are appreciated!
If your calendar file is not static, you should consider the webcal://
protocol which Outlook and iCal will handle:
<a href="webcal://domain.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.