-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Search Engines in Fx IOS
This document gives an overview of how Firefox-iOS handles search engines for different locales.
As of 2026, Firefox iOS is now using the new Consolidated Search features, which leverages Mozilla's backend services to determine the available (and default) search engines in the client. Available engines are determined based on the user's locale and region, and supplied through the Application Services framework. This is part of our broader Remote Settings suite of features.
Along with the integration of this feature, came the deprecation of our older search engine handling. More specifically, we have now removed the bundled XML-based engines and related code for filtering those by locale & region. Instead, Firefox iOS can now update available engines without requiring new app installations simply by changing the engines in the related DB. These same services are used across iOS, Android, and Desktop for a consistent experience.
This section briefly describes the client-side code changes made for Consolidated Search. Much of the higher-level architecture for search engine handling was kept as-is, and in fact only a few key lower-level components that provide the engine data have been changed.
The client has new SearchEngineProvider conformer that is used by SearchEnginesManager when Consolidated Search is enabled. Rather than parse the XML and JSON files to determine search engine data, this new provider taps into the new APIs on the Application Services framework. We are provided a list of SearchEngineDefinitions.
For simplicity, and in order to allow the older code to work as-is during the experiment rollout, the Consolidated Search code converts these AS-based engines to our existing OpenSearchEngine model. This may be simplified and changed further in the future (TBD).
At this point we vend the OpenSearchEngines to the higher-level code in the client, which continues to work as is.
As part of the Consolidated Search update, our preferences management has also changed. We have moved away from persisting engine ordering preferences (defined by the user in their Settings) as a list of engine short names, and instead we now persist the engine ID. In order for this to work there is code to provide preferences migration between the two versions as needed.
When you begin typing a search query in the URLBar, you'll notice a couple things:
- Your default search engine is already set, unless you've changed it previously in settings.
- There might be a handful of search engines below. Tapping one will perform a search of your query with that engine.
Those engine choices were made for you according to what engines are "compliant" in your locale.
Search engine compliance for a given locale dictates your preset default search engine, along with preset quick search options. There are several steps for a "provider" (search engine partner) to become, and remain, compliant. Compliance, and what Mozilla can do with compliant engines, can be better understood by asking the Product team.
A user can be a en-US english speaker located in the United States. A user can also be a Welsh speaker located in Singapore. Our system for identifying the "correct" preset search engines will adapt to these, and countless other combinations.
Every locale has preset search engines, stored in our backend S3 databases (there is also a continually-updated default DB that ships within the iOS app). Some locales may have region overrides, and some may have a hard set searchDefault (zh-CN).
Depending on your locale, the preset options for default and quick search varies. The ordering matters. If it's not specified, consider the first search engine the default.
Engine codes are generated and assigned to each search engine, and hardly ever change. They're extremely important. Making sure we don't mix engine codes between Australia and Canada, for example, is critical.