Optimize your CSS and JS with CakePHP in minutes

O

One of my first articles discussed YSlow.  An excellent Mozilla add-on to help you understand why your web page may be loading slowly.

In that article, I describe the importance of gzip, minify, and grouping your Javascript and CSS code into one file each.

Just recently I was surfing CakePHP’s bakery and found a nice add-on to simplify the process and make it super easy.

The helper is called PHPSpeedy Helper.  It’s quite simple to set up.  First you download PHPSpeedy and extract it to your vendors directly.

Next up you install the helper provided and update your app_controller.php to automatically include the helper each time.

Next time you load your web site (make sure debug mode is 0) PHPSpeedy will compile all of your Javascript and CSS into one file each and minify it for you.

The first time the page loads it will be a bit slow while it compiles and minifies, don’t worry this is only a one time thing.  Next time it will be lightening fast.

View the full article from the bakery here:
http://bakery.cakephp.org/articles/view/phpspeedy-helper

* Please note: I did not build this helper, so if you require help, please comment in the Bakery to get the authors assistance.

Time to get back to developing!

About the author

  • http://www.medexpressrx.com/kamagra.aspx kamagra

    I feel so relaxed and surely much updated after reading the articles that you keep updating on the website. It relieves me a lot and at the same time informs me because there according to me isn’t anything that is much informed as you are.

  • http://www.xldrugstoreonline.com/ordine-now-suhagra-online-it.html Comprar Suhagra sin receta

    All products are sold us the absolute quality of products and contains active ingredients. We are very proud of the fact that economic

  • http://www.acheterkamagraonlinefr.com/acheter-kamagra-online-en-ligne-france.html acheter kamagra online

    All transactions are done with us is absolutely safe and follow standard guidelines. Your personal information is absolutely safe with us, and we guarantee our customers that their information will never be leaked to third parties.

  • http://www.comprarkamagra.biz/compra-kamagra-subito-italy.html Compra Kamagra

    This impressive information like each reader. Thank you!

  • Pingback: Stars rake in the swag as Emmy gift suites abound (AP) | Sea World

  • Pingback: paladin pvp guide

  • Pingback: hunter pvp

  • Pingback: secrets 4 loss weight

  • Pingback: Goozle Zone

  • Pingback: ania quisumbing

  • Pingback: bad credit loans

  • Pingback: guayabera for kids

  • Pingback: song downloads

  • Pingback: payday loans online

  • Pingback: ultimate power profits

  • kamagra

    Kindly share more information about it

By Jamie

My Books