网页停止响应外部CSS更改 [英] Webpage stopped responding to external CSS changes

查看:126
本文介绍了网页停止响应外部CSS更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个网站在我的电脑上,我一直非常成功地处理我的html和外部样式表一段时间。结果不是我想要的方式,但至少代码是做我所告诉它做的。

I'm currently working on developing a website on my computer, and I've been very successful at working on my html and external stylesheet for some time. The results don't come out the way I want, but at least the code is doing what I tell it to do.

但是,我一直试图将PHP汇入我的网页,我已经下载MAMP到我的电脑,并将我的网页改为.php页面,使php我想包括的页面。我设法做所有这一切都很好,昨天我回去工作我的布局一些。

However, I've been trying to incorportate PHP into my pages and I've since downloaded MAMP to my computer and changed my pages into .php pages so that the php pages I want to include are included. I managed to do all that just fine and yesterday I went back to work on my layout some more.

突然,我的网页,无论是.php版本还是原始的.html版本,都在交互或响应我在.css文件中所做的更改。这一切工作以前,但现在突然它不会回应。我试图把我的MAMP服务器关闭,我已经尝试删除.CSS文件,然后恢复它(不知何故,它被卡在旧的代码?),我试过调整在我正在工作的原始文件夹中的代码在......之外。不是它应该重要,它没有。

Suddenly, none of my webpages, either the .php version or the original .html version, are interacting or responding to changes I make in my .css file. It all worked fine before, but now suddenly it wont respond. I've tried turning my MAMP server off, I've tried removing the .css file and then restoring it (thinking somehow it was getting stuck on old code?) and I've tried tweaking the code in the original folder I was working out of. Not that it should matter, and it didn't.

我错过了什么?

当我下载MAMP时,我不得不将我的原始文件复制到htdocs文件夹,以便我的本地主机可以访问这些文件。我会理解,如果有什么错误,但它是没有响应在原始文件。

When I downloaded MAMP, I had to copy and more my original files to the "htdocs" folder so that my local host could have access to the files. I would understand if there was something wrong there, but it isn't responding in the original files either.

除了未被确认的更改(或者也许是由于),我的导航栏正在响应不存在的代码。

In addition to changes not being acknowledged (or perhaps because of), my navigation bar is responding to code that doesn't exist.

有没有办法解决这个问题,不涉及重新开始?

Is there a way to fix this that does not involve starting over?

推荐答案

这听起来像一个缓存问题。

This sounds like a caching issue.

您可以使用的标签会有所帮助。此外,请确保您的浏览器缓存设置不在自动,而是每次访问页面。

There are tags you can use that will help. Also make sure your browser cache settings aren't on Automatic, but Every visit to the page.

我必须使用所有这些设置来覆盖所有基础: / p>

I have to use all these to try to cover all the bases:

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

这篇关于网页停止响应外部CSS更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆