如何在Asp.Net中仅缓存图像 [英] How Do I Cache Only Images In Asp.Net

查看:81
本文介绍了如何在Asp.Net中仅缓存图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨伙计们,





我一直在尝试在客户端浏览器中缓存我的应用程序的图像资源。我用谷歌搜索我发现了不同的解决方案。在IIS level.some建议创建自定义处理程序。但我仍然有困惑继续。



因为我无法访问IIS。有没有最好的方法我们可以在客户端缓存图像。请提出你的想法。







谢谢,

Syed

Hi folks,


I have been trying to cache image resources of my application in client browser.I googled I found different solutions.some at IIS level.some suggested to create custom handlers.but still i have confusion to proceed.

As i don't have access to IIS. Is there any best way we can cache images on client.please suggest your thoughts.



Thanks,
Syed

推荐答案

您无法仅使用自定义处理程序缓存图像...您可以使用web.config设置控制客户端缓存......当然会影响所有内容...

http:/ /www.iis.net/configreference/system.webserver/staticcontent/clientcache [ ^ ]
You can not cache ONLY images without custom handlers...You can control client side caching using web.config settings...It will affect all content of course...
http://www.iis.net/configreference/system.webserver/staticcontent/clientcache[^]


不错的文章 - 在ASP.NET中缓存图像 [ ^ ]。
Nice article - Caching Images in ASP.NET[^].


这篇关于如何在Asp.Net中仅缓存图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆