Website Speed Optimization

Website Speed Optimization

Introduction: Maintaining fast responding web pages are a prerequisite to a successful website. There truly is a small list of things that are more important, and investing time into ensuring a speedy website is not without extensive benefits.

 

There are many things you can do to ensure your website is running optimally, however, your first concern you should have over the speed of your website is what your building it on initially. I am talking about your website’s host. If your host does not offer you the performance that is necessary to properly run your website then you must find a company (which there are many) that can.

lamborghini-brno-racing-car-automobiles-vehicles

It is absolutely vital for the success of your website to have quick loading web pages. Once your website’s loading time exceeds 3 seconds, your potential customers will start to abandon your website due to not being satisfied with your website’s response time. If you are over 4 seconds, it is highly unlikely to get customers to take advantage of anything you are offering on your website. For a visitor who has never come to your website before (therefore have not cached data from your website) a rule of thumb to keep for an exceptional site’s loading speed is 2 seconds or less.  This is important to have in mind when you consider other devices that potentially are slower due to hardware, browser or internet speed.

 

Below I will outline the most effective methods to develop a speed optimized website:

 

1. The Right CanvasBuild your website on a solid platform/theme, this will provide a secure and a fast base to work on from.

2. CompressionThe compression of certain data allows for much faster response rates. This can be broken down into two main areas to be concerned with:

a. Gzip your website’s filesCompresses web pages and other aspects of your website into much smaller files.

b. ImagesUploaded images that have been compressed from a “lossless compression” software are dramatically reduced in size while retaining the quality of the image. This is a necessary step to ensure fast loading times, especially once many images appear on a particular page. Additionally there is certain software such as WP-Smush will perform additional image compression on your files to save even more bandwidth and speed up your website in the process.

3. Cache PluginUsing a cache plugin with your content management system provides returning visitors a quicker load time. There are several options, one I can recommend would be WP Super Cache. However please be advised, if the cache plugin is not setup correctly it will cause severe issues.

 Side note:  It is important to ensure that your website is running up to speed (3 seconds for load time or less) after your cache in your browser has been deleted, otherwise the loading time reflects visitors that have already viewed your website, as oppose to new visitors.

 Note To Developers:  While certain cache plugins are enabled, they can prevent new coding changes (through the FTP for instance) from rendering on the website. This can be frustrating if you overlook this, and it is extremely easy to avoid.

 

4. Database CleanupRemoving unnecessary data from the website’s database speeds up interactions with the database, which in turn improves speed. Some of this information that is not needed may include deleted comments, inactive users, etc. A reputable plugin to perform these cleanups for you would be WP-Optimize.

5. Turn of Pingbacks and TrashbacksBasically, these are not necessary and do more harm than good. You can turn Pingbacks and trashbacks off through the “Discussions” tab in “Settings”.

6. Slow PluginsMake sure that there are no plugins that happen to be slowing your site down. This is a very simple task, by using a plugin called P3 you can run diagnostics on all of your plugins and find out exactly which of your plugins are dragging on your server.

7. Use CSS SpritesWith a bit of CSS magic, you can create a single file with all of your images laid out together. This removes a lot of work the server needs to do. What would have been 15 server calls, is now just 1.

8. Keep-AliveInside of your Htaccess file, it is recommended that you turn on keep-alive which allows for multiple requests from the server, without additional permission.

Below is how you can do this with Htaccess, however to enable keep-alive in Apache or Nginx you must use the appropriate method for each.

Script for Htaccess - <ifModule mod_headers.c> Header set Connection keep-alive </ifModule>

 

9. CSS Over JavascriptKeep your CSS file(s) on the top and your Javascript at the bottom. This is how the server likes to read them, and is beneficial to load speed.

 Side note:  If your website is heavily dependent on Javascript files, putting them at the bottom can sometimes cause issues. This would be a time where you would have to make the appropriate adjustments to balance out loading speed with functionality.

 

10. Reduce CSS and Javascript Bring down the size of your CSS and Javascript files to improve render time.

11. Content Delivery Network A CDN is a network that delivers static pages to different users on your website based on their geographic location to each server.

12. Trade PHP for HTML – Now onto the elephant in the room; if ever possible, replace any PHP with HTML. HTML handles requests much faster than PHP.

php-elephant-citreq

13. The Clean SweepLast but not least, if there is anything that can be removed, remove it. This can include extra widgets, irrelevant content/images/videos etc.

 

With the above techniques, you can ensure that your website is going to be running fast without sacrificing the quality of other aspects of your site. Keep in mind though that website speed optimization is a task that never ends, and it should be a task that starts before your website is created. Starting with your hosting company. I hope these tips were useful and if you are needing any help, or want to buy me a beer don’t hesitate to shoot me an email.