Question

I am trying to find a nice solution to concatenate and compress javascript and css in my webpage to improve YSlow performance. The website is built using ASP.NET in both VB and C#. I seen some cool tools, like Cassette and Chirpy, but they both seem to need some aspect of the MVC framework that I don't have. Any ideas?

So far the best I've found is a version of Chirpy that will do compression and whatnot inside visual studio, which is cool, but not as automated as I would like.

Was it helpful?

Solution

SquishIt is fairly useful and simple to setup.

It uses YUI Compressor and can minify CSS/Javascript.

OTHER TIPS

I use YUI Compressor. Its nice because every time you build your project it will automatically minify it for you. Lots of good tutorials out there for it as well. I used this page to figure out how to configure my .xml file. Link

We used FrogMSBuild to combine files and MS Ajax Minifier to minify the resulting files. See my short summary on how to set them up in a web project.

Check if Microsoft Ajax Minifier would fit your needs. Do you need a dynamic/runtime or static/compile time minifier?

Here is the snippet from the project build file.

  <!-- Ajax Minifier -->
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\MicrosoftAjax\ajaxmin.tasks" />
  <Target Name="AfterBuild" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <ItemGroup>
      <JS Include="**\*.js" Exclude="**\extJS\**;**\extJS_extensions\**" />
    </ItemGroup>
    <AjaxMin JsSourceFiles="@(JS)" JsSourceExtensionPattern="\.js$" JsTargetExtension=".js" />
  </Target>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top