Search code examples
htmlinternet-explorerwindows-phonewindows-phone-8internet-explorer-10

Prevent internet explorer 10 mobile from creating phone and address links


Is there a way to prevent IE 10 mobile from creating phone and address links. Something similar to: <meta name="format-detection" content="telephone=no">.


Solution

  • Dirty solution: show text as a real-time rendered image. Something similar is used to avoid email harvesters from getting contact information.

    For php you could try the GD Library.

    This example is from PHP.net page:

    <?php
    // Set the content-type
    header('Content-Type: image/png');
    
    // Create the image
    $im = imagecreatetruecolor(400, 30);
    
    // Create some colors
    $white = imagecolorallocate($im, 255, 255, 255);
    $grey = imagecolorallocate($im, 128, 128, 128);
    $black = imagecolorallocate($im, 0, 0, 0);
    imagefilledrectangle($im, 0, 0, 399, 29, $white);
    
    // The text to draw
    $text = 'Testing...';
    // Replace path by your own font path
    $font = 'arial.ttf';
    
    // Add some shadow to the text
    imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
    
    // Add the text
    imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
    
    // Using imagepng() results in clearer text compared with imagejpeg()
    imagepng($im);
    imagedestroy($im);
    ?>
    

    This will output: text as image
    (source: php.net)

    Of course a lot of resources are being wasted.