开发者

HTML5 Cache Manifest and Content types

开发者 https://www.devze.com 2023-01-07 16:57 出处:网络
i am reading Dive into HTML5: Offline web apps: Cache manifest ... but it must be served with the content type text/cache-manifest. If

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?


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号