【发布时间】:2013-03-23 14:05:43
【问题描述】:
我是网络应用程序开发的菜鸟,我对在哪里声明所述“内容类型”感到困惑。它应该在清单上还是应该在应用程序源代码上?我正在使用保管箱公用文件夹作为我的服务器,我也不确定这是否有问题。
我创建了 2 个文件:我的应用程序的 html 源代码和清单。
我的清单的顶部是这样的:
{
"name":"我的应用名称",
"description": "我的应用描述",
"launch_path": "http://dl.dropbox.com/x/xxxxx/xxxxxx.html"
“图标”:{
"128": "http://dl.dropbox.com/x/xxxxxxxx/xxxxxxx_128px.png"
}
它被保存为“myManifest.webapp”。
而且,我的源代码顶部是这样的:
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="application/x-web-app-manifest+json; charset=UTF-8">
<title>My App Name</title>
</head>
我尝试通过 Firefox Marketplace 验证我的清单,但一直失败,出现 3 个错误:
-JSON 解析错误;
-清单必须与 HTTP 标头“Content-Type: application/x-web-app-manifest+json”一起提供。
-清单的编码与 HTTP Content-Type 中提供的字符集不匹配。
任何帮助我度过难关的人都将不胜感激!
【问题讨论】:
标签: html