SingleSearch Tips             

There are several benefits to using SingleSearch mode: above all, Searchlight only has to make one Internet connection to retrieve its data rather than making a new connection for every file to be searched, which gives a great saving in time.

The two negative aspects to this option are: (1) You'll essentially be uploading two copies of your pages to the web server - the page itself, and the copy in the SingleSearch file. Since these files are only plain text the sizes are pretty small, of course.   (2) If you update an HTML file that's supposed to be searchable, you might also need to update the copy in the SingleSearch file (if the changes have an impact on what a search of that document will produce).

Now two tips to counter those negatives:

  • Rather than copy entire HTML pages into the SingleSearch file, you could just create lists of the key words and phrases that relate to a particular page. For example, if you have a web page about camels called camels.htm, put something like this in your SingleSearch file:

    camels dromedaries quadrupeds ships of the desert spot the hump competition
    ^camels.htm
    ^My Camels Page
    ^

  • Using a crafty dodge, you can also force the SingleSearch file to be cached on the visitor's computer in advance, so that if he chooses to run a search the applet will become active almost immediately. To do this, first make sure that your SingleSearch file has a .HTM or .HTML extension (so that the browser can handle it without prompting the visitor). Then add an 'invisible' frame to your site. As an example, if you don't currently use frames, create a new HTML file (let's call it 'index.htm') that loads your homepage ('home.htm') and your SingleSearch file ('search.htm'):

    	<FRAMESET ROWS="100%,*" FRAMEBORDER="NO" BORDER="0" FRAMESPACING="0">
    			<FRAME NAME="mainframe" SRC="home.htm" SCROLLING="AUTO">
    			<FRAME NAME="hiddenframe" SRC="search.htm" SCROLLING="AUTO">
    	</FRAMESET>
    

    We've created two frames here, but one takes 100% of the window area, leaving 0% for the other. Nevertheless, the browser happily loads your SingleSearch file into this frame, although no-one can tell it's there. And, of course, in doing this it's caching the SingleSearch file in case it's needed again.

    If you already have a frameset page, adding an extra invisible frame is just as easy. Just make sure that the specified frame percentages add up to 100%, then add a comma and asterisk to create one more frame, plus a <FRAME> tag in the correct position to specify the name and source file of this hidden frame.