5

I'm trying to understand how iCal feeds & iCalendar clients deal with a large number of events in the past & in the future. Is there any way in which iCalendar clients can communicate a date-range to an iCalendar feed -- so that events outside the current date range being shown to the user are not needlessly sent down the wire.

If not, how does the iCalendar feed decide which date ranges to send the events for? If one keeps sending all the data down the wire, at some point it's going to become unmanageable for, both, the feed & the client. If the feed doesn't send data far back in the past & far out in the future, how do clients handle these 'holes' in the data?

Auberon Vacher
  • 4,655
  • 1
  • 24
  • 36
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
  • CalDAV is intended to solve this problem, as well as a ton of other issues with plain feeds. – Evert Oct 29 '12 at 11:55
  • How exactly does CalDAV solve this problem? Also, do major iCal clients (Outlook, Google Calendar & Apple iCal) support CalDAV? – Saurabh Nanda Nov 03 '12 at 04:31
  • 1
    CalDAV allows for date-ranges, and more importantly.. when a single event gets updated, the entire calendar doesn't have to get downloaded again. To see which clients support CalDAV, do 5 minutes of googling. – Evert Nov 03 '12 at 13:50

1 Answers1

4

you need to differentiate between the application side which is the event feed and icalendar (rfc5545) which is "just" the standard for

data format for representing and exchanging calendaring and scheduling information

in other words from the icalendar file format will only carry whatever information the server has been programmed to put in it. There is no predefined behaviour for calendar feeds in rfc5545.

for events feeds if you do not control the server, it would be safe to assume that the feed is only showing upcoming events and your question could be related to : How Do I Fetch All Old Items on an RSS Feed?

about how to keep track of the history if your users have a use case for going back in tie. in this case the only option would be for your client to keep a history and compare new .ics with the old one to display the most comprehensive history.

however if you also own the server / feed side you could decide of specific REST API to offer more flexibility to the client side (i.e. specify date range for the feed)

Community
  • 1
  • 1
Auberon Vacher
  • 4,655
  • 1
  • 24
  • 36
  • Thanks, I suspected that there is no _standard_ for communicating date ranges between clients & servers. In my case, I own the server, not the client (my webapp needs to export in iCalendar). I'm just wondering, how to decide the date range. Is publishing only upcoming events in the calendar a safe bet? – Saurabh Nanda Sep 30 '12 at 19:59
  • 1
    focusing on upcoming does seem like a safe bet. if you worry about client use cases, you could always provide a fall back url giving a +/- 6mo window around current day. – Auberon Vacher Oct 01 '12 at 11:51