3 ms·
So how would you code this feature so it works with any search engine off the bat and how would the team know this might be a priority to develop next if you ha
by aplummer 4y ago
So how would you code this feature so it works with any search engine off the bat and how would the team know this might be a priority to develop next if you haven’t filed a radar?
- deafpolygon 4y agoThis feature has been solved on other browser.
- aplummer 4y agoI’m more interested in my actual question. If there is some sort of interoperable API or something, not engaging with hostile glib one liners.
- Nextgrid 4y agoA workaround approach - disregarding any existing standards - would be to simply give the user a random, unique string to search for and then try to detect that string in the URL (typically as a query parameter) - then the browser just has to replace that string with the user's actual search query in subsequent searches.
- deafpolygon 4y agoThis is probably how Firefox works, because I get suggested a new search engine every time I search on a new site.
- lstamour 4y agoFirefox uses OpenSearch. https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox https://support.mozilla.org/en-US/kb/add-or-remove-search-en... Chrome uses HTML5 search inputs: https://martin-thoma.com/search-engine-autodiscovery/ https://martin-thoma.com/search-engine-autodiscovery/
- JeremyBanks 4y ago[dead]
- jsnell 4y agoHere's a few options at different places in the spectrum for ease of UX vs. work required by the search engine: Make search engines (appearing in that list) installable as apps. Have search engine websites include some metadata about the API. When this metadata block is present, add a "make this site the default search engine" to the Safari menu. Allow the user to enter an arbitrary URL with some substitutions.
- aplummer 4y agoThanks good suggestions. I think both your last options would work. Either one could be passed through automatically with a deep link from their website (either the search engine base url or your special url in the last point)
- dwaite 4y agoThe approach seems to be shifting from #2 (which winds up being an invasive prompt in some cases which is separate from management) to #1 in the form of Web Extensions. Safari however does not currently support new search engines via web extension metadata.
- fotta 4y agoUse the OpenSearch specification [0]. Most search engines and even websites support it. It’s how, for example, you can search YouTube directly in the FF address bar. [0] https://developer.mozilla.org/en-US/docs/Web/OpenSearch https://developer.mozilla.org/en-US/docs/Web/OpenSearch
- aplummer 4y agoExactly the kind of thing I was looking for, thanks
- dwaite 4y agoOpenSearch is a bit of a confusing mess, because it describes both search descriptions for a site as well as for a site to ask to be a global search engine (aka OpenSearch plugins) Interestingly, Safari at least used to support the first - if you type something into the bar on a site which advertises opensearch, those results will be incorporated into the displayed list. For the global behavior, the guidance seems to have shifted from opensearch plugins to web extensions. Safari does not seem to support any of the search engine metadata fields currently.
- losteric 4y agoI'd implement an existing widely supported standard: https://developer.mozilla.org/en-US/docs/Web/OpenSearch https://developer.mozilla.org/en-US/docs/Web/OpenSearch
- aplummer 4y agoYeah this kind of thing is very interesting, it does look like safari supports it.
- joeman1000 4y agoApple used to offer this but took it away years ago.