Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Cache Manifest and Content types

i am reading Dive into HTML5: Offline web apps: Cache manifest

... but it must be served with the content type text/cache-manifest. If you are running an Apache-based web server, you can probably just put an AddType directive in the .htaccess file at the root of your web directory

AddType text/cache-manifest .manifest

if i dont add this what will happen? is the content type so important? i did a search for AddType in httpd.conf. but i dont see content-type for say html, js, images etc. it dont seem all that important after all?

like image 881
Jiew Meng Avatar asked Jul 19 '10 10:07

Jiew Meng


1 Answers

It's likely that if you don't have the content type set correctly the browsers will refuse to treat it as a manifest file, similar to the well known Firefox problem where stylesheets get ignored if served with a plain text MIME type.

The content types of your Apache server are possibly not in httpd.conf, they are usually stored in another configuration file mime.types (by default, though it can be changed).

like image 123
robertc Avatar answered Oct 04 '22 21:10

robertc