CardDAV

May 20, 2023

CardDAV is a Web-based protocol used for accessing address book information stored on a server. It is an extension of the Web Distributed Authoring and Versioning (WebDAV) protocol, which allows users to access files on a server using HTTP. CardDAV is used to synchronize contact information between a client device, such as a smartphone or computer, and a server.

Purpose

The purpose of CardDAV is to standardize the way in which address book information is accessed and synchronized between devices. Prior to the development of CardDAV, there were multiple ways in which address book information could be synchronized, depending on the device and the protocol used. This led to interoperability issues between devices and made it difficult for users to switch between different devices.

By standardizing the way in which address book information is accessed and synchronized, CardDAV makes it easier for users to switch between different devices without losing their contact information. It also allows for more efficient synchronization of contact information, as changes made on one device are automatically propagated to all other devices.

Usage

CardDAV is used primarily in email and contact management applications on both desktop and mobile devices. It is supported by a number of popular email and contact management applications, including Apple’s Contacts app and Microsoft Outlook.

To use CardDAV, a user must first set up an account with a CardDAV-enabled server. The user’s address book information is then stored on the server, and can be accessed and synchronized with any CardDAV-enabled device.

When a user makes a change to their address book on one device, such as adding a new contact or updating an existing contact, that change is immediately propagated to all other devices connected to the same CardDAV account. This ensures that the user’s address book information is always up to date and consistent across all of their devices.

How it Works

CardDAV works by using the same HTTP methods and headers as WebDAV to access and modify address book information stored on a server. When a client device connects to a CardDAV-enabled server, it sends a series of HTTP requests to retrieve and synchronize the user’s address book information.

The initial request made by the client device is a PROPFIND request, which retrieves a list of all the address books stored on the server. The response to the PROPFIND request contains a list of all the available address books, along with information about each address book, such as its name and location.

Once the client device has identified the address book it wants to access, it sends a GET request to retrieve the contents of the address book. The response to the GET request contains a list of all the contacts stored in the address book, along with information about each contact, such as their name, phone number, and email address.

When a user makes a change to their address book on one device, such as adding a new contact or updating an existing contact, the client device sends a PUT or POST request to update the address book on the server. The server then propagates the changes to all other devices connected to the same CardDAV account.

Security

CardDAV supports a number of security features to protect user data, including SSL/TLS encryption and authentication. When a client device connects to a CardDAV-enabled server, it can use SSL/TLS encryption to ensure that all data transmitted between the client and server is encrypted and cannot be intercepted by a third party.

Authentication is also used to ensure that only authorized users can access and modify address book information stored on the server. When a user sets up a CardDAV account, they must provide a username and password, which are used to authenticate the user when they connect to the server.