ASP.NET(支持 ASP.NET MVC)性能优化包 - combres 介绍
项目地址:https://github.com/buunguyen/combres
Overview
Combres (previously hosted in CodePlex) helps your ASP.NET and ASP.NET MVC applications perform faster and rank better with YSlow and PageSpeed.
Features highlights:
- All in one solution supporting JS/CSS combination, minification, compression and caching (by adding properExpires/Cache-Control headers, ETag and server-side caching)
- Easy to use, simply download it via Nuget, declare JS and CSS resource groups in an XML file and use them in your pages, Combres will take care of the rest
- Integrated with ASP.NET routing engine and work with ASP.NET WebForm 3.5/4.0/4.5, ASP.NET MVC 2/3/4 and Azure web applications
- Detect changes in Combres config file, managed JS/CSS files and support auto-versioning, so you don't have to manually rebundle JS/CSS resources after making changes to them
- Extensible architecture with many extension points
- And many more: CDN, HTTPS, debug mode, external JS/CSS (dynamically requested from other servers), Less CSS etc.
- Proven solution with many thousands of downloads in NuGet, CodePlex and The Code Project
Check out this Code Project article for a thorough introduction.
Usage
Install from NuGet
PM> Install-Package combres
PM> Install-Package combres.log4net (optional)
PM> Install-Package combres.mvc (optional)
Optional steps for ASP.NET 3.5 users, those using ASP.NET 4 or above can ignore:
- Delete the generated file
AppStart_Combres.cs - Open
global.asaxcode-behind file:- Import
Combresnamespace - Add this line to the first line of either
RegisterRoutes()orApplication_Start():RouteTable.Routes.AddCombresRoute("Combres")
- Import
Edit App_Data/Combres.xml to declare your JS and CSS resources
Use resource groups in your pages as follows:
<%= WebExtensions.CombresLink("siteCss") %>
<%= WebExtensions.CombresLink("siteJs") %>
ASP.NET MVC developers can import Combres.Mvc namespace and declare CSS/JS like below:
@using Combres.Mvc;
...
@Url.CombresLink("siteCss")
@Url.CombresLink("siteJs")
That should be it. Start your browser to observe Combres in action. For more advanced usages, refer to these resources:
谢谢浏览!
ASP.NET(支持 ASP.NET MVC)性能优化包 - combres 介绍的更多相关文章
- ASP.NET MVC性能优化工具 MiniProfiler
ASP.NET MVC性能优化工具 MiniProfiler 2014年04月19日 ⁄ ASP.NET ⁄ 共 1159字 ⁄ 字号 小 中 大 ⁄ 暂无评论 ⁄ 阅读 325 views 次 MV ...
- asp.net mvc 性能优化——(1)静态化
asp.net mvc 性能优化--(1)静态化 在改善页面性能的同时,可能会采用静态化的策略,对于不能实时静态化的内容,则采用缓存.本文主要讨论如何实现cshtml的静态化(实际上还不是完全的htm ...
- mvc性能优化
mvc性能优化 (1)移动设备卡顿问题 -1请求方式 在mvc中GET请求有问题,出现错误 在MVC中在进行GET请求获取JSON数据时,需要进行如下设置: return Json("&qu ...
- 网站性能优化— WebP 全方位介绍
谈到优化网站性能时,主要目标之一就是减少要发送到浏览器的数据量(即 payload).而当前,图片通常是页面构成中最耗费流量的部分,因此降低图片的大小是一个最为有效的优化网页前端性能的办法. 有很多工 ...
- WEB开发性能优化--核心定义介绍篇(1)
推荐理由 随着 互联网的蓬勃发展,并且伴随着产品功能的越来越复杂,对于技术人员来说最大的挑战就是如何在保证业务快速发展的同时,也可保证不断复杂的业务对用户体验的影响,其中对用户来说最重要的体验指标是如 ...
- PLSQL_性能优化索引Index介绍(概念)
2014-06-01 BaoXinjian
- 记一次ASP.NET MVC性能优化(实际项目中)
前言 在开发中为了紧赶项目进度而未去关注性能的问题,在项目逐渐稳定下来后发现性能令人感到有点忧伤,于是开始去关注这方面,本篇为记录在开发中遇到的问题并解决,不喜勿喷.注意:以下问题都是在移动端上出现, ...
- 【转】记一次ASP.NET MVC性能优化(实际项目中)
前言 在开发中为了紧赶项目进度而未去关注性能的问题,在项目逐渐稳定下来后发现性能令人感到有点忧伤,于是开始去关注这方面,本篇为记录在开发中遇到的问题并解决,不喜勿喷.注意:以下问题都是在移动端上出现, ...
- ASP.NET MVC性能优化(实际项目中)
前言 在开发中为了紧赶项目进度而未去关注性能的问题,在项目逐渐稳定下来后发现性能令人感到有点忧伤,于是开始去关注这方面,本篇为记录在开发中遇到的问题并解决,不喜勿喷.注意:以下问题都是在移动端上出现, ...
随机推荐
- OJ提交题目中的语言选项里G++与C++的区别(转载)
原文链接:http://blog.polossk.com/201405/c-plus-plus-g-plus-plus G++? 首先更正一个概念,C++是一门计算机编程语言,G++不是语言,是一款编 ...
- DataTable转化为List
public List<T> ConvertToList<T>(DataTable dt) where T : new() { // 定义集 ...
- ASP.NET MVC+EF框架+EasyUI实现权限管理系列(8)-DbSession线程内唯一
原文:ASP.NET MVC+EF框架+EasyUI实现权限管理系列(8)-DbSession线程内唯一 ASP.NET MVC+EF框架+EasyUI实现权限管系列 (开篇) (1):框架搭建 ...
- ocp11g培训内部教材_052课堂笔记(042)_体系架构
OCP 052 课堂笔记 目录 第一部分: Oracle体系架构... 4 第一章:实例与数据库... 4 1.Oracle 网络架构及应用环境... 4 2.Oracle 体系结构... 4 3. ...
- Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds解
产生了一个解决这个问题的方法是在项目部署到tomcat比长45第二,当项目是比较大的,框架复杂的问题经常发生. 解决方法非常easy,找到以下这个路径中 workspace\.metadata\.pl ...
- Xcode6为什么干掉pch(Precompile Prefix Header)&怎样加入pch文件
一直在用xcode6开发,但项目都是在xcode5上创建的,所以一直没注意到,xcode6居然干掉pch文件了. 为什么xcode6没有自己主动创建pch文件呢? 简单地看:我们在写项目的时候,大部分 ...
- input的width和padding-left同时存在时IE兼容问题
总的来说,text-indent不影响元素的最终宽度但是有兼容性问题,padding-left在中国主流浏览器IE低版本下影响最终宽度,但在chrome和firefox下不影响宽度,但是可以通过CSS ...
- SQL data reader reading data performance test
/*Author: Jiangong SUN*/ As I've manipulated a lot of data using SQL data reader in recent project. ...
- navigator,JS检测浏览器插件
最早由Netscape Navigator 2.0引入的navigator对象,现在已经成为识别客户端浏览器的事实标准.虽然其它浏览器也通过其它方式提供了相同或相似的信息(例如,IE中的window. ...
- C# 关闭子线程的方法
将子线程设定为IsBackGroud = true,程序关闭则自动死亡. 暴力手段:System.Environment.Exit(0).关闭时直接x掉所有线程. 子线程自行结束:子线程中自己判断.可 ...