Speeding up website in 14 easy steps


I would like to share with you an excellent video presentation on optimizing websites. It shows the actual optimisation process for huge websites done via simple 14 steps. You could take them into account and optimize your website loading time. In a summary they are:

1. Reduce the HTTP Requests - use Firebug Extension for Firefox, goto Net tab and see if you can merge your .css, .js files and use sprites for images.
2. Use a Content Delivery Network
3. Add an Expires Header to skip the loading time of an already saved offline content from Internet:

<?
header("Expires: ".gmdate("D, d M Y H:i:s", time()+315360000)." GMT");
?>
4. Add Gzip Compression to reduce webpage size send to browser. I've managed to get 50% faster pages by using this method in PHP:
<?
ob_start("ob_gzhandler");
/* your webpage code */
ob_end_flush();
?>
5. Put Stylesheets at the top of the page to ensure that Internet Explorer will display the webpage content first
6. Put Scripts at the bottom to show content to the user first and continue with the scripts loading
7. Avoid CSS Expressions
8. Make JavaScript and CSS External - to have them in the browser's cache.
9. Reduce DNS Lookups - this way you'll split overall loading time of the page by increasing the number of simultaneous HTTP requests.
10. Minify JavaScript - obfuscate and compress the code
11. Avoid Redirects
12. Remove Duplicate Scripts
13. Configure ETags
14. Make Ajax Cacheable:
<?
header("Expires: ".gmdate("D, d M Y H:i:s", time()+315360000)." GMT");
header("Cache-Control: max-age=315360000");
?>

High Performance Web Sites and YSlow
video:
http://www.youtube.com/watch?v=BTHvs3V8DBA
and article:
http://developer.yahoo.com/performance/rules.html
Next you might be interested in optimizing your JavaScript? - here is a nice tutorial on the subject:
Efficient JavaScript from Opera software: http://dev.opera.com/articles/view/efficient-javascript/


Update: here are another 20 steps which you can incorporate into your website:

0 коментара: