刷新网站时样式表未更新 [英] Stylesheet not updating when I refresh my site
问题描述
我正在创建一个网站,但是当我对网站上的样式表进行更改并刷新网站时,没有任何更改.
I am creating a website, but when I made changes to the stylesheet on my site, and I refreshed the site, none of the changes were there.
我尝试使用查看源工具检查 stylesheet.css
并且它也没有更新.但是当我进入系统的根目录时,它是.
I tried to use the view source tool to check the stylesheet.css
and it isn’t updated either. But when I go to the root of my system it is.
我必须等待至少 20 分钟才能在我的网站上看到更新,谁能告诉我为什么我没有立即看到更改?我的浏览器、计算机或服务器有问题吗?
I have to wait at least 20 minutes before I see the update on my site, can anyone tell me why I don’t see changes right away? Is something wrong with my browser, computer, or server?
我也尝试删除我的 cookie、缓存和历史记录,但仍然没有奏效.
I also tried deleting my cookies, cache, and history but it still didn’t work.
推荐答案
如果您的网站还没有上线,而您只想按自己喜欢的时间间隔更新样式表,请使用以下命令:Ctrl+ F5.
If your site is not live yet, and you just want to update the stylesheet at your pleased intervals, then use this: Ctrl + F5.
在 Mac OS(在 Chrome 中)使用:Cmd + Shift + R.
On Mac OS (in Chrome) use: Cmd + Shift + R.
这将强制您的浏览器重新加载并刷新与网站页面相关的所有资源.
This will force your browser to reload and refresh all the resources related to the website's page.
因此,每次您更改样式表中的某些内容并想查看新结果时,请使用此方法.
So every time you change something in your stylesheet and you wanna view the new results, use this.
这篇关于刷新网站时样式表未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!