Web evelopment is an ever changing field. What is the rule today might be overturned tomorrow. There are plenty of best practices guides available, however when creating a website you definitely need to think about both the good and bad effects of each technique or design choice you make.
Web development is an ever changing field. What is the rule today might be overturned tomorrow. There are plenty of best practices guides available, however when creating a website you definitely need to think about both the good and bad effects of each technique or design choice you make.
Below you will find (in no particular order) 4 double-edged choices with their benefit as well as flaws.
Google Analytics Code Placement After the Body Tag
There are two main places to locate your GA code. It used to always be just before the closing body tag – . However recently there has been a movement towards placing it just after the opening body tag at the top of the document.
Pros
By keeping it that high in the source you make sure it is loaded immediately when a user visits your page. This in turn provides more accurate statistics.
Cons
Because the script is loaded before your content it can cause delay and in fact turn your visitors away because of the increased load time. In worst case if for some reason the script could not be loaded you would be facing a long time before the browser proceeds with rendering your page.
CSS Sprites
Sprites are a popular name for putting several graphics into one image file. Using a grid
Pros
They are great for icon sets or storing more than one state of an image in one place. It saves loading time (by reducing the number of http requests) as well as image file size. They also help to keep your stylesheets more organized.
Cons
As with many other techniques you should be aware of their limitations – they work best with similar colour pallets of all the graphics in a sprite. Also they require at least one dimension (width or height) to be fixed. Lastly you should bear in mind that even when the file size is small the browser decompresses the image into memory, meaning if your sprite is big dimension wise it can cause problems.
Optimizing Article Content Length
For quite a while now there seems to have been established a trend in content writing that both for SEO purposes as well as matching the average visitor’s attention span the article length should be somewhere between 350-500 words.
Pros
This length does seem to be the established best performing article. It ensures you are not posting two-sentence news, while not producing essays too long for most online readers either.
Cons
If you are serious about you content, and are not providing quick, fact-laden news stories, than this size will obviously limit the depth of your article. If you do have a lot to say on a topic, rather than trying to cram it into the ‘accepted’ size try splitting it into pages.
Displaying Dates with Your Content
When blogging it is quite common that each article / entry has a time and date next to it. However you might want to rethink your dating strategy.
Pros
When your articles are time sensitive having the date reassures the reader about the freshness of your data. It can also help to show that the website is still alive and new updates come regularly and frequently – meaning the site is worth coming back to.
Cons
While all these points are valid for an established site with regular input, they might actually harm a small less frequently updated websites. If you have timeless content which you want to keep providing but do not intend to update regularly seeing that the site was last updated 5 years ago might turn away your visitors.













August 24th, 2009 at 8:50 am
A fairly extreme example of CSS sprites gone bad
http://blog.vlad1.com/2009/06/22/to-sprite-or-not-to-sprite/
September 26th, 2009 at 4:34 pm
Google Analytic Tool is a very useful one which I always prefer to use. CSS is a well proven thing, so, nothing to say about that. Thanks for explaining the both i.e. Pros as well as Cons of each.