在浏览器中禁用缓存 [英] Disable cache in browser
问题描述
问题
我工作了很多样式,我改变一些东西,我检查它的外观。然而,大多数如果不是所有的主流浏览器,存储样式表,因而不会让我看到了差异。只有大量的重置Safari浏览器,清空缓存按钮presses突然更新,但是这实在是烦人的。
I work a lot with stylesheets, I change something and I check how it looks. However most if not all current browsers, store the stylesheet and thus won't let me see the differences. Only with a lot of Reset Safari, Empty Cache button presses it suddenly updates but this is really annoying.
问
有没有一种方法来禁用浏览器中的缓存功能?所以它不会存储任何文件,我将永远从服务器获取最新的CSS。
Is there a way to disable the cache feature in browsers? So it won't store any files and I will always fetch the latest css from the server.
诗。 Safari的清空缓存并重置Safari并不总是清除缓存和发展>禁用缓存似乎并没有做任何事情。
Ps. Safari's Empty Cache and Reset Safari doesn't always clear the cache and Develop > Disable Cache doesn't seem to do anything.
推荐答案
在Chrome浏览器,IE,Firefox和大多数其他浏览器, Ctrl + F5键
(硬刷新 )将迫使页上重新加载高速缓存资源。我做这一切的时候。我不能为Safari浏览器说话,但我希望它会做同样的。
In Chrome, IE, Firefox, and most other browsers, Ctrl+F5
("hard refresh") will force reloading cached resources on the page. I do this all the time. I can't speak for Safari, but I'd expect it would do the same.
修改:我只是做了一个搜索+野生动物园+硬盘+刷新,它看起来像在Mac上,你的按住选项
键的再点击刷新。一些消息来源说移
也适用,而<一个href=\"http://www.kelpdesign.com/tech-talk/what-are-the-hard-refresh-shortcuts-for-a-mac-using-safari-and-firefox/\"><$c$c>Command+Option+E$c$c>清除缓存。
Edit: I just did a search for "+Safari +hard +refresh" and it looks like on the Mac, you hold down the Options
key while clicking refresh. Some sources say Shift
also works, and that Command+Option+E
clears cache.
这篇关于在浏览器中禁用缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!