3 votes

uCompressIt

At last a relatively simple way to compress your javascript and css files on the fly. uCompressIt is a couple of handlers that will take in your css/js and compress/minify it so that there is less to travel over the wire

This in theory should result in less time to download your page and as a result can help with rankings as faster sites rank higher than slower sites

A couple of handlers need to be  added to your web.config file:

 <!-- to compress css and js files -->
      <add name="js handler" path="js.axd" verb="*" type="SimonAntony.Umbraco.Library.Compression.HttpHandlers.JavaScriptHandler" resourceType="Unspecified" preCondition="integratedMode" />
      <add name="css handler" path="css.axd" verb="*" type="SimonAntony.Umbraco.Library.Compression.HttpHandlers.CssHandler" resourceType="Unspecified" preCondition="integratedMode" />

To use the handlers, replace your calls to the css/js files as below and thats it.

Before

<link rel="stylesheet" href="/css/default.css" type="text/css" media="screen, projection" />      <script type="text/javascript" src="/scripts/default.js"></script>

After

<link rel="stylesheet" href="/css/css.axd?name=default.css" type="text/css" media="screen, projection" /><script type="text/javascript" src="/scripts/js.axd?path=default.js"></script>

 

I've only tested on 4.7.1 and IIS7 so far - there are no Umbraco libraries involved so should work on all versions although the handler code *may* need modification accordingly.

Should work on IIS6 I think but please test and let me know so I can update accordingly.

Interested in seeing how this can be improved or if there are any issues with it so feel free to chip in. Will make the source available soon but if you ask in the meantime, i'll send it along.

Note

The core code used is that as provided by Microsoft in their Blogengine.net project. It's all open source and the originating licence for that code also applies here.

HELP

Not managed to get the package handlers working yet so cannot install the Handlers into the web.config file!!! Been busy working on paid work so it anyone can assist, please drop me a line

For the time being you will need to add the handlers to the system.webserver/Handlers section.

 

 

 

 

 

Screenshots

Package owner

Simon steed

Simon steed

Simon has 686 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Simon steed
  • Created: 10/11/2011
  • Current version 0.2
  • License MIT
  • Downloads on Our: 1.5K

External resources