Disable iOS/IE phone number detection

If you have a website with a lot of text on it, you might discover that iOS and Internet Explorer will sometimes add links when they think they discovered a phone number.

A lot of the time the detection is wrong and might even destroy a bit of the layout of the page.

To fix this you have to add some attributes to the page to disable the automatic format detection.

For IE you have to add the x-ms-format-detection attribute and set it to none in the html header, like so:

<html lang="en" x-ms-format-detection="none">

See MDN for details.

For iOS/Safari you have to add this meta attribute:

<meta name="format-detection" content="telephone=no">

See the Apple Developer documentation for details.

It seems the list of stuff you have to add to a page to make it work smoothly everywhere gets longer and longer by every year.

A rather complete list of things you could put into the header can be found on htmlhead.dev.

Portrait photo of Bodo Tasche
Bodo Tasche
Polyglot Developer

I am a freelance polyglot developer and love HTML5, testing, JavaScript, Ruby and Elixir. In the last 20 years I have been in lots of different roles, from Java to Elixir, from backend developer at a 3 people team in an early phase startup to the CTO of a web agency. Some of my work can be seen on my projects page.

Need help developing your MVP or to add new features into your current app? Need a CTO or a front/backend developer for hire? Send me an email.