Thursday, September 08, 2005

JavaScript Text Highlighting

Between the two, Google and MSN probably comprise about 80% of all search engine traffic, and that's being pessamistic. Basically, people either use the search engine that ships with their operating system, or they get a fucking clue and use Google. Anyway, the reason I point this out is that they both use the variable "q" in the query string, and this here text highlighting function is set up to read that variable.

Now if I were to add this feature to I site I'd be a little more subtle/devious about it. Instead of aweful yellow highlighting I'd do something like make the text bold, or maybe increase the contrast a little. My aim would be to make the visitor's keywords more obvious without screaming, "hey, look here, I know what you're searching for!"

No comments: