The Chrome DevTools can disable the cache.
(Chrome DevTools可以禁用缓存。)
- Right-click and choose
Inspect Element
to open the DevTools. (右键单击并选择Inspect Element
以打开DevTools。)
Or use one of the following keyboard shortcuts : (或使用以下键盘快捷键之一 :)
- Click
Network
in the toolbar to open the network pane. (点击 Network
工具栏中打开网络窗格。)
- Check the
Disable cache
checkbox at the top. (选中顶部的Disable cache
复选框。)
Keep in mind, as a tweet from @ChromiumDev stated, this setting is only active while the devtools are open .
(请记住,正如@ChromiumDev的一条推文所述,此设置仅在devtools打开时才有效 。)
Note that this will result in all resources being reloaded.
(请注意,这将导致重新加载所有资源。)
Should you desire to disable the cache only for some resources, you can modify the HTTP header that your server sends alongside your files. (如果只希望对某些资源禁用缓存,则可以修改服务器与文件一起发送的HTTP标头 。)
If you do not want to use the Disable cache
checkbox, a long press on the refresh button with the DevTools open will show a menu with the options to Hard Reload
or Empty Cache and Hard Reload
which should have a similar effect.
(如果您不想使用“ Disable cache
复选框,则在打开DevTools的情况下长按刷新按钮将显示一个菜单,其中包含“ Hard Reload
或“ Empty Cache and Hard Reload
,应该会产生类似的效果。)
Read about the difference between the options . (了解选项之间的区别 。)
The following shortcuts are available: (可以使用以下快捷方式:)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…