Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django静态压缩文件未在Firefox上呈现_Django_Firefox_Django Staticfiles_Django Static_Firefox 8 - Fatal编程技术网

Django静态压缩文件未在Firefox上呈现

Django静态压缩文件未在Firefox上呈现,django,firefox,django-staticfiles,django-static,firefox-8,Django,Firefox,Django Staticfiles,Django Static,Firefox 8,我使用优化静态样式表和Java脚本。现在所有这些脚本和css属性都被加载到Chrome和Safari中。但由于某些原因,它们没有加载到Firefox中。我做错什么了吗?Firefox是否需要其他设置 如果需要其他信息,请评论。我会加上它。(Firefox版本8) 编辑: 使用Firebug检查Chrome和Firefox后。我发现正在渲染的脚本与源相同 src="/media/js/hawk\foo_boo_ajax_too_forms_refer_moder.1323864494.js 现在

我使用优化静态样式表和Java脚本。现在所有这些脚本和css属性都被加载到Chrome和Safari中。但由于某些原因,它们没有加载到Firefox中。我做错什么了吗?Firefox是否需要其他设置

如果需要其他信息,请评论。我会加上它。(Firefox版本8)

编辑: 使用Firebug检查Chrome和Firefox后。我发现正在渲染的脚本相同

src="/media/js/hawk\foo_boo_ajax_too_forms_refer_moder.1323864494.js
现在这被Chrome解释为

src="/media/js/hawk/foo_boo_ajax_too_forms_refer_moder.1323864494.js

但是firefox无法解释它。这是firefox的问题还是我必须更改“/”?(正在生成的链接或源由django static生成。)

确保为js和css文件设置了正确的
内容类型和
内容编码头。

确保为js和css文件设置了正确的
内容类型和
内容编码头。

根据URI规范,需要更改为“/”。

根据URI规范,您需要更改为“/”。

上述问题是django static中的一个bug。这个问题出现在windows机器上。(在windows上,它混淆了文件系统路径和url。)我已经联系了开发人员,我认为这个问题很快就会解决。希望这对其他人有所帮助。

上述问题是django static中的一个bug。这个问题出现在windows机器上。(在windows上,它混淆了文件系统路径和url。)我已经联系了开发人员,我认为这个问题很快就会解决。希望这对其他人有帮助。

内容类型正确。内容编码应该无关紧要,因为django static不gzip文件。内容类型正确。内容编码应该无关紧要,因为django static不gzip文件。