23

I would like for Google Calendar to open URIs with the Webcal (wikipedia) scheme (delivering ICS files), similar to how Gmail can be set to be the default handler for mailto: links.

More specifically, I would like for Google Calendar to import them to my primary calendar. (You can manually import an ICS file in Google Calendar by clicking the small arrow next to Other calendars, choosing Import calendar from the drop-down list, navigating to the .ICS file, and choosing Import.)

I don't know if this is possible, but I'm hoping somebody will have a great idea.

4 Answers 4

16

In newer versions of Chromium/Chrome, you need to login to google calendar and click the overlapped diamond icon in the address bar.

Screenshot

Select "Use Google Calendar", then click done. This will register google calendar as a handler for webcal links.

Note:
You may need to set Chromium to allow sites to become default protocol handlers. You can do so via :

  1. Advanced settings -> Privacy, Content Settings -> Handlers
  2. Select "Allow sites to ask to become default handlers for protocols"
1
14

Chromium

The chromium browser offers this option when you first log in to Google Calendar:

Google Calendar in Chromium browser offers to handle webcal protocols

If you have accidentally answered with No on this question, you can press the Wrench toolbar button and go to Settings. Click Show advanced settings, find Content settings... (just after Privacy header) and find the Manage handlers button. Click the X next to the ignored protocol you wish to delete. Alternatively, you can type in protocol handlers search box in Chromium settings.See the screenshot below.

Undo ignore protocol handler in Chromium browser

Firefox

I found this post on stackexchange which explains how to achieve the same thing in Firefox, but this doesn't work for me on firefox 12 and 15: this works for me if I disable the Never save history option (Private browsing mode):

Go to Google Calendar's site and press Ctrl+Shift+K.

Paste this after the > sign:

navigator.registerProtocolHandler("webcal","https://www.google.com/calendar/render?cid=%s","Google Calendar");

Press the enter key and click the Add application button which should appear below the toolbar.

Firefox console

Firefox accept protocol hanlder

You may need to toggle the gecko.handlerService.allowRegisterFromDifferentHost option in about:config to true before trying this (if google redirects you to a local google domain). Remember to return it to false after calling the registerProtocolHandler function because malicious sites may exploit this. See details here.

7
  • Personally, I'm looking for the option for Chrome/Chromium. In case one did not react properly on first log-in, are there options open?
    – Rasmus
    Sep 3, 2012 at 21:11
  • Yes, you can delete an ignored protocol handler. See my edited answer!
    – jeremija
    Sep 4, 2012 at 6:57
  • 1
    I found that I need to put javascript:navigator.registerProtocolHandler("webcal","https://www.google.com/calendar/render?cid=%s","Google Calendar"); in the location bar in Google Chrome to get it to work. Nov 30, 2012 at 12:00
  • I tried the Firefox solution but when clicking on a .ics file i get the pop up to store or open with gedit (as it's a VCS/ICS file) any tip on this? btw superuser.com/a/442494/216033 mention a similar solution.
    – TiloBunt
    Aug 28, 2013 at 5:35
  • here a test ics (found it during my googling for a solutions) calendar-a-googleproductforums-com.googlegroups.com/attach/…
    – TiloBunt
    Aug 28, 2013 at 5:40
4

As of Jan 2020 I managed to solve this for Firefox by doing the following:

  • about:config - switch dom.registerContentHandler.enabled to true;
  • open Google calendar;
  • press Ctrl+Shift+K to open console;
  • copy the following code, paste it into the console and press Enter:

    javascript:window.navigator.registerProtocolHandler("webcal","https://calendar.google.com/calendar/r?cid=%s","Google Calendar");

After these steps, you should see a window-width stripe under the address bar asking you if you want to set Google calendar as a default webcal handler.

Before all that, I tried to use the master Yoda's solution but it didn't work - anyway, cheers, it inspired me to look closer at the about:config entries and to discover this method.

1

Since I came across the same question as the OP and things have changed since the accepted answer was posted, I thought I'd share my findings. The following instructions are mainly for Firefox, but apart from little differences they should work in Chrome, too.

[2019-03-08] Update: reflect new Firefox behavior

Because using

    javascript:window.navigator.registerProtocolHandler("webcal","https://calendar.google.com/calendar/r?cid=%s","Google Calendar");

at Firefox's console results in a

SecurityError: Permission denied to add https://www.google.com/calendar/render?cid=%s as a protocol handler

nowadays, here's the new way to still "make it happen":

  1. Navigate to about:config, confirming the risk by clicking the button.
  2. Type webcal, filtering the list to items of type gecko.handlerService.schemes.webcal.[...].
  3. Click the Edit button at the right of your chosen [...].name item (since 30 Boxes was abandoned with Firefox 67, I opted for [...].0.name)
  4. Type in your desired name, e. g. Google Calendar and click Save.
  5. Click the Edit button of your corresponding [...].uriTemplate item, i. e. the one just below your edited one.
  6. Paste the URL https://calendar.google.com/calendar/r?cid=%s and click Save.
  7. Go to Firefox's options for associated applications by consecutively clicking , ⚙ Options, ⚙ General menu options and then scrolling down to the Applications paragraph.
  8. Search the list for webcal by either typing it into the search box just above the list or via scrolling.
  9. Click the drop-down at the entry's right half and select Use Google Calendar (or whatever name you chose at instruction #4).

Test calendars: https://www.webcal.fi/en/calendars.php

HTH. If not, just leave a comment below.

4
  • Followed all steps but still doesn't work for me on FF 50.1.0 / Ubuntu x64. All is as you said but ics still invokes dialog with content handling (save or run app). I've tried navigator.registerContentHandler method but still no results, URI/gcal is not being registered for mime type: text/calendar
    – b1r3k
    Jan 16, 2017 at 13:14
  • 1
    Sorry, but it seems that either Google or Mozilla changed something and it therefore doesn't work at the moment. Though, you can still manually add an entry for gecko.handlerService.schemes.webcal.X.name and gecko.handlerService.schemes.webcal.X.uriTemplate (where X is a number higher than the highest current one) within the about:config URL. afterwards, you can continue with instruction #5.
    – Yoda
    Jan 17, 2017 at 7:19
  • I just tried this on latest Google Chrome with no luck. I could get the handler to register, but no luck making an ICS file load into Google Cal with that handler registered. May 1, 2018 at 16:38
  • @CraigLambie First off, it's pretty sad finding my answer being "-1ed" by unhappy Chrome users. Secondly, I never said "instructions work in Chrome, too". Instead, I clearly stated: "apart from little differences they should work in Chrome"! Lastly, since I won't ever use Chrome, I simply don't care how it handles webcal links - for Firefox it works and that was the reason behind this whole answer right from the start - for Chromium-based solutions, see answers of @peonicles or @jeremija and ask them for further Chrome fixes.
    – Yoda
    May 8, 2018 at 7:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .