缓存.png,js和css [英] Caching of .png,js and css
本文介绍了缓存.png,js和css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在mvc应用程序中缓存.css,png和js文件。
问候
海马
Hi,
How can i cache .css , png and js file in mvc application.
regards
Hyma
推荐答案
检查以下链接可能有帮助:
ASP.NET中的图像缓存
静态内容缓存ASP.NET
也可以使用i Web。配置
Check below links may be it help:
Image Caching in ASP.NET
Static Content Caching ASP.NET
Also use i Web.Config
<configuration>
<system.webserver>
<staticcontent>
<clientcache cachecontrolmode="UseMaxAge" cachecontrolmaxage="365.00:00:00" />
</staticcontent>
</system.webserver>
</configuration>
上面的代码告诉浏览器自动缓存所有静态资源365天。
希望它有助于:)
The above code tells the browsers to automatically cache all static resources for 365 days.
Hope It Helps :)
这篇关于缓存.png,js和css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文