我有一个包含非常少内容的html文件,我只是更改了标题中的标题并刷新了但是Apache给了我完全相同的文件。
这真的很奇怪,如果我删除文件的“足够大”的部分,Apache会向我发送一个更新的文件,但它将是一个奇怪的混合或两个版本的坏差异。
原件:
<!DOCTYPE html>
<html ng-app="EndeavorApp" ng-controller="RootCtrl">
<head>
<title></title>
<link rel="stylesheet" href="css/endeavor.css" />
</head>
<body>
<div id='work-space' ng-controller="TimelineCtrl">
<div id='content'>
<div id='project-column'>
<div class='project' ng-style="{height:project.$$height + 'px'}" ng-repeat="project in TCtrl.projects">
{{project.name}}
</div>
</div>
<div id='time-line-column'>
<div ng-style="{width:TCtrl.timeLineWidth + 'px'}" id='block-view'>
<div class='project' ng-style="{height:project.$$height + 'px'}" ng-repeat="project in TCtrl.projects">
<div ng-repeat="block in project.blocks" ng-style="TCtrl.getBlockStyle(block)" class='block'>
<div class='block-content'></div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/angular.endeavor.min.js"></script>
<script src="js/endeavor.js"></script>
</body>
</html>
在标题标记中添加内容没有任何效果。删除head标签中的所有内容都没有做任何事返回相同的该死的文件。
如果我删除了最后2个<script>
标签并添加了标题,我会收到这个不完整的文件(请注意它会在脚本标签上切断)
<!DOCTYPE html>
<html ng-app="EndeavorApp" ng-controller="RootCtrl">
<head>
<title></title>
<link rel="stylesheet" href="css/endeavor.css" />
</head>
<body>
<div id='work-space' ng-controller="TimelineCtrl">
<div id='content'>
<div id='project-column'>
<div class='project' ng-style="{height:project.$$height + 'px'}" ng-repeat="project in TCtrl.projects">
{{project.name}}
</div>
</div>
<div id='time-line-column'>
<div ng-style="{width:TCtrl.timeLineWidth + 'px'}" id='block-view'>
<div class='project' ng-style="{height:project.$$height + 'px'}" ng-repeat="project in TCtrl.projects">
<div ng-repeat="block in project.blocks" ng-style="TCtrl.getBlockStyle(block)" class='block'>
<div class='block-content'></div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/angula
删除<body>
中的所有内容会导致此混乱(注意标题仍为空)
<!DOCTYPE html>
<html ng-app="EndeavorApp" ng-controller="RootCtrl">
<head>
<title></title>
<link rel="stylesheet" href="css/endeavor.css" />
</head>
<body>
<div id='work-space' ng-controller="TimelineCtrl">
<div id='content'>
<div id='project-column'>
<div class='p
Apache也在文件的末尾发送了一些奇怪的unicode字符
编辑:这是在使用vagrant的CentOS VM上运行,而webroot正在使用vagrants sharead文件夹。
答案 0 :(得分:0)
我的一个朋友解决了这个问题。所有这一切都有一个重要的细节,结果证明是相关的。 Apache安装在Vagrant上运行,它的webroot是vagrants共享mount。
使用NFS mound时,操作系统和Apache出现了问题。
解决方案是在httpd.conf中设置它
EnableSendfile to off
有关此内容的更多详情:JS and CSS files in vagrant not properly encoded when saved outside of the VM