Whenever I run the project, many files(CSS, image and js) requested from a remote server and the project load slowly.
For handling this issue, I unchecked disable cache for all files in the network tab of Chrome DevTools(for caching all files) as follows:
But the problem started when I need some files(for example test.js,...) don't cache because they change quickly.
How to disable cache for some files(JS, CSS,...) in google chrome DevTools?
There are many ways to disable cache for specific files.
Maybe the two most common are:
Add query to your script file name ie:
<script src="../whatever/someFile.js?version=1234" /> //Where version can be a variable taken from web.config or DateTime.Now() of some sort.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.