What is MIME type "text/calendar"?
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
text/calendar is a MIME type that carries calendar event data in a plain text format. It follows the iCalendar standard (RFC 5545) and contains details such as start time, end time, location, and event description.
This MIME type makes it easy to share, schedule, and update events between different calendar systems.
- Sharing meeting invitations through emails
- Importing and exporting calendar events in apps
- Synchronizing scheduling data across devices and platforms
The format is most commonly seen with files like ICS, IFB, ICAL, ICALENDAR, and IFBF.
For more details on its structure and technical background, see RFC 5545.
Associated file extensions
.ics, .ifb, .ical, .icalendar, .ifbf
Usage Examples
HTTP Header
When serving content with this MIME type, set the Content-Type header:
Content-Type: text/calendar
HTML
In HTML, you can specify the MIME type in various elements:
<a href="file.dat" type="text/calendar">Download file</a>
Server-side (Node.js)
Setting the Content-Type header in Node.js:
const http = require('http');
http.createServer((req, res) => {
res.setHeader('Content-Type', 'text/calendar');
res.end('Content here');
}).listen(3000);
Associated file extensions
.ics, .ifb, .ical, .icalendar, .ifbf
FAQs
What is the standard file extension for text/calendar?
The most common file extension is .ics. However, other extensions like .ifb (Internet Free/Busy), .ical, and .icalendar are also valid. You can find more about these extensions at ICS or IFB.
How do I configure Apache to serve .ics files correctly?
To ensure browsers and email clients recognize the file, add the following line to your .htaccess file or main configuration: AddType text/calendar .ics. This ensures the server sends the correct Content-Type header.
How do I configure Nginx for text/calendar?
In Nginx, you should ensure the mime.types file includes the definition text/calendar ics;. If you need to add it manually within a server block, use: types { text/calendar ics; }.
Why do special characters look wrong in my calendar file?
iCalendar files rely heavily on correct encoding. You should serve the file with the charset parameter, specifically Content-Type: text/calendar; charset=utf-8. Without UTF-8, characters like emojis or accented letters may appear as garbage text.
What is the difference between text/calendar and text/x-vcalendar?
text/calendar is the standard MIME type for the modern iCalendar (2.0) format (RFC 5545). text/x-vcalendar is a legacy type used for the older vCalendar (1.0) format. You should always use text/calendar for modern compatibility.
Which applications open text/calendar files?
This MIME type is universally supported by major scheduling tools, including Microsoft Outlook, Google Calendar, Apple Calendar (macOS/iOS), and Mozilla Thunderbird. These apps parse the text data to create or update events on your schedule.
How can I force an .ics file to download instead of displaying in the browser?
To force a download, set the Content-Disposition HTTP header to attachment; filename="invite.ics". This prevents the browser from trying to display the plain text content and instead prompts the user to save or open the file in their calendar app.
General FAQ
What is a MIME type?
A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.
MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.
MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.
How do I find the MIME type for a file?
You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.
Why are multiple MIME types listed for one extension?
Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.