18

I have a calendar feed (.ics) available from my application, but it's quite large since it includes over 4,000 events. Is there a standard or best practice when it comes to specifying how many events get downloaded or how far back or forward the calendar should go?

My main question though, is how to configure or set an update limit on the calendar so say a user is subscribing to the calendar using Outlook that it's only updated every few hours. I currently have my feed cached for a few hours, but if I could have Outlook or whatever client the user is using only check for updates every few hours that would be ideal.

Michael DeLorenzo
  • 1,110
  • 2
  • 12
  • 25

2 Answers2

35

To only check for updates hourly (for example) use this in your VCALENDAR file:

X-PUBLISHED-TTL:PT1H

I gleaned this information from one of the Microsoft Protocol documents [MS-OXCICAL]: iCalendar to Appointment Object Conversion Protocol Specification (download the linked PDF)

2.1.3.1.1.15 Property: X-PUBLISHED-TTL

RFC Reference: N/A

Number of Instances Allowed: 0, 1

Format: Duration ([RFC2445] section 4.3.6)

Brief Description: Specifies a suggested iCalendar file download frequency for clients and servers with sync capabilities.

Importing to Calendar objects
This property SHOULD<32> be ignored.

Exporting from Calendar objects
If this iCalendar is being automatically published to a remote location at regular intervals, this property SHOULD<33> be set to that interval with a minimum granularity of minutes.

Community
  • 1
  • 1
Duncan Smart
  • 31,172
  • 10
  • 68
  • 70
  • 3
    Please note that the 'Send/receive all' option in Outlook respects the X-PUBLISHED-TTL header. When this header is set to for example 1 hour, clicking 'Send/receive all' does **not** trigger a refresh of the iCalendar feed when it was downloaded less than an hour ago. – marcok Jun 27 '13 at 11:59
  • 1
    It only respects that header if, when you added the internet calendar, you've checked the box in Advanced options to use the publisher's recommended refresh rate. – richard Mar 03 '18 at 12:04
11

RFC 7986 introduced a new REFRESH-INTERVAL property:

https://www.rfc-editor.org/rfc/rfc7986#section-5.7

I don't know if this is supported by any clients, but the RFC was authored by Apple, so I assume they have some interest in this.

Community
  • 1
  • 1