Friday, April 02, 2010

Custom Search Bar

I started to add a new Google search bar to the web site. The new version of the search bar replaces the current one already used on the site. I'm not really sure when Google came out with the new code. I'm also not real keen with the reduction in options, but that's another story.

The code for the search bar is only 430 characters, while the current version used contained 1,910 characters. That's a reduction of 1,480 characters per html page [depending on the search bar used]. So a character is one byte of text, or 8 bits of data. Eight bits x 1,480 bytes = 11,840 bits per page ~ that's the size of a pic file.
Say 10,000 page views a day x 11,000 bits, that's 110M Bytes per day.

Now I've only started to change the search bar on a few pages so far, so I'll be changing the code the rest of the year. The pages with the search bar at the top center of the page keep the same location. While the Dictionary style pages with a side bar will have their search bar moved up to the top of the side bar. Although you should keep the search bar in the same place for all your pages so people can't find it. These pages are having it moved to the top, just to the right.

I may be saving 110MB of bandwidth/day, but the pages are getting larger as the site grows. So in reality I will not see any reduction in bandwidth, maybe just keeping the bandwidth around the 13G Byte number. Take note of the last posting to see the increase in bandwidth over the last month. Remember it's nice to load up a page with graphics or what ever but keep your visitors in mind and keep the page-loading time down. Otherwise you my have people clicking away because the page takes to long to load.

Today I'll add the new search bar to the few dozen pages that get down-loaded the most, that way I'll see an immediate reduction in bandwidth. The other pages can wait until they need some other up-date.
Graphic; US Coast Guard HH-65C helicopters.

4 comments:

Leroy said...

4/2/10 I did go ahead and change the search bar on the top [downloaded] 13 pages. That equals 271,286 pageviews so far this year, or around the same number over the next 4 months. That would be 401M Bytes saved over the next few months! That's almost my bandwidth for a day ~ which runs around 550MBytes.

Six of those pages are overly large, so it should really help with page load time too.

Leroy said...

4/2/10 I just realized as I was up-dating some of these dictionary pages, pages that have yet to updated in 2010.

Well guess what I've been adding title tags to those pages on the links to the dictionary index. So the title tag text comes out to 1,296 characters, which just happens to be the amount of text that was reduced by the new search bar.

So I figure none of the dictionary, or manufacturers pages will see any reduction in bandwidth ~ unless you miss the benefit of the html tags. It's a wash for any page no yet updated this year, while pages that already have the tags will see a reduction.

Leroy said...

4/6/10 I just went ahead and traded out the search bar on some of the larger pages. So I've got it on some random pages, pages that are downloaded the most and pages that require a lot of bandwidth.

Leroy said...

5/22/10 I just up-dated another 60 pages with the new search bar. So now there should be around 1,430 web pages with the new search bar, maybe leaving another 200 pages. I guess this task is pretty much complete.

I can't really tell yet if the new search bar is being used more than the older one yet or not. Page hits are down a bit this month and so is search bar usage ~ but they seem to track, guess I need more data......

Post a Comment