如何缓存CSS,图片和js?

编程入门 行业动态 更新时间:2024-10-16 00:19:39
本文介绍了如何缓存CSS,图片和js?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想有图像,CSS和他们的浏览器的JavaScript缓存客户端时,加载一个网页。有这么多不同类型的缓存我很困惑,用asp mvc的使用哪些。

I would like to have images, css, and javascript cached client-side on their browser when they load up a web page. There are so many different types of caching I am confused as to which ones to use with asp mvc.

难道也有可能有他们的浏览器检查这些文件的新的或修改的版本?

Would it also be possible to have their browsers check for new or modified versions of these files?

谢谢!

推荐答案

浏览器照顾这个为您自动,其实。你必须走出自己的路,让他们不缓存的CSS,JS,HTML和图像。

Browsers take care of this for you automatically, actually. You have to go out of your way to get them to NOT cache css, js, html and images.

我没那么熟悉ASP MVC的,但我认为他们缓存类型,你在想的是运code缓存为您创建的动态输出服务器端?

I'm not that familiar with ASP MVC, but I think they type of caching you're thinking of is opcode caching for your created dynamic output server-side?

更多推荐

如何缓存CSS,图片和js?

本文发布于:2023-11-02 00:15:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550814.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:缓存   图片   CSS   js

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!