停止Chrome缓存我的JS文件 [英] Stop Chrome Caching My JS Files
问题描述
我会对我的JS文件进行更改,但它不会在浏览器中真正更改,我必须每次重命名文件以便重新加载它。是否有某种.htaccess命令可以添加或使其停止缓存?
它甚至缓存我的html页面。我需要重新打开我的整个浏览器才能看到更改。它可能是一个服务器问题吗?
您可以点击右上角的设置图标。 ..
|更多工具| 开发者工具 | 网络 | 禁用缓存(开发DevTools时)
对于windows,这是 F12 或 CTRL + SHIFT + I 打开DevTools。
I will make a change to my JS files but it won't really change in the browser, I have to rename the files every time so that it reloads it. Is there some sort of .htaccess command I can add or something to make it stop caching?
It is even caching my html pages hard core. I need to reopen my entire browser just to see changes. Could it possibly be a server problem?
You can click the settings icon on top right corner ...
| More Tools | Developer Tools | Network | Disable cache (while DevTools is open)
For windows, this is F12 or CTRL + SHIFT + I while on mac CMD + SHIFT + I opens up DevTools.
这篇关于停止Chrome缓存我的JS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!