apache - HTML5 缓存 list 和内容类型

标签 apache http html content-type

我正在阅读 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

如果我不添加这个会发生什么?内容类型有那么重要吗?我在 httpd.conf 中搜索了 AddType。但我没有看到 content-type 表示 htmljsimages 等。它似乎并不那么重要毕竟?

最佳答案

如果您没有正确设置内容类型,浏览器可能会拒绝将其视为 list 文件,类似于众所周知的 Firefox 问题 stylesheets get ignored if served with a plain text MIME type .

您的 Apache 服务器的内容类型可能不在 httpd.conf 中,它们通常存储在另一个配置文件 mime.types 中(默认情况下,though it can be changed)。

关于apache - HTML5 缓存 list 和内容类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3280226/

相关文章:

Apache 将 http 重定向到 https 以及将非 www 重定向到 www

django - ImportError : No module named django. core.wsgi Apache + VirtualEnv + AWS + WSGI

javascript - Firefox 扩展中 JavaScript 中的 HTTP POST

javascript - 表的多个复选框值存储在数组中并将数组发送到flask

html - 基础端导航问题

Apache/Tomcat/mod_jk 当你使用 Webjars 时......可能吗?

apache-flex - 可在 Flex 中使用 Web 服务获取的最大数据大小

java - 发帖请求抛出 nullpointerexception

javascript - JS从一个圆的边缘到另一个圆的边缘画一条线

debian 安装上的 WordPress apache2 虚拟主机配置