Assuming you are using IIS or IIS Express, the simplest solution is just to disable caching entirely in your development environment by adding settings to your web.config
file.
NOTE: If you have no web.config
file, you can create one in your website's root directory.
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
Alternatively, you can disable caching of files in a specific location of your website:
<configuration>
<location path="path/to/the/file">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>
</system.webServer>
</location>
</configuration>
In either case, you can use web config transformation during your release in order to remove these sections in your test/production environments.
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!-- Use this section if you are disabling caching site-wide -->
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache" xdt:Transform="Remove" xdt:Locator="Match(name)" />
</customHeaders>
</httpProtocol>
</system.webServer>
<!-- Use this section if you are disabling per folder (duplicate if necessary) -->
<location path="path/to/the/file" xdt:Transform="Remove" xdt:Locator="Match(path)">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>
</system.webServer>
</location>
</configuration>
Reference: How do I disable caching of an individual file in IIS 7 using weserver config settings