Speed up your Website

Posted in PHP by

A fast loading and responsive website is important for success, because nobody likes to wait and visitors will close your website, if it doesn't load fast enough. We present you five tipps.

Compress Javascript Compress, minimize and combine your javascript files. Serving one single compressed file is a lot faster then serving more uncompressed files.

Combine CSS Put all your stylesheets into one, and again minimize it. Enableing gzip on your webserver can compress them further.

Use less Images Only use images for your logo and for content. Every article or blog post should have a picture, but there is no need to use pictures for buttons or the page design apart from your logo.

Do processing on client site If possible try to process things like filter options and other heavy requests on client site. It will lower your server ressource demand, and improve speed for the visitor, because processing without networking need is fast.

Process in the background The purpose of php is to generate html dynamicly. You should try to process other tasks in the background. You can use cronjobs or similar. Just write your "job" in your database and let a background process take care of it. If you don't have much visitors in the night, you can do backups or pre and postprocessing there. Only do the minimum needed while serving a page.

Published at , Updated at 2011-10-25

next: Best Practices Coding Guidelines prev: Exception