【发布时间】:2020-08-21 15:19:15
【问题描述】:
在我的项目中,我使用的是 .net core 和 angular 7。每次部署后我都需要清除浏览器缓存。 ng build --prod --output-hashing=all,对我不起作用。请帮忙。
【问题讨论】:
在我的项目中,我使用的是 .net core 和 angular 7。每次部署后我都需要清除浏览器缓存。 ng build --prod --output-hashing=all,对我不起作用。请帮忙。
【问题讨论】:
只需在 web.config 文件中添加以下标签
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="0.00:01:00"/>//1 minutes
</staticContent>
</system.webServer>
</configuration>
【讨论】: