Henry
Henry

Reputation: 32915

Questions about generating an iCal feed

Other than providing an URL to request the most recent iCal feed, anything I need to pay special attention to generating an iCal feed??

How to indicate if ics file has been updated or not? http header LAST-MODIFIED?

What to do if the iCal file is huge? Shall I limit it to next n events?

How about past events, shall they be in the feed?

What do most calendar apps do if events are deleted or modified in the feed?

Thanks!

Upvotes: 10

Views: 2566

Answers (1)

Auberon Vacher
Auberon Vacher

Reputation: 4785

Some pointers to try to help you as to my knowledge there is no standard way to handle ical feed as the "client" side is free to pull data with the frequency it wishes and display.

For instance Outlook has a custom property for this though "X-PUBLISHED-TTL:", Apple ical let's you set this and Google does not offer an option.

Regarding things to consider:

  1. using the unofficial URI webcal,
  2. not to have the property "METHOD" as then ical is only viewed as a carrier of information not a scheduler support,
  3. to notify about event changes you should update the sequence id, but looking at other issues you may want to consider updating the DTSTAMP of the given event to the timestamp you've update your event (though not standard compliant) or having a tag LAST-MODIFIED, though not guaranteed the ical feed reader will actually parse this tag.

If your file is huge you can of course limit to the next n events or give a time horizon but can you control what the users want to do with the received feed? Could they want to check something in the future and be surprised not to see anything they know should be there?

Same with past events, often removed to reduce size of the .ics but often users need/want to see when a specific event happened in the past.

Calendar apps when dealing with events deletion can either remove them from .ics if not scheduling is happening or they can follow itip and have a request:cancel propery.

Hope this helps.

Upvotes: 8

Related Questions