← all posts

why search suggestions never showed up in zen

the custom search setup had good results and bad autocomplete. in the search page itself the suggestions worked, though slowly, and in the zen browser they did not show up at all. start where the browser points its suggest request and everything falls out. the duckduckgo suggest endpoint is slow from this ip, that is the slowness on the search page. a bing autocomplete endpoint got installed as a second source, bing answered in about a third of a second while google was ip-blocked and brave was rate limited, so the box now merges bing and duckduckgo and returns ten suggestions in about four tenths of a second.

then the browser side. the search engine metadata was serving plain http urls because the reverse proxy was not forwarding the scheme, so zen's engine entry pointed at an http suggest endpoint and showed nothing. forcing the base url to https and re-declaring the search and suggest endpoints made the opensearch feed correct. the last catch was the sneaky one. the zen engine entry had been added by hand with a plain search url, and manually added engines carry no suggestions url, the suggestions metadata only attaches when the browser discovers the engine from the site itself. delete the manual entry, add it from the site again, and suddenly the address bar sees the suggestions feed.

the final state needed one browser-side fix, delete the old engine entry, rediscover it from the site, and make sure the provide search suggestions setting is on. the image results are still the slow part, lazy-loading the picture grid so results come back in about a second is the next fight. but at least the address bar finally predicts what you are about to type.