【发布时间】:2018-02-25 17:53:27
【问题描述】:
我已将文件上传到我的网站。当我查看网站时,在线 html 是这样的:
但是,这绝对不是在线文件。我已经尝试更新它很多次了。但是,它仍然呈现我很久以前使用的文件。我试图删除我的缓存和 cookie。但是由于一些奇怪的原因,它仍然设法使用一个旧的已删除文件……这是为什么呢?
应该在线的html是这样的:
{% extends "layout.html.twig" %}
{% block content %}
<div id="preloader"></div>
<div id="s1" class="hero">
<div id="menu_block" name="menu_block" class="menu_block right">
<nav class="nav_block">
<a href="#s1">Home</a>
<a href="#s2">About</a>
<a href="#s3">Projects</a>
<a href="#s4">Skills</a>
<a href="#s5">Resume</a>
<a href="#s6">Contact</a>
</nav>
</div>
<div class="container vertical center">
<div class="title white">
Lex de Willigen
</div>
<div class="subtitle white">
DEVELOPER
</div>
<div class="subsubtitle">
<i>Hello, my name is Lex and I'm <br>
a developer from the Netherlands!</i>
</div>
</div>
</div>
<div id="s2" class="section">
<div class="container vertical center" style="margin-top: 10px;">
<i class="fa fa-user fa-4x"></i>
</div>
<div class="container vertical center" style="">
<h2 style="font-weight: 900; font-family: arial; color: black;">
WHO AM I?
</h2>
</div>
<div class="container vertical center" style="">
<p>
<b>Hi!</b> My name is Lex.
<h3 class="animate">And I'm developer</h3>
</p>
</div>
</div>
<div id="s3" class="section">
<div class="container vertical center" style="">
<h2>
Projects
</h2>
</div>
</div>
<div id="s4" class="section">
<div class="container vertical center" style="">
<h2>
Skills
</h2>
</div>
</div>
<div id="s5" class="section">
<div class="container vertical center" style="">
<h2>
Resume
</h2>
</div>
</div>
<div id="s6" class="section">
<div class="container vertical center" style="width: 50%;">
<h2>
Contact
</h2>
{% if form is defined %}
<form action="" method="post">
{{ form_widget(form) }}
</form>
{% endif %}
</div>
</div>
{% endblock %}
一些额外的细节:
- 我正在使用 Silex 框架
- 出于某种原因,我的 javascript 始终无法正常工作,但这可能是因为新文件从未加载过
- 如果需要,我可以提供我的网站,以防您想检查可能是什么问题
【问题讨论】:
-
您只是在您的计算机或其他设备上遇到此问题?我的意思是,如果您尝试从例如您的手机访问此页面,您还会获得旧文件吗?
-
你使用
cloudflare吗?如果是,请尝试从 cloudflare 仪表板中清除缓存。 -
@AlbertoMartinez 不,我在两台电脑上试过,都遇到同样的问题
-
@RafaelHovsepyan 不,我没有使用 cloudflare
-
它是某种形式的服务器端缓存。这是共享主机吗?如果是这样,请在面板中查找任何缓存设置。 Twig 也可以配置缓存模板stackoverflow.com/questions/16386925/…
标签: javascript php webserver silex filezilla