开发者

ASP.NET MVC Is it possible to have image version like javascript version?

all. I want to version image on site. Example for usage is n开发者_StackOverflow社区ext: my site have some image (e.g. search bar background 190px width). When I changed background image, I saved it with same file name). After that, I accessed page, but old image was displayed and page design crashed. I could see good image with only ctrl+f5.

Is there any kind of image version algorithm similar u js versioning?

Thanks in advance.


The standard technique for cache busting is to change the URI by adding or modifying the query string. There is nothing language specific about that.

If you are modifying a background image that is a standard part of the design, then you should be just editing your CSS to change the URI. Neither ASP.NET nor JS needs to be involved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜