Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.
1 to 14 of 14
total page load should not exceed 30KB, then later 50KB, now it's not unusual to be almost 100KB.
I managed to keep my latest project at 40KB and it still looks reasonably good. I use a couple of caches for RSS feeds and news pulled from a database to keep the load times in check. Almost everything is compressed before being sent to the browser, not counting images, of course. YSlow for Firebug helped a lot, even though it has been criticized. The rating I got was 80, but I'm pretty sure I can get it closer to 90.
There are some tradeoffs to consider with all this optimization, so does anyone know a decent way of benchmarking websites or PHP code? WebKit and Firebug are both all well and good, but I'd like to hear about some alternatives, if you have any.

kari, I would love to see the design you did that was under 40kb and hear more about what you decided to give up or put in!
There will be a short testing period for the site starting later today. After that's over and the final revisions are made I'll post a link. I'm still working on a couple of IE tweaks that are driving me nuts.
One of the reasons for the excessive optimization is our current hosting company, which is subpar to say the least.
Here's an exercise for anyone who's interested: point your Firefox/Firebug combo or WebKit towards a nice looking page you like to visit. I'll bet that the CSS, Javascript and HTML are being served without using gzip or zlib.
For argument's sake, let's say that either kind of compression would cut the file sizes in half (actual results would most likely be a lot better). If the markup, scripts and styles add up to a 100KB that would either be 50KB less stuff to download or one more image to add to the bunch.
I'm thinking that this should be done without having to figure out whether or not the audience would prefer a site that loads a bit faster. This should be done because it's easy and it makes sense.
I'm thinking that this should be done without having to figure out whether or not the audience would prefer a site that loads a bit faster. This should be done because it's easy and it makes sense.
Let's take a look at rule #4 - Gzip components. You can compress your HTML by adding this line at the beginning or your index.php file
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>
and that's about it. The CSS part is also quite easy. Make a new PHP file in the same directory with your CSS files. Let's call it gzip-css.php.
<?php
// gzip-css.php
ob_start ("ob_gzhandler");
header("Content-type: text/css; charset: UTF-8");
header("Cache-Control: must-revalidate");
$offset = 60 * 60 ;
$ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
header($ExpStr);
?>
Then add this to your .htaccess file:
AddHandler application/x-httpd-php .css
php_value auto_prepend_file gzip-css.php
These two lines look for requests for CSS-files and put them through gzip-css.php, which will compress them. You should notice quite a drop in transfer sizes. Use either WebKit or Firebug with YSlow to compare the results.
P.S. I'd credit these lines of code to someone else, if I could remember who they were.
1 to 14 of 14