Introduction
A good navigation system around a web site is essential once a site grows this is because once a visitor lands on one of your pages they may be interested in reading more of what you have written.
I have always thought that websites should help their visitors and so my site has had a search function since 2004.
PicoSearch
One of the first search engines I put onthe site was a JavaScript based one. This meant the whole site index had to be downloaded for it to work. The index file quickly grew to close to 1Mb and soon became unmanageable.
In 2002, I scrapped the JavaScript solution and looking around found PicoSearch (Internet Archive).
PicoSearch search console on my site in 2013
PicoSearch was great. The free plan would index up to 250 pages but in early 2014, I received an email from them saying the service would end on July 1, 2014. Their website started carrying the message that:
IMPORTANT ANNOUNCEMENT
PicoSearch web service will end July 1, 2014
After 17 years of providing site search, we are informing you that PicoSearch is ending. As of this time, no new account registrations nor new payments will be accepted. Pre-existing accounts will continue to operate until July 1st, 2014.
Looking around at various other site search alternatives, I chose to put Google Custom Search Engine (GCSE) on my site.
Google Programmable Search Engine (GPSE)
Google has been offering a method of embedding a search engine to find information on a particular site since October 23, 2006. Originally known as Google Co-op, then very shortly after, Google Custom Search Engine (GCSE) and later still, Programmable Search Engine (PSE).
Belonging to the world's largest search engine specialists this worked perfectly on my sites, but in January 2026, something odd happened to the search console on my sites. It started to look different depending on which browser was used to visit my sites.
Google PSE in the Chrome browser
This is the way that previous to January 2026, it appeared in all browsers
Google PSE in the Edge and Opera browsers
Google PSE in the Firefox browser
Of course this should not be happening, it should be rendering the same, or nearly the same, in all browsers. The search console is a fairly complex table, I do not know why it needs to be so complex, but that's up to Google. Each part of the table is being rendered differently in the various browsers. For example, using the developer tools in the browsers, Chrome is rendering the main table at 363 x 29 pixels, Edge and Opera at 290 x 58px and Firefox at 208.5 x 30.5px.
The search results are not affected but the change in the console interface does not look very good. This is not just affecting my site but others as well such as the Trees of Stanford site. Their site used to look like this:
The old Trees of Stanford site
From the Google PSE Help Community, Google are doing two things that may be causing this. They are experimenting with both different UIs (User Interfaces) and creating the search results using AI (Artificial Intelligence). From how the console is appearing, I assume they are sending different code to the various browsers.
In early February 2026, the new wider GPSE search box appeared in all browsers. I like the Google site search, but I am wary when third-party utilities, which Is what I am using Google as, make changes to the design of the sites.
Some Workarounds
What the Trees of Standford did was to hide the search box completely and replace it with a search icon. Clicking on the icon activates a little JavaScript that shows or hides a div that contains the search box.
The Trees of Stanford site with the search icon
The Trees of Stanford site showing the search box div
Their code for doing this is:
<script>
function toggleSearchDisplay() {
var searchnav = document.getElementById("nav-search");
searchnav.style.display = (searchnav.style.display == "inline") ? "none" : "inline";
}
</script>
<img id="search-icon" src="images/_site/search-icon.svg" alt="search" onclick="toggleSearchDisplay()">
<div id="nav-search" role="search"> [Google search code] </div>
On my sites what I did was put the GPSE code inside two divs. The outer div is roughly the same height as the original Google code which is about 32px. I set the overflow of that to hidden. The inner div is set with its position as relative and then moved upwards a little to center the GPSE code vertically.
My GPSE site search after a few changes
The code I used is:
<div style="height:32px; overflow:hidden;">
<div style="position:relative; top:-10px;">
[Google search code]
</div></div>
Alternative Site Search Engines
In January 2026, Google changed the appearance of their Programmable Search Engine in various browsers. I find changes to my site made by the utilities I use on it troubling and in February looked around at what alternatives were available.
The site search utility should be free and be able to handle the 4,000 HTML pages my site now consists of, and handle my other sites which contain a total of around 10,000 pages. I have full control of the site server, I actually self-host it, so I can also self host the search engine utility if needed.
FreeFind
FreeFind looks good. There is a free vesion but that is initially limited to 64Mb of data. There are various paid versions, the cheapest for my use would be $19 a month for low-priority use, or $39 per month for the pro version.
Lucene
Lucene is a fast full-featured search engine witten in Java. It has been ported to other languages such as Perl, C, Python, Ruby and PHP
Pagefind
Pagefind is a good client-side search engine. It's written in Rust and the raw files can use Python or Node.js. Luckily there are compiled packages for Windows on its GitHub page. The compressed file to download contains a single file, pagefind.exe which can index an entire site.
The .exe file is configured to look through .html files to index but it can be configured to use .htm files, which is what I use using the --glob switch. For example, pagefind --site C:/apache24/htdocs/brisray --glob **/*.{htm}
Apart from all the official documentation, Karl Machleidt has written a nice piece about the search engine.
Pagefind is very popular for small to medium size sites, but I am wondering how it will work on my 4,000 page site. This is because the indexes it builds have to be downloaded to the visitor's browser.
Perlfect Search
Perlfect Search (Internet Archive) was a Perl based CGI (Common Gateway Interface) self-hosted site search. The scripts can both produce the indexes and search those. The last version produced was 3.37, and is still available for download from SourceForge. Daniel Naber has written several patches and plugins for Perlfect Search.
SiteLevel
SiteLevel looks useful. The free level can index up to 1,000 pages, which is not enogh for my use. It has a paid version that can handle a lot more pages, but up to 5,000 pages costs $75 a month.
Web Search Engines
Most major web search engines support the site: keyword. Using this keyword searches can be limited to a certain website. An example would be "site:brisray.com castle". One search engine that this does not work for is Ask, but that appears to be an exception to the rule.
It should be possible to add a text box to a webpage, get whatever is entered into it, afix that to site:brisray.com and send the string to the search engine of your choice. It should even be possible to create a dropdown and let the visitor choose which search engine they would prefer to use. Maybe even open the results in a modal window, much like the Google Programmable Search Engine does.
YaCy
YaCy is a free self-hosted utility and can be installed either in a Docker container or by installing the Java framework. The software has lots of documentation and a community forum, both of whuch can be very useful.
Build Your Own
While writig this page I came across the article "Build a Search Engine in PERL" written by Joseph Ryan in 2002.
The method he describes would be slow as it means searching all the site files from scratch every time a search is made. What would be quicker would be index the files beforehand and then search that.
I thought that perhaps all the index needs are the page URL, page title and then the plain text from the page. I should image a plain text file would get very large over time.
Another idea I had would be not search the text further once a match for that page was found. This would reduce the length the searches would take and only return one result per page. Another idea would be to pull the ten words before and after the search string and also return that in the result with the search string emboldened.
Sources and Resources
FreeFind
Google's Programmable Search Engine
Lucene (Wikipedia)
Pagefind
Perlfect Search (Internet Archive)
PicoSearch (Internet Archive)
SiteLevel
YaCy