Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Barry 99 posts 187 karma points
    Aug 14, 2009 @ 14:08
    Barry
    0

    Gzip compression on js, css files

    Does anyone know how to implemenet this in Umbraco?

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 14, 2009 @ 14:13
    Thomas Höhler
    1

    Take a look at Peter's compression package

    Thomas

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Aug 14, 2009 @ 14:14
    Dirk De Grave
    1

    Have a look at Peter's package here. Might be what you're looking for (and will be included in v4.1)

     

    Cheers,

    /Dirk

  • Jonas Høiby 62 posts 53 karma points
    Dec 12, 2009 @ 00:50
    Jonas Høiby
    0

    how to use PeterD's package? :-)

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Dec 12, 2009 @ 06:09
    Aaron Powell
    0

    Actually just to clarify Dirk's post, we'll be using ASP.Net Client Dependency in Umbraco 4.1 - http://clientdependency.codeplex.com/

    But to use Peters package it's just a matter of putting in the appropriate http modules if I recall corectly

  • Jonas Høiby 62 posts 53 karma points
    Dec 12, 2009 @ 11:34
    Jonas Høiby
    0

    ive installed the package - no problems .. but ... once installed  .. how do i use it? :-)

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Dec 12, 2009 @ 12:37
    Peter Dijksterhuis
    0

    Hi,

    there's not much to use really, the package works automatically when you've installed it.

    Do you have a running website in your installation with a few css-files and js-files? If so, check the source of the pages of the website. You should see references to js.axd and css.axd instead of the regular stylesheet or script-references.

    HTH,

    Peter

  • Jonas Høiby 62 posts 53 karma points
    Dec 13, 2009 @ 00:59
    Jonas Høiby
    0

    Negative ... i do not see any references to any .axd .. thats what bothering me .. :s

  • wolulcmit 357 posts 693 karma points
    Dec 13, 2009 @ 10:33
    wolulcmit
    0

    Hi Jonas, have you altered your web config to enable compression?
    you need to add these (as in the post installation instructions):

    <add key="umbracoDebugMode" value="false" />
    <compilation defaultLanguage="c#" debug="false" batch="false">
    <scriptResourceHandler enableCompression="false" enableCaching="true" />
    Next, add 1 line to the <httpModules>-section

    <add name="HttpCompressModule" type="PeterD.Compress.HttpModule,PeterD.Compress"/>
    Next, add 2 lines to <httpHandlers>-section:

    <remove verb="*" path="js.axd,css.axd"/>
    <add verb="*" path="js.axd,css.axd" type="PeterD.Compress.CompressionHandler,PeterD.Compress"/>


    or if you're using IIS 7 and integrated mode then the following:

    in modules:

    <add 
    name="HttpCompressModule"
    type="PeterD.Compress.HttpModule,PeterD.Compress"/>

    in handlers:

     

    <add verb="*" 
    name="PeterD.CSSCompression" path="css.axd"
    type="PeterD.Compress.CompressionHandler,PeterD.Compress"/>
    <add 
    verb="*" name="PeterD.JSCompression" path="js.axd"
    type="PeterD.Compress.CompressionHandler,PeterD.Compress"/>

    Hope that helps and you get it working...

    - Tim

  • Jonas Høiby 62 posts 53 karma points
    Dec 13, 2009 @ 13:26
    Jonas Høiby
    0

    thanks .. :)

     

    dont know what it was - but its working now .. :-)

  • wolulcmit 357 posts 693 karma points
    Dec 13, 2009 @ 20:47
    wolulcmit
    0

    sweet, good to hear.... vote Peter's package up in the projects section if you get time. It's pretty nifty and he deserves the kudos :)

Please Sign in or register to post replies

Write your reply to:

Draft