我使用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.
在浏览器中使用隐身模式.
刷新以查看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文件
发布评论