This 1000 times. I’ve tried implementing what OP has mentioned, and quickly learned it isn’t possible. A city can also exist in multiple zip codes. And there can be multiple cities with the same name in the same state. So, to be safe, you have to enter city, state, and zip.
> A city can also exist in multiple zip codes. And there can be multiple cities with the same name in the same state.
These are reasons you cannot deduce the Zip from the city, not the opposite. A ZIP+4 actually encodes all other information for a US address.
I've implemented it, too, and didn't run into any problems. User inputs the zip code, if there's multiple city matches, they select the correct one from the drop-down (or you auto-complete the city name after they type the first 4 letters).
The fact that "A city can also exist in multiple zip codes. And there can be multiple cities with the same name in the same state" is a good point IN FAVOR of asking for the zip code first (NOT to avoid it) because you certainly can't do it the other way round.
And if you just leave it to the user to free-type all that info in, you have to verify it after... Users are going to make typos, and the USPS will kick your butt if you don't correct it (and credit card payments won't go through, either). So it may be less work for web-form creators, but pushing the verification down stream just makes it all worse for the company using it.
The postcode doesn't tell the whole story. But what you can do is use an IP geolocation service which should narrow down your location enough, so that typing in the entire address is no longer necessary.
I.e. using something like https://ipinfo.io/json and then typing in a full postcode and street name + number should work well in most cases.
There are enough ZIP+4 codes for about a billion addresses. Many addresses I've lived at in the US have had a unique ZIP+4 code.
> A city can also exist in multiple zip codes.
Sure but a zip code belongs to only one city and one state, right?
Make that 1003+ times. At least in my part of the US, even a pretty modest-size city will have multiple zip codes. And zip codes can have zero geographical footprint (meaning street address) - for example, some zip's are just for Post Office Boxes. And a physical address can have an official USPS address & zip of "Middle City", while physically being in (say) Middle Township. And other fun stuff.
I don’t understand either of these arguments. They both appear to reinforce the point made in the article. At worst a zip code contains multiple cities? Voila the city box becomes a dropdown. It’s 2025. JavaScript.