【发布时间】:2017-03-16 14:44:46
【问题描述】:
Apache 正在做一些非常奇怪的事情。起初,我的浏览器似乎总是在加载缓存副本。我通过禁用缓存、使用新浏览器和 curl 来排除这种情况,我 100% 确信这不是客户端缓存问题。
我有一个内容非常少的 html 文件,我只是更改了标题中的标题并刷新了,但 Apache 给了我完全相同的文件。
这真的很奇怪,如果我删除文件的“足够大”部分,Apache 会向我发送一个更新的文件,但这将是一个奇怪的混合或 2 个版本的错误差异。
原文:
<!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 共享文件夹。
【问题讨论】:
标签: html apache caching centos