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.
Anything goes!