项目地址: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 combinationminificationcompression 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 NuGetCodePlex 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.asax code-behind file:
    • Import Combres namespace
    • Add this line to the first line of either RegisterRoutes() or Application_Start():RouteTable.Routes.AddCombresRoute("Combres")

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 介绍的更多相关文章

  1. ASP.NET MVC性能优化工具 MiniProfiler

    ASP.NET MVC性能优化工具 MiniProfiler 2014年04月19日 ⁄ ASP.NET ⁄ 共 1159字 ⁄ 字号 小 中 大 ⁄ 暂无评论 ⁄ 阅读 325 views 次 MV ...

  2. asp.net mvc 性能优化——(1)静态化

    asp.net mvc 性能优化--(1)静态化 在改善页面性能的同时,可能会采用静态化的策略,对于不能实时静态化的内容,则采用缓存.本文主要讨论如何实现cshtml的静态化(实际上还不是完全的htm ...

  3. mvc性能优化

    mvc性能优化 (1)移动设备卡顿问题 -1请求方式 在mvc中GET请求有问题,出现错误 在MVC中在进行GET请求获取JSON数据时,需要进行如下设置: return Json("&qu ...

  4. 网站性能优化— WebP 全方位介绍

    谈到优化网站性能时,主要目标之一就是减少要发送到浏览器的数据量(即 payload).而当前,图片通常是页面构成中最耗费流量的部分,因此降低图片的大小是一个最为有效的优化网页前端性能的办法. 有很多工 ...

  5. WEB开发性能优化--核心定义介绍篇(1)

    推荐理由 随着 互联网的蓬勃发展,并且伴随着产品功能的越来越复杂,对于技术人员来说最大的挑战就是如何在保证业务快速发展的同时,也可保证不断复杂的业务对用户体验的影响,其中对用户来说最重要的体验指标是如 ...

  6. PLSQL_性能优化索引Index介绍(概念)

    2014-06-01 BaoXinjian

  7. 记一次ASP.NET MVC性能优化(实际项目中)

    前言 在开发中为了紧赶项目进度而未去关注性能的问题,在项目逐渐稳定下来后发现性能令人感到有点忧伤,于是开始去关注这方面,本篇为记录在开发中遇到的问题并解决,不喜勿喷.注意:以下问题都是在移动端上出现, ...

  8. 【转】记一次ASP.NET MVC性能优化(实际项目中)

    前言 在开发中为了紧赶项目进度而未去关注性能的问题,在项目逐渐稳定下来后发现性能令人感到有点忧伤,于是开始去关注这方面,本篇为记录在开发中遇到的问题并解决,不喜勿喷.注意:以下问题都是在移动端上出现, ...

  9. ASP.NET MVC性能优化(实际项目中)

    前言 在开发中为了紧赶项目进度而未去关注性能的问题,在项目逐渐稳定下来后发现性能令人感到有点忧伤,于是开始去关注这方面,本篇为记录在开发中遇到的问题并解决,不喜勿喷.注意:以下问题都是在移动端上出现, ...

随机推荐

  1. PL/SQL程序中调用Java代码(转)

    主要是学习PL/SQL调用JAVA的方法. 平台:WINDOWS 1.首先使用IDE写好需要调用的java代码,再添加"create or replace and compile java ...

  2. UVA 11987 - Almost Union-Find(并查集)

    UVA 11987 - Almost Union-Find 题目链接 题意:给定一些集合,操作1是合并集合,操作2是把集合中一个元素移动到还有一个集合,操作3输出集合的个数和总和 思路:并查集,关键在 ...

  3. zoj 3203 Light Bulb,三分之二的基本问题

    Light Bulb Time Limit: 1 Second      Memory Limit: 32768 KB Compared to wildleopard's wealthiness, h ...

  4. android 性能測试iozone篇

    一:简单介绍 iozone是一个文件系统的benchmark工具, 用于測试不同的操作系统中文件系统的读写性能, 能够測试下面13种模式 0=write/rewrite 1=read/re-read ...

  5. 你可以不知道原因,但是,我们不能停止努力。httplook抓取路由配置界面信息

    因为实验室的项目要求,需要动态控制路由的配置信息,我们知道.路由选择需要购买的访问后,:http://192.168.1.1 路由配置页面.配置,不须要人手工操作.甚至定时任务配置的时候,就须要进一步 ...

  6. JAVA类型修饰符(public,protected,private,friendly)

    JAVA类型修饰符(public,protected,private,friendly) public的类.类属变量及方法.包内及包外的不论什么类均能够訪问:protected的类.类属变量及方法,包 ...

  7. 移植X264成功

    http://blog.csdn.net/mashang123456789/article/details/8673426 http://blog.csdn.net/b5w2p0/article/de ...

  8. EF中的贪婪加载和延迟加载(懒加载)

    在上一章中,我们使用了Linq对Entity Framework进行了一个查询,但是通过学习我们却发现了懒加载给我来的性能上的开销是很到的,尤其是在循环中,如果数据量不是很多的情况下还可以接受,如果数 ...

  9. 【LeetCode】Set Matrix Zeroes 解题报告

    今天看到CSDN博客的勋章换了图表,同一时候也添加显示了博客等级,看起来都听清新的,感觉不错! [题目] Given a m x n matrix, if an element is 0, set i ...

  10. .NET 各种问题汇总

    1.i++ 与++i的区别 using System; class TestApp { public static void Main() { int i = 8; int count = ++i;/ ...