Go with 20252 when you know they're just collecting it to send junk mail. Many programmers don't even try to filter for it.
This works really well in Ireland. Eircodes (our late adoption postal codes) resolve to individual addresses rather than areas, so Irish sites mostly do this.
My zip covers two cities, each has a similar street name; 5-digits isn't enough.
I've encountered websites that take the zip and won't let me change the wrongly-assumed city
I only ask for zip on our checkout. And get the email from one tap methods.
Like the author I cannot stand how stupid some checkout processes are!
ZIP codes don't uniquely identify cities / towns. (Or, in fact, States). Not to mention, they certainly don't work globally...
It doesn't take long to type your address. Plus password managers or keyboards often auto fill it. It's not that deep.
The US Postal service has some of the most complex software in existence, including some of the most advanced handwriting recognition ever developed.
The fact that mail gets to its destination when it does, as soon as it does, with overall minimal error, is nothing short of amazing.
But some web dev blogger has it All. Figured. Out.
Right.
I'm sure your way is better.
This is big "I could code it in a weekend" HN energy.
The USPS owes you a debt of gratitude for buying a snarky domain and bringing this to their attention after 63 years.
Autofill seems like a better solution.
Use ZIP Code: the last word in mail address.
Somehow a lot of Japanese websites use this trick. Far more often than USian websites.
I completely agree with the premise, but if we just ask for the ZIP code first and auto-fill the rest, how am I going to justify my 2-week sprint to build a custom, React-based, fuzzy-searchable, virtualized dropdown component for the 'State' field?
Just kidding xP
Flawed premise.
This works within a country, but not between countries.
For example 77520 is the zip code of Cancun, Mexico and Baytown, Texas.
---
Needs to be country + zip code (postal code).
Someone needs to write "Falsehoods programmers believe about zip codes" hahahaha ;)
PD: if you don't get the reference, a classic: https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-...
Galaxy brain: address should just be a multi-line field
Le sigh. It has now a disclaimer at the top. “Hello from across the pond (or whichever body of water separates us). This is a US ZIP code website. We are aware that other countries exist.”
This guy just keeps digging himself into a hole of ignorance - is he aware of Mexico? Canada?
I guess a better proposal would be:
- Put the country first
- Put the zip code second
Related, on the country drop-down front: please put the United States (or whatever your customers' main country is) at the top. You can probably tell I want the US from a combination of, you know, 99% of your sales being to the US and my language being set to English. And, sure, put Canada and even the UK next to it. Go wild, have the top ten English-speaking countries there if you like! It makes things so much easier.
The trick, then, is that you don't remove anything from the alphabetical list. With modern computer technology, we can have two places to find something! So if I miss your fancy shortcut, or it's not applicable to me, everything will still be in the regular old familiar place. It just works.
In a similar tone, it’s 2026. Why are we still messing with form ordering instead of leaning into autofill? So somehow it makes more sense to change every single address form in existence to a non standard order because…why exactly? There’s a whole world outside of the United States with many formats for postal codes. It’s more efficient to just use autofill…
Um a lot of US zip codes map to multiple cities. Some even to multiple states. If you build a picker for city/state this works fine but your premise is easily refuted if you look at the data!
Zip codes map to postal routes, not polygons
"See how you typed 5 numbers and three fields filled themselves in?"
Nope! Didn't see that. Seems the zip code registry doesn't have a number of German zip codes.
I wish I could downvote this. Please don’t do this folks. Editing “guessed” filled inputs when they’re incorrect is a higher UX bar of effort than browser autofill or even just typing it (especially on mobile). Plus a non-zero number of users will just not correct or be confused and abandon.
Autofill
While interesting, it would take me more time to implement and validate this logic than it would take the user to enter the data.
I would say this doesn't actually work well for UX, because people are more likely to know their street address and city than their zip code. Personally, every time I've moved over the years, it took a few weeks for me to internalize my new zip code.
If you’re going to ask for a country, ask for it first.
Zip codes repeat across countries, you know.
ratio'd
preach
[dead]
[dead]
[dead]
“A postal code will belong to a single city” applies: https://news.ycombinator.com/item?id=8907301