iCal: How do I delete an .ics file that has subscriptions?

被刻印的时光 ゝ 提交于 2019-12-12 03:24:36

问题


I have a PHP generated .ics calendar file on my server.

Several clients are subscribed to this calendar, e.g. using Google Calendar and Apple iCal/Calendar.

I want to delete the calendar and all events in it, in a way that it is also removed from the clients.

It seems that if I delete the .ics file, the events will still exist in the clients.

Should I keep an empty .ics file? Or is there some syntax I should use to instruct the clients that the calendar is no longer to be used?


回答1:


In HTTP the way to tell clients that the resource no longer exists, is to emit a 404 Not Found or a 410 Gone status code.

However, even though this is the 'correct way', in practice most clients won't automatically do something with this information.

I do think that this is the 'most correct' though, because calendar clients do tend to add a 'warning' or 'error' icon to the calendar, signaling the user that something is wrong (so they can manually clean it up).

However, if you just want the events to disappear automatically, your only option is to publish a calendar with 0 events.



来源:https://stackoverflow.com/questions/32700940/ical-how-do-i-delete-an-ics-file-that-has-subscriptions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!