[英]Clear css and javascript browser cache
如何在没有Clear browser> history的情况下清除ASP MVC中的JavaScript和CSS缓存?
There is no direct and easy of doing so. 没有直接和容易的做法。 Closest I can think of would be is to use:
我能想到的最近的就是使用:
window.location.reload(true)
It will ignore the current cached items and will try fetching the new ones. 它将忽略当前缓存的项目并尝试获取新的项目。
The better approach I can think of is about using a version number to the path or filename, like PATH?v=VersionNumber 我能想到的更好的方法是使用路径或文件名的版本号,比如PATH?v = VersionNumber
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.