Jump to content

How Does A Search Box Work


s4surbhi2218

Recommended Posts

Depends how the search is set up. A blog search could retrieve matches on slugs and tags of posts. A website search can retrieve either titles based on slugs or scan entire page content (a little too much for me). You could cache previous searches and return the results of that search when someone else runs it. There's loads of methods that can be used to search websites.

 

Ultimately you have a search term and content in a database; the database could be anything from MySQL to a text file. The algorithm used to gather results varies from one specification to the next.

 

http://en.wikipedia..../Clean_URL#Slug

The search box itself is built with CSS, using image sprites. I can't really tell if this is what you're asking. But basically, the form is wrapped with a div with this background:

 

search-bg.png

 

And then the button itself has this as a background:

search-btn-bg.png

 

Then depending on the state of the button/form, the background's Y offset is adjusted.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.