结合和缓存在ASP.net多个JavaScript文件 [英] Combining and Caching multiple JavaScript files in ASP.net

查看:126
本文介绍了结合和缓存在ASP.net多个JavaScript文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论是我最近有一个恶梦或只是我太傻谷歌,但我记得有人的地方写了ASP.net有一个功能,可自动合并多个JavaScript文件,并只提供一个文件到客户端,从而降低了HTTP请求的数目。

Either I had a bad dream recently or I am just too stupid to google, but I remember that someone somewhere wrote that ASP.net has a Function which allows "merging" multiple JavaScript files automatically and only delivering one file to the client, thus reducing the number of HTTP Requests.

服务器端,你还在不停的所有个人.js文件,但运行时本身然后创建,然后包含在脚本标签来代替,可适当缓存等。一个大的JavaScript文件

Server Side, you still kept all the individual .js files, but the Runtime itself then creates one big JavaScript file which is then included in the script-tag instead and can be properly cached etc.

在这个函数确实存在,并且不只是我的想象的产物,可有人点我的方向是正确的情况下,请?

In case that this function really exists and is not just a product of my imagination, can someone point me in the right direction please?

推荐答案

这就是所谓的脚本合成。有一个从asp.net解释它这里视频的例子。

It's called Script Combining. There is a video example from asp.net explaining it here.

这篇关于结合和缓存在ASP.net多个JavaScript文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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