Saturday, May 29, 2010

Sprite Sheets Made Easy

Using a few well-placed images on a web page can do a lot for the user experience. During the development of a website, the amount of images being used can really add up, causing multiple server requests when a page is loaded. To combat this problem sprite-sheets can be used so that all of the images that are used in the website layout can be combined into one file which then only requires a single server request and can be cached in the browser.

CSS is used to position the sprite-sheet in such a way that the user sees only the desired sprite. Creating a sprite-sheet can be done manually but there are plenty of free online-tools available to use. Today while I came across one such site called; Simply upload the images you need a sprite sheet of and click generate. This has been really helpful for me. I had a folder of various 32 x 32 px browser icons that have now been combined into a single image. Using this tool for combining related icons and other web page graphics I'll be able to reduce the number of requests being made to my server.

Friday, May 28, 2010

New TLD for my blog

I've busy rebuilding my server today. At the same time I decided to rearrange my domains. My blog used to be available through the domain but I've decided to use as it makes more sense to have information about myself on this type of TLD (Top Level Domain).

The process of reinstalling Wordpress and importing my old posts was not without complications. Due to the machines rebuild the directory structure is different from what it used to be. On top of this was the fact that I was changing the domain and a few other settings from what was used previously.

In order to get the blog working I downloaded the most recent version of Wordpress and did a fresh install. I had an SQL dump of the old database and a backup of the old files. The 'wp-content' folder needed copied over from its backup location as well.

At first I tried to use the entire database of the old blog but even after I had edited all the fields I could find relating to the old directory path and domain the site would not load. I reverted back to the database setup of the fresh installation and carefully populated the fields within the new MySQL tables. For the most part wp_options did not require many changes but most of the others could be cleared and then have the old entries inserted into them.

The final task was to edit some of the old posts that kinked to images. Wordpress uses the full URL path when linking to content within the wp-content folder so the domain needed to be changed to the new one. There may still be a few small issues left to iron out so please contact me if you find something that does not work correctly.