Adding a search feature to a website
Posted on 21 Jul 2003 at 15:22
Adding a search feature to a website so that visitors can find items of interest on that site via a regular form is a useful and impressive trick. It stands to reason that any Web designer would like to offer this option to their clients, but most tend to assume it involves a huge amount of highly technical work.
The good news is that it's surprisingly simple, at least when the help of third-party search services are used. A number of companies offer search features that can be built into individual sites, providing direct, fast searching of a stored index of all the words in the pages of that site. The search feature offered by Atomz comes in both a commercial and a free-form version, and can be built into a site in just a few minutes, whether you're an experienced Web designer or a complete novice.
This tutorial covers the entire process of adding a free search feature from start to finish, and shows how to achieve this in both the designer-friendly Softpress Freeway and the programmer-friendly Macromedia Dreamweaver.
The Atomz search feature works by creating an index of the HTML text it finds on the pages at the location you give for that account. If your site makes extensive use of graphic images of text, note that these 'words' can't be indexed and so won't be searchable.
The indexing process begins by looking at the default page supplied by the Web server: almost always the index.html file. It stores a copy of all the text it finds there, follows each internal link it finds, indexes any text content on those pages and follows any further links. This process continues until all the pages that are available within the supplied URL and that can be found - whether via being the default served page or through links - have been read.
This indexing process won't touch pages outside the URL you supply, so if you link to www.apple.com anywhere in your site, you don't have to worry about your searches throwing up hundreds of pages from there. If you have an area on your site that you don't want indexed, but that is both within the URL you supplied and is linked to from one or more pages, you can use options in your Atomz account pages to specify pages or complete directories that shouldn't be indexed. This blocking ability has a few useful options; for example, you can choose to have a page followed but not indexed, or indexed but not followed, using a feature called URL Masks. The URL Mask field, where you type any URLs you want blocked, plus full explanation of the available controls, are found in the Options section of your Atomz account pages.
If you want to have a page indexed but none of the links followed, put its URL into the URL Mask field on the site as an included (rather than excluded) URL mask, with nofollow after the address. The page's text content will be read, but any addresses will be ignored. If you'd like a page's links to be followed but any text content to be ignored - for example, with a table of contents listing where it doesn't make much sense to use in searches but it does provide routes to many more suitable pages - then put noindex at the end of the line, as in include http://www.mysite.com/contents.html noindex.
Conversely, if you want to index specific pages or areas that aren't linked to from the main entry point, use the URL Entrypoints page to list these addresses. This is also useful if your site uses more than one domain for part of its content.
For more details about purchasing this feature and/or images for editorial usage, please contact Jasmine Samra on pictures@dennis.co.uk
Find a review
advertisement
Arctic Cooling Ultra Slim Case for iPhone 4
Category: GadgetsRating:
Price: £12
Proporta Kindle Book cover (2011)
Category: GadgetsRating:
Price: £25
SteelSeries SRW-S1
Category: GadgetsRating:
Price: £87
Aeris Muvman
Category: GadgetsRating:
Price: £341
Kingston Ultimate 64GB SDXC
Category: GadgetsRating:
Price: £110
- Mitsubishi L200 Barbarian Black announced
- Audi shows off AMOLED digital rear-view mirror
- Sony pulls out of Sharp LCD partnership
- BlackBerry Messenger for iOS and Android denied
- Mercedes-Benz confirms SL 350, SL 500 roadster pricing
- Mazda to work with Fiat on new Alfa Romeo
- Toshiba AT300 quad-core tablet announced
- Olympus 75mm F1.8 portrait lens launched
- Samsung Galaxy S3 most popular Android phone ever, says Vodafone
- Microsoft Office for iPad, Android tablets rumoured
Software Store
advertisement












