XAMPP不会加载我更新的CSS文件 [英] XAMPP wont load my updated CSS files

查看:75
本文介绍了XAMPP不会加载我更新的CSS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用XAMPP在本地主机上拥有我的网站.每次编辑文件时,都将其扩展名从 .php 更改为 .html ,以便能够使用WebStorm对其进行正确编辑.

I have my site on the localhost by using XAMPP. Every time I edit a file, I change its' extension to .html from .php to be able to edit it properly with WebStorm.

由于某些原因,我注意到如果在服务器上的文件夹中修改 css/scss 时,将不会加载更新的css.为什么会这样?

I noticed for some reason if I modify the css/scss while the folder on the server, the updated css will not be loaded. Why is that?

现在,我每次都要编辑CSS时,都必须编辑从 .php .html 的所有内容,并将文件夹移出XAMPP.而且即使我再将文件移到XAMPP文件夹中,我的某些CSS也仍然无法工作..?

Now I have to edit everything from .php to .html and move folder out of XAMPP every time I have to edit CSS. And even if I then move again the file into the XAMPP folder, some of my css still wont work..?

推荐答案

为此提供3种解决方案.

3 solutions for this.

  1. 在浏览器中使用隐身模式.

刷新以查看CSS时,请使用 control + f5 缓存刷新.

When you refresh to see the css use control+f5 so you do cache-refresh.

从浏览器的开发者控制台中删除缓存.

Remove cache from the developer console of your browser.

最适合您的选择(我个人使用第二个)

Pick which fits best for your (personally i use the second one)

这篇关于XAMPP不会加载我更新的CSS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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