Stop iPhone from (Incorrectly) Auto-Linking Phone Numbers
One of the many nice features of iPhone is that Mobile Safari will auto-detect any phone numbers on a web page and turn them into links. Very handy. Much better than remembering the number as you switch from the browser to the phone.
However, this auto-detection is a bit overzealous. In addition to phone numbers, I’ve seen it link date ranges (1978-2008), specific dates (3/9/2009), and—for us baseball stat geeks—offensive rate statistics (.312/.418/.515… and I’ll send a BatchBlue tee shirt to the first person to identify that sweet career line).
Tonight, I was building a page and tested it in iPhone. It incorrectly linked some dates. This was problematic because in that specific section, I had all anchors set to display: block;. So, adding these extra links broke the design.
I could have added some extraneous markup and worked around it, but I was curious if there was a way to turn off this auto-detection. Turns out, there is.
In your <head>, add this line:
<meta name="format-detection" content="telephone=no" />
That will turn off ALL phone number auto-detection on that page. Enjoy!



That would, of course, be the one and only Edgar Martinez.
Nice iPhone tip as well
Yes sir! You and a Twitter pal got it at about the same time. I’ve DMed you asking for an address. Thanks!
Thanks for the link love. Glad my original post/comment came in handy.
Follow me @graiz
- Greg
Just what I was looking for, thanks!
It’s interesting that the iPhone Safari is so willing to auto-link common non-phonenumber formats, such as the standard MM/DD/YYYY date.
Woops, meant M/DD/YYYY.
Any ideas on how / whether you can change the way iPhone decorates the telephone link? I don’t seem to be able to overide this by text-decoration: none etc.
I’ve come to the conclusion that using
­to prevent iPhone reading the digits as a telephone number is the best workaround at present…Hey Sam (I fixed your comment… darn code samples!),
Thanks for the tip. Soft hyphen, eh? Never used it. Interesting.