아이폰 웹뷰에서 data detector 방지

-- iOS (iPhone) 2022. 7. 6. 12:32
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

웹페이지를 아이폰 웹뷰로 서비스할 때 컨텐츠 중에 전화번호나 이메일 등의 컨텐츠를 자동으로 전화번호로 연결하거나 이메일로 연결하는 기능이 있다.

 

 

<a href="#">010-111-1111</a>

 

 

편리성을 위해 위의 전화번호 텍스트를 전화 연결 링크로 변경해주는데, 통계나 정보 페이지에서 전화번호가 아닌 일반 숫자로 표시되어야 하는 것이 가끔 전화번호로 인식되어 Data Detecting이 되곤 한다.

이를 방지하기 위해 아래와 같이 할 수 있다.

 


사이트 전체에 방지

 

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

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

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

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

 
해당 요소에만 방지
 
<a href="#" x-apple-data-detectors="false">010-111-1111</a>

 

posted by 어린왕자악꿍