Google calendar supports subscribing to ical files, where it will occasionally poll them for updates. This can either by selecting "Add Calendar > From URL" in Settings and giving a link to an ical file with protocols http://
, https://
, or webcal://
, or by visiting the URL https://calendar.google.com/calendar/r?cid=webcal://«link»
. What is the longest URL that can be subscribed to?
1 Answer
The longest URL that can be subscribed to is 256 UTF-16 code points, including the protocol (e.g. webcal://
). This translates to 256 bytes when using ASCII, but when attempting to pack as much data as possible in the URL, encoding techniques such as base32768 can fit almost 500 bytes in a URL.
When adding a calendar URL longer than 256 UTF-16 code points, the "From URL" page in Settings just silently fails, and the /r?cid=
url prompts the user to add the calendar, but just silently fails when clicking Add.