The primary situation where I find this behavior useful is on the web where I find Country drop-down lists. I am trying to find United States. It could be "United States", "USA", "U.S.A.", "United States of America", etc. All you have to do is keep pressing "U" until you find the match you want. It really helps when the desired match could be formatted several different ways.
That assumes, of course, that the website isn't using some ridiculous drop-down component that doesn't support keyboard interaction or tab handling. Sadly, that's about 50/50 these days.
I have always used select dropdowns as a regular text input. I just type the thing I want until it appears on my cursor and I press enter. Never imagined repeated presses would toggle results.
Or if I'm not sure whether the box uses England, United Kingdom, UK, Great Britain, GB, United Kingdom of Great Britain and Northern Ireland (yes I've seen this spelled out once). Sigh.
You forgot "Britain". So it's unclear whether we should look for words starting with B, E, G or U.
And there's also the case of dropdowns putting some most frequent countries at the top, so you spend ages scrolling to find the correct spelling, when listed above "Afghanistan".
Also fun when you're given flag emojis to choose from, sorted by country name, and you don't know which of UK/GB/EN they have used to sort with, and whether you should look for St. George's cross or the Union Jack.
This only works if the "State" field in question uses state abbreviations. Frequently, such fields use the full name for each state. Therefore, `SS` gets you to South Dakota every time.
I understand that it's too exceptionalist / nationalist to give the USA a special slot at the top, but ... If I'm on an English page registering for something run by an American company, there's really good odds that I'm in the USA.
Could we just do the top 3 by population, before switching to alphabetic? I'm willing to hit Down twice to get past India and China.
There is the accept-language key that the user can send in the header. The correlation of those and country of location should be quite good.
I think using geo IP is borderline spyware behaviour.
Becouse the databases are derived from some sort of spyware, right? Or are ip ranges public on country level? The city location has to be spyware derived?
Even setting aside languages spoken in multiple places, please leave the accept language header to languages, not regions. I have en us, because that's the language I want, but I've never been in the US and probably never will.
> I have en us, because that's the language I want, but I've never been in the US and probably never will.
On my personal laptop, I have en-US, because I don't know why. Maybe it is the default for Chrome?
I have en-AU set on macOS at a system level but Chrome seems to have ignored that.
I just reconfigured Chrome to add en-AU before en-US, so now my Accept-Language header is en-AU,en-US,en
My work laptop has macOS set to en-AU but Chrome set to en-GB. I'm not sure how en-GB happened, possibly something my employer did for whatever reason.
> German would be like 3 countries, unless Austria and Schweiz have their own language code.
Officially, we have de-DE for German German, de-AT for Austrian German, de-CH for Swiss German, de-LI for Liechtenstein German – Chrome knows all of those. Plain "de" means German of unknown variant/dialect, but statistically is more likely Germany than any other country.
German is also a secondary official language in Belgium (de-BE), Luxembourg (de-LU), Namibia (de-NA), and also in one region of Italy (de-IT), but software awareness of those German variants is less common (Chrome doesn't know about them, but some other software packages do, e.g. ICU and Microsoft .NET).
> I think using geo IP is borderline spyware behaviour.
With corporate VPNs it often doesn't work anyway. Even though I'm not in the US, I sometimes am forced to use the US VPN access point (e.g. because someone forgot to add the IP range for the non-US VPN access points to the firewall rule for internal service X, and if I complain it will be fixed in a day or two, but I need to use internal service X right now). While I'm doing that, websites will think I'm in the US, even though I'm on the other side of the planet.
Country from IP is usually based on public whois information about the IP range. No spyware involved.
For city-level it gets more complicated. Every provider of IP geo-localization has its own way of doing it. I guess google uses aggregated information from web searches to figure out the city/region for a given IP range... and sometimes it blatantly fails, because ISPs might allocate IPs in unexpected ways for their algorithms, or move them around to different cities/regions. I'm often getting geolocalized (by IP) to a totally different part of the country. I've seen similar behaviours in other countries and with other ISPs, so it's not something that can fail relatively easily.
Then there might be another source of information, which is more spyware-like. Android devices (via the Google play services, I think) participate in constructing a database of cell tower IDs and WiFi access point MAC addresses along with their GPS-derived estimated geographic position (see more: https://console.cloud.google.com/apis/library/geolocation.go...). Apple has a similar service, too. Theoretically the could use the submitted information to geolocalize the source IP range, but I'm unsure whether they actually do it.
> The primary situation where I find this behavior useful is on the web where I find Country drop-down lists. I am trying to find United States.
Pet peeve: when the website obviously has 99% of users who will pick "United States" for country, but they use an alphabetical list of all the countries in the world.
“We don’t even ship to Alaska because of the lithium batteries in our product, but we’ll still make you scroll past ‘Uganda’ to enter the single country we ship to.”
That assumes, of course, that the website isn't using some ridiculous drop-down component that doesn't support keyboard interaction or tab handling. Sadly, that's about 50/50 these days.