Tag archives for optimization

CakePower Assets Version
prevent undesired assets caching!

CakePOWER allows you to add a virtual version name to all your assets:

// app/Config/core.php
Configure::write('Asset.version', '1.0.3');

Every assets url created through CakePHP helpers will be postfixed with that version string:

<script src="/js/foo.js?v=1.0.3" />
<link href="/css/foo.css?v=1.0.3" />

You should manually change version’s string whenever you upload new version of your assets forcing all clients to download new copy of libraries, stylesheets, images, etc!

Continue reading »

Posted in CakePHP, CakePOWER | Leave a comment

PhpCompiler – PHP deployment utility

Today I wrote an utility class to quick deploy my PHP based projects: PhpCompiler.

It copy all files from a /source path to a /-compiled path with these utility:

  • follows symlinks to create a ready to FTP deployed path
  • allow to skip files and folders by rules
  • optionally removes all comments from PHP files (by rules)
  • optionally uglify PHP files (by rules)

Continue reading »

Posted in Script, Tips & Tricks | 1 Comment

Javascript Optimization: variable’s scope

Variables are places where you store values.
When doing some logics you always need to access variables.

Do you know accessing local variables is better than accessing globals?

Continue reading »

Posted in Script, Tips & Tricks | Leave a comment

CakePower embed CssMin to minfy CSS on the fly!

Hi CakePowers!
today I embed CssMin utility into CakePower plugin to minify your CSS on the fly.

This is a zero-configuration add-on and works with Less compiler layer to offer the best way to write CSS for your pages and applications!

When your Configure::read('debug') is set to “0″ value any compiled LESS source is minified  to offer the smallest possible footprint for your styles assets.

Posted in CakePHP | Leave a comment

Swedish Greys - a WordPress theme from Nordic Themepark.