What is MIME type "text/cache-manifest"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

The MIME type text/cache-manifest tells browsers that the file contains instructions for offline caching of web apps.
It is a plain text file that starts with a specific keyword and lists resources to store locally.
Browsers parse the file, cache the listed assets, and allow the app to work even when offline.
Files marked for this feature often have the APPCACHE extension.
For more technical details, visit MDN Web Docs.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: text/cache-manifest    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="text/cache-manifest">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/cache-manifest');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

Is text/cache-manifest still supported in modern browsers?

No, this technology is deprecated. Most modern browsers (like Chrome and Firefox) have removed support for the Application Cache in favor of Service Workers. Developers are strongly advised to migrate away from text/cache-manifest to ensure their web applications continue to function correctly.

How do I configure Apache to serve .appcache files correctly?

You must tell Apache to associate the extension with the correct MIME type. Add the line AddType text/cache-manifest .appcache to your .htaccess file or main configuration. If the server sends the file as text/plain, the browser will ignore the caching instructions.

Why is my application cache manifest being ignored?

The most common reason is an incorrect MIME type; the server must send the header Content-Type: text/cache-manifest. Additionally, the file must be a valid text file starting with the exact line CACHE MANIFEST. If there are syntax errors or the file returns a 404, the caching process aborts.

What is the standard file extension for this MIME type?

The most common extension is .appcache. Historically, .manifest was also used, but it caused conflicts with Microsoft specific files. You can find more details about the file format at APPCACHE.

Should I cache the manifest file itself?

No, never cache the manifest file. You should configure your web server to serve the text/cache-manifest file with headers like Cache-Control: no-cache or Expires: -1. If the browser caches the manifest file, it will not check for updates to your web app, leaving users stuck on an old version.

What replaced text/cache-manifest for offline web apps?

The Service Worker API has superseded the Application Cache. Service Workers offer a programmable way to intercept network requests and manage caching strategies, providing much more flexibility and reliability than the rigid text/cache-manifest standard.

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.