Revisiting HTML5 placeholder fixes

I had a detailed look at my analytics for the first time in a while and I noticed I pick up quite a bit of traffic from StackOverflow.com which was quite interesting. Digging further I had a look and found most of it is to the quick JQuery based HTML5 placeholder fix I posted a while ago.
As pointed out by some Stack Overflow commenters there are elements of the coding that are less than ideal so I thought I’d address them and see what can be done.
Continue reading

Responsive web design – should we turn it off?

There is always plenty of talk about responsive web design (RWD) and a few articles have jumped out at me recently.

I have a few thoughts, of course, and some approaches to stuff myself.
Continue reading

A table for 200,000 – quick website database table optimisation

A huge increase in traffic working with http://www.loverugbyleague.com has led us to looking at many ways to help improve the way the site works to try and squeeze more performance out of the current server. One of the first things that was noticed was that with the increase in access the database tables were locking up and delaying return of results and causing problems.

A look into the setup of the database exposed an issue as all the tables were using MYISAM which, as far as I know, used to be the default for a phpmyadmin table. I’m sure all but the most savvy of us give little thought to the type of storage engine we use for a table and just stick with the default, however it became apparent MYISAM was causing us a few problems and isn’t really suitable for high traffic, high access sites.
The problem comes with the fact that MYISAM will lock up an entire table when doing anything on a row, including accessing, updating and inserting rows, and as a result requests quickly queue up and start to grind everything to a halt during high traffic periods.

The tables were therefore switched to InnoDB which works with row level locking, meaning that rather locking up the entire table it will lock up only the row in use and allow the rest of the table to be accessed. This means that multiple requests can be made to the same table at the same time provide they are reading/updating different rows. It is much more suited to high access on large tables, especially where different rows are being accessed in the table, if the same row needs to be accessed repeatedly it may be worth looking at some caching of that information.

The change quickly reduced the number of locked requests and things started to run a bit more smoothly. There have been other things looked at to help optimise the site and it’s quickly apparent there is a huge amount to do in helping squeeze out every bit of performance of a site but taking little steps like thinking more about your database storage can really start to help.

A look ahead to the rest of 2012

V for Vendetta

IMG Source: http://www.flickr.com/photos/kashklick/3406150405/sizes/m/in/photostream/

A little late, this post was supposed to go up on Six Revisions at the start of the year as “Five things that will keep shaping the web in 2012” however there were a few issues over there so I’ve decided to publish it here anyway. As it was written at the end of December some of the things may already have moved on a little.

So having looked back at last year’s predictions and having survived a sober new years eve (I was driving and had places to be on New year’s day) I’m back to have a look at what 2012 might have in store for us.
Continue reading