bloginfo('name');

bloginfo('description');

Web page loading performance tipps

August 2nd, 2007 by Blu:RayNe

The Storyteller has made some suggestions on his his blog to increase web site performance that are also worth a look  if you already compress your JavaScript or CSS ;)

For example, expiring for some static content like or images is much better than then the well-known E-Tag, that only updates content when something has changed. Expire only updates (or makes a connection) when the local files have timed out. So Images won’t change. But if you wanna prove me wrong, just use Internet Explorer which always makes connections, even if it doesn’t parse any HTTP results (?!). Damn browser!

Making fewer HTTP requests:

Each time file loads from your web server, it generates an http request. So you can reduce number of http requests by caching some contents which are almost static or changes very rarely. if these contents are loaded from browser cache, there will be no request for them over HTTP. You can use apache’s mod_expire module to cache specific tyyou (image, swf etc) of contents in your site. The following line in httpd.conf loads mod_expire successfully.

LoadModule expires_module modules/mod_expires.so

After that, write the following lines in .htaccess to cache all the image, swf and javascripts for one month from the current date, with the help of mod_expire

ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType application/x-Shockwave-Flash A2592000


And here’s a PHP equivalent:

<?php
header(”Expires: “.gmdate(”D, d M Y H:i:s”, time()+600).” GMT”);
header(”Cache-Control: max-age=600″);
?>

More tips can be found here.

Filed under Allgemein having No Comments »

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.