Prevent safari in iOS devices from identifying numbers as phone numbers

Source: Internet
Author: User

Go: Prevent safari in iOS devices from identifying numbers as phone numbers

The test found that safari on the ipad always identifies long strings of numbers as phone numbers, text turns blue, and pop-up menus are added to contacts.

Other places, if there is a number in the user name (mobile phone registration Sina Weibo user name is "mobile phone user xxxxxxxx"), the layout will be very disgusting.

The long string of numbers tested in a tag is not recognized as a phone, so nesting a non-action a tag in place of a user name but not a link temporarily solves the problem.

But this adds extra tags, the semantics of the code becomes poor, and the method cannot be used for large pieces of text.

Accidentally crashed into Safari's official website today and found out that Safari has a private meta attribute to solve this problem:

<meta name= "format-detection" content= "Telephone=no"/>

The

Official website is described below: How does I disable automatic detection of phone numbers in webpages? In Safari on IPhone, phone numbers is automatically detected and transformed into links this dial the phone number when t apped. If you have strings of numbers in your webpage that should is automatically detected as phone numbers, you can choose To disable this feature on the entire page is adding the META tag shown in Listing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.