Articles in Code

Three ways to speed up your site

One thing that is always on the mind of a developer is optimization. Business requirements generally don’t specify optimization or speed unless it’s slow or the return on server overhead is noticeably not proportional to the return. As a developer it falls, and rightfully so, to us.

Here are three really easy to reduce download time, actual and perceived.

Put the javascript at the bottom to the page. A browser loads only a couple of things at a time, and you don’t really need javascript mucking up the works. There are very few reasons why you’ll nee javacript to run before of while the page is loading.

Use image sprites. An image sprite traditionally is an image file for, say, a button with states for when you hover over the button and when you click on a button. So instead of having three files for one button, you’d have one. The file size is going to be a little larger, but weighing the file size verses server request makes it worth it. Expecially if you have a bunch of buttons.

Speaking of image sprites, do what you can in CSS. CSS has come quite a ways, so there is a real possibility that the button or the effect might be done in CSS. CSS will almost always be less expressive than images.

Posted on Friday, February 17, 2012 in Code

Day/Night theme switcher

I posted my first project on GitHub. It’s a very simply Day/Night theme switcher built on jQuery based on the client time. This is not a new idea by any stretch of the imagination, something I thought was cooll. I’ve wanted to try GitHub for a while and this seemed like a good first step to try it out. As for the switcher, I tend to work on projects that are proprietary or not viable as an open source project; I thought this was a good opportunity to finally build this for tobiaswright.com, which I should implement soon. Anyway, enjoy.

Posted on Sunday, May 08, 2011 in CodeProjects

Page 1 of 1 pages