• → Themes, Design, Downloads
  • → Reviews, Essays, University
  • → Mixes, Tracklistings, Mp3s
  • → Daily Ramblings
  • → Simpsons, Family Guy & more
  • → Contact, RSS, Search, Lifestream
  • → The Author

Recent Themes

  • → Wordpress
  • → Articles
  • → Music
  • → Dailies
  • → Links
  • → Meta
  • → About

Julian Klewes has released several free Wordpress Themes so far. The most recent design, code and Wordpress related entries are listed below:
Better known in the Wordpress community as 'jez', Julian Klewes has made his name for releasing unique Wordpress Themes and writing articles about Theme ethics and Sponsoring. Theme Overview | Contact
Not important enough to appear at the mainsite, yet too noteworthy to be left out... ↵
Click any of the headlines to continue reading.
Please note that I am not responsible or affiliated for/with the linked content. This website is merely an index of what is currently available on the internet. Read on | Contact | TOS

  • Log in | You are welcome to and guest-post on this blog
  • Search | This page too chaotic for you? Click, Scroll and Search...
  • RSS Feed | Subscribe to receive the latest posts
  • Contact | Need to Contact me? Use the Contact form | ICQ | MSN | or AIM*
  • Tagcloud | The bolder and bigger the tag, the more I write about it
  • Lifestream | A passive recording of my life streaming away...


C. Julian 'jez' Klewes is a 23 year old student from Germany. Living in kempen, nearby duesseldorf, London, UK, he studies International Business and Management Studies at Fontys in Venlo, the Netherlands. In the past years he published different kinds of work on the web and did freelance designing, as well as consulting and researching.This websites offers free Wordpress themes, many comprehensive link collections of The Simpsons, Family Guy and other Cartoons, but also semi-professional Progressive Trance music mixes.

Welcome to h4x3d.com. Click the menu items above ↑ to access the most recent category posts. Another click resets the menu.

Compressing moo.tools (javascript) even further

25th April, 2007 (April 25, 2007) | Last modified on April 25, 2007


Moo.tools is neat, I love it and use it whenever I can, but one thing is still bugging me: its size.
Even though moo.tools can be downloaded compressed (using the great php5 version of dean edward’s packer), I personally find 18kb of javascript too much.

So I started researching a bit with Google and found out different way of compressing moo.tools (or actually whatever javascript you have) even further:

The first method, which I am using works like this:
+ You rename your javascript file (moo.tools) from the original filename.js to filename.js.php
+ Open the file with your favourite editor and add the following line just at the very TOP of the code:


< ?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?>

+ Next, scroll down to the end of the file in your editor and add the following to the bottom:


< ?php if(extension_loaded('zlib')){ob_end_flush();}?>

+ Save your file and upload it.

Now add it to your website using the old HTML code, but keep in mind to add the .php-file extension.
It might look like this:



I was able to reduce the whooping 18kb moo.tools down to 9kb this way. Well, actually I did not do anything, but the server and its php and zlib.

Other methods:
At the top of Javascript:


< ?php
ob_start ("ob_gzhandler");
header("Content-type: text/javascript; charset: UTF-8");
header("Content-Encoding: gzip");
header("Cache-Control: must-revalidate");
$offset = 60 * 60 ;
$ExpStr = "Expires: " .
gmdate("D, d M Y H:i:s",
time() + $offset) . " GMT";
header($ExpStr);
?>

.htaccess method
Save a compressed javascript file as *.jgz, and write .htaccess like this.


RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ".*Safari.*" [OR]
RewriteCond %{HTTP:Accept-Encoding} !gzip
RewriteRule (.*)\.jgz$ $1\.js [L]

AddType "text/javascript;charset=UTF-8" .jgz
AddEncoding gzip .jgz

Filesmatch .htaccess method:



ForceType text/javascript
Header set Content-Encoding: gzip


RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !".*Safari.*"
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule (.*)\.js$ $1\.js.gz [L]
ForceType text/javascript

Sources / Ideas:
1. paulstamatiou.com
2. randomnetworks.com

If you enjoyed this post, make sure you subscribe to my RSS feed!

Related posts:

  1. Wordpress Themeviewer opened again Hooray fo




Tagged with:



There is a lot to discover on h4x3d.com, browse through the Archive, consult the Sitemap.

About the Author

C. Julian jez Klewes is a 23 year old student from Germany. Living in kempen, nearby duesseldorf Living in London, UK, he studies International Business and Management Studies at Fontys in Venlo, the Netherlands. In the past years he published different kinds of work on the web and did freelance designing, as well as consulting and researching. Care to donate some spare money to h4x3d.com ? | Thanks